Next Article in Journal
Shaping the Design Features of a Dynamometer for Measuring Resistance Biaxial Components of Symmetrical Coulters
Previous Article in Journal
Information Conversion in Measuring Channels with Optoelectronic Sensors
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

Practical Experiences of a Smart Livestock Location Monitoring System Leveraging GNSS, LoRaWAN and Cloud Services

Department of Veterinary Sciences, University of Turin, 10095 Grugliasco (TO), Italy
Department of Chemistry, Life Sciences and Environmental Sustainability, University of Parma, 43124 Parma, Italy
Department of Information Engineering, University of Pisa, 56126 Pisa, Italy
Author to whom correspondence should be addressed.
Sensors 2022, 22(1), 273;
Submission received: 25 October 2021 / Revised: 23 December 2021 / Accepted: 27 December 2021 / Published: 30 December 2021
(This article belongs to the Section Internet of Things)


Livestock farming is, in most cases in Europe, unsupervised, thus making it difficult to ensure adequate control of the position of the animals for the improvement of animal welfare. In addition, the geographical areas involved in livestock grazing usually have difficult access with harsh orography and lack of communications infrastructure, thus the need to provide a low-power livestock localization and monitoring system is of paramount importance, which is crucial not for a sustainable agriculture, but also for the protection of native breeds and meats thanks to their controlled supervision. In this context, this work presents an Internet of things (IoT)-based system integrating low-power wide area (LPWA) technology, cloud, and virtualization services to provide real-time livestock location monitoring. Taking into account the constraints coming from the environment in terms of energy supply and network connectivity, our proposed system is based on a wearable device equipped with inertial sensors, Global Positioning System (GPS) receiver, and LoRaWAN transceiver, which can provide a satisfactory compromise between performance, cost, and energy consumption. At first, this article provides the state-of-the-art localization techniques and technologies applied to smart livestock. Then, we proceed to provide the hardware and firmware co-design to achieve very low energy consumption, thus providing a significant positive impact to the battery life. The proposed platform has been evaluated in a pilot test in the northern part of Italy, evaluating different configurations in terms of sampling period, experimental duration, and number of devices. The results are analyzed and discussed for packet delivery ratio, energy consumption, localization accuracy, battery discharge measurement, and delay.

1. Introduction

To reach the goal of having sustainable and intelligent industrial agriculture, smart agriculture is taking advantage of the Internet of Things (IoT) paradigm, artificial intelligence (AI), and Big Data, with cloud and virtualization technologies, to facilitate innovative applications which can be achieved through the provision of service and product development, real-time monitoring and diagnostics, processing, and distribution to consumer experience [1,2]. At the same time, there is a growing need to improve precision farming so as to optimize animal production and reduce approximations in the assessment of animal health. Engineering advances and decreasing costs of the new electronic technologies have allowed the development of many sensor-based solutions for the livestock industry [3]. These sensors are able to collect data automatically and in real time, enabling the early detection of specific problems (e.g., production loss, poor health, and threats to wellbeing) at group or individual level [4]. This technological approach is currently known as precision livestock farming (PLF). Sensing solutions are implemented in PLF systems at the level of the smallest manageable production unit, the “sensor-based individual animal” approach [5].
However, an important criticality must be taken into consideration, especially for supply chains operating in marginal rural areas where poor technological infrastructures and unreliable services (electricity, telephone, and internet networks) are available in many small ruminant farms (often located in mountainous and remote areas), reducing the development of new local initiatives and businesses based on PLF implementation [6,7]. As a further step of automation, sensors used in PLF systems should ideally be integrated with processing (such as artificial intelligence functions) and storage solutions that will provide a platform developed on a “cloud continuum” starting from the back-end of the large data center (hyperscale service provider) and dynamically providing virtualized functions even at the peripheral part of the network.
Over the centuries, pastoralism and transhumance (seasonal movement of livestock between grazing areas) created a wide variety of specific cultural landscapes. In general, especially in Europe, grazing is of particular importance for the preservation of open landscapes in the mountainous areas. For example, extensive grazing is considered vital for maintaining many biodiversity-rich habitats in Europe [8]. Livestock farming is, in most cases in Europe, unsupervised, thus making livestock localization and monitoring a relevant task in smart agriculture, which is crucial for a sustainable agriculture [9].
Livestock such as sheep are free in large enclosed remote areas for most of the year, although they are controlled periodically for veterinary control. Livestock localization helps to ensure adequate control of the position of the animals for the improvement of animal welfare, thus simplifying the everyday work of farmers and veterinary doctors. In addition, the supervision of livestock enhances welfare control processes, avoiding unnecessary casualties and allowing a more efficient reproductive process. It also provides a better management of available pastures [10]. Location information over time provides information about animal activity (i.e., the health status, etc.). For example, in the work of [11,12], changes in the activity may signal diseases, and can be often detected before emergence of clinical symptoms. Livestock localization and monitoring can be divided into two parts, which are the livestock location monitoring and livestock behavioral/activity monitoring [13]. This paper only focuses on the livestock location monitoring, but with the aim of adopting the cloud services that could be easily extended to provide new solutions in the specific domain (livestock behavioral/activity monitoring is out of the scope of this work).
Since the emergence of Global Navigation Satellite Systems (GNSS) solutions, such as Global Positioning System (GPS), GLONASS, or Galileo, the task of determining one’s location has become easy and smooth. However, this comes at the expense of high energy consumption from the GNSS receivers, but with highly accurate location estimations. There are other alternatives to GNSS for livestock localization, such as NB-IoT, LoRaWAN, etc., where accuracy seems to be an issue. Although the alternatives present low power consumption, these deployments are heavily dependent on the infrastructure (gateway installation might be difficult in the remote areas). Enabling localization in an IoT system is a trade-off between constraints, desired parameters, and functionalities of the system. This includes the aforementioned costs and the resulting localization accuracy.
Knowing the location data in (near) real time means that the device is equipped with a wireless transceiver. Communication technologies such as cellular communication are not suitable due to the high power consumption of cellular receivers, which is a major drawback for embedded devices today. In addition, radio coverage of cellular communication such as 3G, 4G, and 5G is not guaranteed everywhere, especially in the mountainous areas where telecommunication service providers find these places less interesting due to low population density, so alternate wireless communication is required. As the coverage of telecommunication infrastructures in rural and mountainous areas is generally poor or absent, and troubleshooting or maintenance operations are very difficult, we identified LoRa and LoRaWAN, a low-cost, low-power technology, as the most suitable connectivity solutions, especially for monitoring and control operations. In fact, as LoRaWAN is a low-power and long-range communication protocol—as will be further discussed in Section 2.1.4, it can provide connectivity over large grazing areas, also ensuring robustness with low energy requirements.
This paper is motivated by the Smartsheep project (, accessed on 20 October 2021) which aims at developing new biosensors in the control of animal health and the movements of a flock in the mountain pastures. In this context, this work presents an IoT-based localization system to provide real-time livestock location monitoring. The system integrates ad hoc IoT devices, LPWAN technology, and cloud computing. The ad hoc IoT device in wearable form is equipped with inertial sensors, GPS, and LoRaWAN transceiver. The device periodically collects location and activity data and then transmits it via the LoRaWAN gateway to the cloud system for storage, processing, and management. This work also presents a monitoring platform for enabling the remote monitoring and control of the IoT devices, which was carried out using virtualization technologies. In our work, we made use of Amazon Web Services (AWS), which is a scalable cloud-based architecture for a modular IoT system.
This approach is smart as it envisions that the development of an integrated infrastructure was not only computing, communications, and storage capabilities that will be integrated, but also, data moving towards the data center where cloudlets will be set up, scaled, and torn down to process the data in a more distributed, robust, and secure environment. This work is a starting point for the design of IoT platforms integrated with the functions provided by the new paradigms of cloud computing, such as edge or fog computing, integrating within the adoption of LoRaWAN and GPS a data-driven method, aimed to save time, cost, and also improving the process of improving humans’ quality of life in the domain.
The main contributions of this article are as follows:
  • A comprehensive state-of-the-art section is provided on the techniques and technologies used for livestock localization.
  • A description of the hardware design and the firmware used.
  • A detailed description of the design and development of the cloud-based monitoring platform for the livestock localization system consisting of the sensors, communication technology, and data-processing modules.
  • We discuss the results of experiments to evaluate the transmission quality of our testbed under various scenarios.
The rest of this paper is organized as follows: Section 2 introduces the state-of-the-art and the related works. The overall system architecture is described in Section 3. In Section 4, we present the experimental setup and the experimental results. Section 5 presents the discussion, and lastly, Section 6 concludes the paper with some final remarks.

2. State-of-the-Art and Related Works

In this section, we briefly discuss the state-of-the-art techniques and technologies used in livestock localization. Next, we present the related works.

2.1. Livestock Localization

The essential features of a successful localization scheme in sheep farming are small size, energy-efficiency management, low cost, due to the potentially high number of nodes required for monitoring an entire herd of sheep, synchronization time, to obtain a reasonable operation time to acquire the device’s location, appearance, to equip these devices with the appropriate level of protection, e.g., waterproof protection, and independence from additional hardware which can increase the costs and reduce mobility. Livestock localization is an essential process in the IoT environment for tracking and monitoring livestock with the help of sensor nodes. The sensor nodes collect the target information and transfer it to the central controller for further processing. These applications demand information about the position of the sensor node. Node localization algorithms are mainly categorized as range-based localization and range-free localization. In the range-based method, the node locations are estimated by considering point-to-point distance or angle between the nodes with some reference, whereas the the range-free method is based on the connectivity or pattern mapping for location approximation. In this work, we are only focusing on range-based methods which are usually used in livestock localization. They utilize hop distances, hop counts, and angles for a position estimate. We classify livestock localization into its techniques and technologies. The most widely used techniques for geolocation of wireless end devices are based on the measurement of certain parameters (e.g., signal attenuation, signal propagation time, and angle) by other devices (e.g., the GWs) with a known location. The taxonomy of livestock localization is illustrated in Figure 1. The basic methods of geolocation include [14] the following:
  • Time-of-Arrival (ToA) [15,16] utilizes the signal propagation time to calculate the distance between the transmitter and the receiver through the use of synchronized clocks. ToA uses time stamps labeled in the transmitted signals along with the received time to determine the distance the signal had traveled. ToA is one of the most accurate techniques available, but a perfect synchronization between the transmitters and receivers is important, thus also introducing complexity to the system. The key factors that affect ToA estimation accuracy are the signal bandwidth and the sampling rate. Low sampling rate (in time) reduces the ToA resolution as the signal may arrive between the sampled intervals. Frequency domain super-resolution techniques are commonly used to obtain the ToA with high resolution from the channel frequency response. In addition, in a TOA-based localization system, devices in the network need synchronized clocks, which require additional hardware, thus increasing the cost of the system.
  • Time-Difference-of-Arrival (TDoA) measures the difference of propagation time between the signals in terms of their nature, such as using RF, acoustic, or ultrasonic signals [17]. The idea is that the distance is calculated by determining the differences in arrival time of the packet to the different receivers. This method is affected by delay that can be experienced by the transmitted signal, as the different distances are calculated based on the propagation times. This method sometimes controls the problem synchronization, and also reduces complexity [18].
  • Received Signal Strength Indicator (RSSI) has gained much attention in the last years [19] due to the increasing number of IoT devices utilizing these methods for localization. RSSI measurements are commonly used for target detection, but one can also use them for localization without any additional sensor functionalities. RSSI utilizes some signal propagation models, either theoretical or empirical, to translate signal strength into distance. The received signal strength measurement is also highly sensitive to the interference and may experience significant deviations from one measurement to another.
  • Angle-of-Arrival (AoA) is based on angle calculation of which direction the signal is received from (i.e., sent by the node) [20]. AoA systems use an array of antennas to determine the angle from which the signal is propagated. Triangulation is then performed, along with the geometric angles of triangles, to determine the position of the receiver. Using AoA techniques to estimate a position does not require time synchronization between the measuring units, and the position can be determined with as few as three measuring units for 3D positioning or two measuring units for 2D positioning. AoA techniques come at the price of requiring complex hardware and must be calibrated in order to obtain an accurate position [21].
Table 1 provides the pros and cons of the discussed techniques for livestock localization.
In this section, several existing technologies which have been used to provide livestock localization services will be presented, as well as their mode of operation. Radio communication technologies such as LoRa, Narrowband Internet of Things (NB-IoT), Sigfox, and GNSS will be presented first, followed by other radio technologies such as Bluetooth Low Energy (BLE) and Zigbee technology, which are meant for indoor localization services but few works have been seen to use it for livestock localization.

2.1.1. NB-IoT

Narrowband Internet of Things (NB-IoT), proposed by 3rd Generation Partnership Project (3GPP), is a variant of 4G Long Term Evolution (LTE) developed to fulfill the IoT requirements in low data rate applications. It is also known as LTE Cat-NB1 and operates in the licensed spectrum. It belongs to the LPWA technologies, which could work virtually anywhere when the infrastructure is present. It supports three different modes of operation, namely standalone operation (as a dedicated carrier), in-band operation (deployed within an LTE wide-band system), and lastly guard-band operations (co-located with an LTE cell) [22]. NB-IoT is also being used in many commercial agricultural solutions. The implementation of NB-IoT is only possible through telecommunication providers’ IoT services. Therefore, it is neither cost effective, nor does it provide openness as offered by other IoT technologies.
In the 3GPP Rel-13 and 3GPP Rel-14 of NB-IoT, localization can be achieved through the use of enhanced cell ID (eCID) [23]. This method allows the NB-IoT user to measure and report the enhanced Node-B’s (eNB’s) receiver–sender time difference, reference signal received power (RSRP), and the reference signal received quality. The 3GPP Rel-14 also introduced observed time difference of arrival (OTDOA), another method for determining the user’s position. OTDOA introduces a new narrowband positioning reference signal (NPRS), which is sent to the receiver to enhance the positioning measurement. In OTDOA, the ToA of NPRS from a reference eNB and the neighbour eNBs are estimated. By measuring the time difference, the user’s reference signal time difference (RSTD) can be estimated. Each RSTD measurement restricts the user’s position to a hyperbola. The point of intersection of several such hyperbolas give the user’s location [24]. There are still ongoing works on the design and features of NB-IoT on how to improve the localization accuracy [25].

2.1.2. GNSS

Global Navigation Satellite Systems (GNSS) solutions, such as GPS, GLONASS, GALILEO, and BeiDou, are the most common localization systems used for outdoor localization purposes, such as locating and tracking humans, cars, livestock, and assets, among others [26]. GNSS systems provide accurate location estimations compared to other technologies, especially where the satellites are directly visible, i.e., having line of sight (LoS), but at the expense of high energy consumption.
The working principles of any GNSS satellites are almost the same. The satellites broadcast a very precise timing signal and data message, called navigation message, that contains their orbital parameters. GNSS receivers receive the navigation message sent from the relevant satellites in orbit, process the message, and estimate position velocity and time. A minimum of four satellites are needed for estimating three-dimensional position and time. At first, the receiver calculates its distance from each visible satellite and then calculates a three-dimensional position using the trilateration or multitrilateration technique. Good accuracy can be obtained if visible satellites are broadly spaced in the sky. The synchronization of the receiver clock and the satellite clocks are very crucial. The satellites carry atomic clocks onboard, which makes their timing very precise [26,27].

2.1.3. Sigfox

Sigfox is an LPWAN technology, highly efficient in spectrum usage. Sigfox, an LPWAN network operator, deploys its proprietary base stations equipped with cognitive software-defined radios and connect them to the back-end servers using an IP-based network. It utilizes the ultra narrow band carrier of the sub 1 GHz ISM bands and binary phase shift keying (BPSK) modulation technique. It uses star topology, and the base station is equipped with a cognitive software-defined radio that is connected to servers using an IP-based network. The communication range of Sigfox is up to 45 km and 12 km in rural and urban areas, respectively. Sigfox supports data rates of up to 250 kbps, and also uses unlicensed spectrum (868 MHz and 902 MHz) for communications. For each end-node, Sigfox restricts downlink communications to 4 transmissions of 8 bytes of payload, and uplink communications to 140 transmissions of 12 bytes of payload [28]. Despite these limitations, Sigfox provides many opportunities in smart agriculture [29]. Sigfox presents its own localization feature, which is based on the RSSI coming from the messages sent by a device and received by the base stations of the Sigfox infrastructure combined with machine learning algorithms [30]. This method is calculated using regular Sigfox messages, which is very cost-efficient with no extra hardware required, and the message payload can be empty (less battery use) or used for regular handling. Radio choices made by Sigfox bring specific benefits: low energy for a longer battery life, low connectivity rate, high network capacity, long range, and resilience to interference, with the capacity to resist jamming. Access to the service strongly depends on the Sigfox network coverage in the dedicated territory, which is a major limitation.

2.1.4. LoRa/LoRaWAN

LoRa and LoRaWAN are global de facto standards of low-power wide-area network (LPWAN), and they are the most adopted technologies for the IoT. LoRa, the physical layer in LoRaWAN, uses forward error correction (FEC) and a proprietary modulation which is a variant of chirp spread spectrum (CSS) [31]. The physical channel is logically separated by the spreading factor (SF) due to its orthogonality. The carrier frequency varies over a designated amount of time, thus achieving low power, robustness, and long-range communication links [32]. LoRa is defined by its main parameters (SF, bandwidth (BW), and code rate (CR)), which are configured to adapt to the working scenario. It is worth noting that different combinations of the aforementioned transmission parameters yield different trade-offs with respect to the range and data rate that can be achieved, and these combinations are also governed by regulatory constraints. A network structure based on LoRaWAN protocol consists of four individual sections, namely, the end devices, the gateway, the network server, and the application server. The LoRaWAN MAC layer provides the medium access control mechanism operating as ALOHA protocol, which enables communication between multiple devices and network gateway(s). Given the features of LoRa such as long range and low power, several agricultural applications [33,34,35,36] have been developed where LoRaWAN has been exploited for controlling and monitoring.
RSSI for coarse positioning and TDOA for finer accuracy are the two LoRaWAN protocol methods for geolocation [37]. The LoRa Alliance claims that using TDOA in LoRaWAN has an accuracy range of 20–200 m depending on conditions, whereas in RSSI, it is about 1000–2000 m accuracy. Janssen et al. evaluated an RSS fingerprint-based LoRaWAN method using a random forest machine learning algorithm where they were able to obtain an average location estimation error of 340 m [38]. Further research has to be conducted to improve the location accuracy in LoRaWAN localization.
Bluetooth Low Energy (BLE) and Zigbee technology are low-power, low-cost wireless systems used in agricultural applications. BLE merged into the main Bluetooth standard in July 2010, when Bluetooth Core Specification 4.0 included the classic Bluetooth protocol, Bluetooth High-Speed Protocol, and BLE [39]. BLE is designed for very low-power applications that can run off a coin cell battery for months or even years. BLE has been subsequently enhanced in versions of BLE 5 by addressing inadequacies via the implementation of pure mesh topology to provide enhanced network coverage, internetwork connectivity, and improved security [40]. BLE can be compared to other wireless technologies such as 4G/5G, Wi-Fi, and LPWAN technologies with the following features. Firstly, considering privacy, in the case of BLE, the Bluetooth facility needs to be switched on to allow location detection. BLE allows privacy and freedom in terms of sharing data in public compared to some wireless technology such as Wi-Fi. Secondly, in terms of speed, BLE is better for transmitting smaller amounts of data such as sensor readings of temperature, GPS coordinates, and acceleration details, which is ideal in the case of agricultural spectrum. Thirdly, BLE can also be used for localization, which is usually carried out by installing a set of proximity beacons (i.e., BLE transmitters) at known locations [19]. Receivers extract the RSSI (which is a proxy of the distance from the transmitter) from the nearest beacons and use these values to predict their own position. Despite the several uses of BLE-localization in indoor environments, BLE-localization poses a lot of challenges in the industrial and agricultural environments, especially outdoor environments, because of the harsh conditions and environments. Despite these challenges, few works [41,42] have utilized BLE for livestock localization.
Zigbee is built upon the IEEE 802.15.4 standard that is concerned with the physical and MAC layers for low cost, low data rate, and energy-efficient personal area networks [43]. ZigBee is favorable for localization of sensors in wireless sensor networks (WSN), but it is not readily available on the majority of the devices, hence it is not favorable for livestock localization. Few works, such as [44,45], have utilized Zigbee technology for livestock monitoring.

2.2. Related Works

The smart agriculture concept, with regards to localization, relates to location-aware devices to monitor the movement of animals and raise alerts when they violate the boundary of the geofence of the farm or pasture. There have been several studies on the integration of GNSS technology with cellular communication for applications regarding livestock location monitoring [46]. GPS technology occupies the majority of the deployment in the literature compared to other localization technologies. This is hardly surprising given the easy adoption and accurate location estimations compared to other technologies, especially where the satellites are directly visible. In addition, GNSS technology has achieved a lot of success in detecting static or dynamic unitary behaviors differentiated through changes in path speeds: foraging or grazing, resting, and walking [47]. The authors in [48] presented a data collection collar for vital signs of cattle on the grassland based on GPS and LoRa technology. Similar work using GPS technology is also addressed in [49].
Livestock theft management is one of several use cases in livestock location monitoring. To this end, researchers have proposed several systems that can be used to minimize the chances of livestock theft. In [50], the authors proposed a system based on RFID and GPRS technology for tagging, identification, and communication, which is supported by a centralized database system. The authors introduced an approach to identify an animal stolen if the animal is found in a geographic location that is considered far from the registered location of the animal. Similar work addressing livestock theft management is addressed in [51].
Few works have addressed the use of other technologies, such as BLE and LPWAN, for livestock location monitoring. In [41], a BLE technology with RSSI localization method was designed for livestock location monitoring. The method introduced by the authors provided accurate localization using a small number of reference points (anchors) and required limited measurements during setup. Zigbee was also used in [44], where the authors presented a localization scheme in wireless sensor networks for cattle monitoring applications in grazing fields, where the use of link-quality indicator-based ratiometric vector iteration (RVI) algorithm was utilized. Similar studies utilizing Zigbee technology for livestock monitoring have been demonstrated in [45,52]. To the best of our knowledge, several studies on livestock location monitoring implementations use GNSS receivers to send GPS coordinates over LPWAN, such as in LoRaWAN [53,54], NB-IoT [55], and Sigfox [56].
Another alternative for livestock monitoring is the use of unmanned aerial vehicles (UAVs) as described in [57,58,59]. Some of the application uses of UAVs do not explore the imaging capabilities of the UAV, rather using the aircraft for different actions, and collection of data from sensors fitted on the animals through wireless communication [60,61]. For example, the authors in [62] combined the usage of GNSS and UAVs for livestock monitoring, where drones were deployed to accomplish the sweep coverage of the entire pasture, and to determine the tracking information acquired by GPS collars won by the animals. Other uses of UAVs for livestock monitoring involve exploring images for direct visual analysis, aiming at cattle detection [63] and determination of feeding behaviour [64]. However, there are some limitations and technical issues when using UAVs in agriculture, especially for livestock monitoring, such as payload and battery capacity, cost, environmental factors, and operational factors where special permissions are needed in some countries [65]. Lastly, in addition to the related works on livestock localization, there are several works [66,67,68,69] that have applied AWS cloud services to agriculture.
In summary, whilst the surveyed studies are focusing on the performance of GNSS technology for livestock localization, more studies on practical implementations of using GNSS and LPWAN technology need to be carried out on livestock localization. Such experimental implementations over a period of time are needed to provide an insight on accuracy and energy consumption. Table 2 presents a brief summary of the deployments for livestock localization.

3. System Architecture

In this section, the overall system architecture is presented (see Figure 2). Next, the mode of operation of the device and the system infrastructure are also described.

3.1. Device Description

The end device is built around an STM32L072 [71], a 32-bit ARM Cortex® M0+ core, which combines a 192 KB flash memory with read-while-write capabilities, 6 kB EEPROM, 20 kB SRAM, general purpose I/O lines, and peripheral communication interfaces (USART, I 2 C , SPI bus). It also features a GPS positioning module and an LoRa transceiver able to transmit using FSK and LoRa modulations for communication purposes. The end device embeds an sx1276 module supported by LoRaWAN and also integrates a nine-axis accelerometer (three-axis gyroscope, three-axis accelerometer, and three-axis magnetometer) necessary to provide information about accelerations in all three directions and rotations around each axis. The hardware block diagram is shown in Figure 3. The LoRaWAN transceiver was configured as a device of class A, which is necessary to ensure minimum energy consumption of the device. To transmit, process, and store the information retrieved from the devices, we used a proxy software that collects and transmits this information via LoRa first to the LoRaWAN gateway, and then to the back-end system.

3.2. Mode of Operation

In this work, we configure the device to adapt to the detected motion of the device to improve the energy efficiency. At power on, the device works with the last-used settings. The settings (physical layer parameters, role, etc.) are stored in the non-volatile flash memory and reloaded at power-up. The device supports both ATP/OTAA methods to communicate to the LoRaWAN network. In our case, the device is configured with the OTAA registration keys, where the device will repeatedly try to join the LoRaWAN network until the join process is successful. Once the join process is successful, the device starts collecting data retrieved from the sensors to the LoRaWAN network.
In the data collection phase, the device will try to obtain the location information (i.e., latitude, longitude, altitude, hdop) from the satellite in a periodic manner. Other information retrieved from the sensors, such as battery, accelerometer, etc., are collated with the location information to be forwarded to the LoRaWAN gateway. If the location information is not determined within X seconds (configurable), the location information field is set to 0x00, while other information, such as the battery status, enters the uplink phase. In the uplink phase, the device sends all the messages retrieved from the sensors to the LoRaWAN network in a periodic manner. Once the messages are sent, the device enters into a sleep state to save power. Depending on how much time has passed since the last physical movement of the device, which is determined by the motion sensor of the device, the device enters different sleep states. The states are the active sleep phase and the passive sleep phase.
In the active sleep phase, the device uploads its information to the LoRaWAN network, then enters the sleep state to conserve energy. The frequency at which the device wakes up in the active sleep phase (active mode) can be configured using a cron expression. In our application, typical values are between 10 min or 15 min. When the device is in the active sleep phase, the device will not be triggered to gather more location information through motion, but the movement of the device will still be registered to keep the device in the active mode. In the passive sleep state, if no motion is detected for a long amount of time, the device enters a passive sleep state, but the device will be activated through movement. Typical values for the cron in the passive sleep phase in our application are between 90 min or 120 min. If no physical movement is detected at the end of the long time cron, the device sends the last-used location information along with other information to the LoRaWAN network, whereas if a physical movement is detected by the internal motion sensor during this phase, the device immediately wakes up and switches to active mode. A summary of the operating logic of the device is presented with the simplified state machine diagram in Figure 4.

3.3. System Infrastructure

There is a need to use cloud solutions to ensure a reliable and secure infrastructure that supports automatic scaling of resources according to the system needs. The use of cloud services leads to increased scalability, availability, reliability, agility, and security, among others, where there is a huge advantage of moving the IT infrastructure to specialized cloud providers [72]. We made use of AWS as the cloud infrastructure due to its numerous services provided for IoT applications [73]. AWS is one of the five major solutions with the largest market share alongside equivalent IoT platforms from Microsoft, Cisco, Google, and IBM [74].
AWS Cloud contains many groups of services, including IoT Core, IoT Core for LoRaWAN, compute, storage, databases, network, management, application, analytics, and others. The system infrastructure and the services used in our Smartsheep system are illustrated in Figure 5. The IoT devices and the LoRaWAN gateway used in the Smartsheep system are registered in the AWS IoT Core to connect to the AWS cloud, without developing or operating an LoRaWAN Network Server (LNS). In order for the IoT devices developed for the Smartsheep to interact with the AWS cloud services, an IoT rule is needed. The IoT rule has so many functions, such as filtering data coming from the IoT devices, sending the LoRaWAN messages to the AWS Lambda to decode the payload, sending LoRaWAN messages to the database channel, analytics channel, etc.
Our application can be implemented in various deployment scenarios. In our case, two different deployment scenarios were devised to better analyze the resource consumption of our application when using cloud-based IoT services, as shown in Figure 5. In the first deployment scenario, AWS infrastructure was used in the entirety of the implementation. The raw messages gathered by the sensors are sent to AWS lambda to decode the messages using the rule function. The decoded messages with other information are archived into a channel, which stores all data from a certain MQTT topic. The MQTT protocol was created especially for low latency and small-sized packets characteristic of IoT devices. Messages from the channel can be redirected by the IoT Core to AWS IoT Analytics by means of user-defined rules. The dataset is imported into AWS QuickSight for graphical representation. Furthermore, the messages from the IoT Core, decoded by the AWS lambda layer, are written by the lambda function as measures into the Amazon Timestream table (telemetry and metadata). Amazon Timestream is a fast, scalable, and serverless time series database for IoT applications. The data from the Amazon Timestream are displayed in Grafana. The main advantage of using this deployment scenario is that the serverless infrastructure is managed entirely by AWS and, as such, this solution requires the least time and effort to be deployed.
In the second deployment scenario, the data gathered from the devices registered on AWS IoT core for LoRaWAN were sent to InfluxDB and Grafana containers, which store and display data for each device. The docker containers, which contain InfluxDB, Grafana, and other applications, are installed on a local server. The monitoring dashboard provided by InfluxDB and Grafana offers a useful insight to drive the experiment without high maintenance cost.

4. Results

4.1. Experimental Testbed and Configurations

We conducted a pilot test to assess the effectiveness of the Smartsheep location monitoring system. The test environment is located at the pasture area of the Department of Veterinary Sciences, Grugliasco, University of Turin, Italy, as shown in Figure 6. The approximate area where the flock of sheep were localized is approximately 700 m 2 . The flock of sheep grazed freely throughout the experimental test. All sheep selected for each experiment carried an end-device collar for localization, as shown in Figure 6. The devices transmit information (latitude, longitude, battery, etc.) via LoRa to the LoRaWAN gateway, and then to the back-end system for visualization. The activity is transmitted from the devices to the LoRaWAN gateway in a periodic manner. We make use of a commercial gateway embedded with LoRa capabilities placed on top of a building at a height of 40 m, as shown in Figure 6. The LoRaWAN gateway is connected to an ADSL router that provides connectivity with the Internet and finally to the AWS network. BW and CR were kept constant for our field experiment (125 kHz, 4/5) while SF was varied between (7, 8, 9, 10, 11, 12) when the adaptive data rate (ADR) was disabled. To study the message frequency in the Smartsheep LoRaWAN network, we considered three communication schemes: sending packets every 5, 10, and 15 min. Ten end devices were considered for the pilot test. This is necessary to evaluate the performance of the battery discharge on the time activity of the devices. Figure 7 shows an image of a flock of sheep grazing in a field during the pilot test.

4.2. Convergence Time

In this subsection, we evaluate the performance of the LoRaWAN network with respect to convergence time. LoRaWAN networks can operate with or without the ADR. The ADR is a component that controls the performance of the LoRaWAN network by modifying the data rate parameter (i.e., spreading factor) based on current wireless conditions. This is important to reduce the overall energy consumption, and it increases the overall delivery ratio with the correct selection of transmission parameters, as demonstrated in [75,76]. In our work, we implemented the ADR technique presented in the LoRaWAN specifications. In Figure 8, we present the convergence time of the Smartsheep LoRaWAN network when the ADR is enabled/disabled. The LoRaWAN MAC layer has an optional ADR mechanism, if enabled, to ensure the end devices modify the chosen data rate based on the recent traffic conditions. The network server makes better decisions when more packets flow into the network. In this experiment, a total of 14 days evaluation is considered to assess the performance of the LoRaWAN network when the ADR is enabled/disabled at the network server. We consider 10 end devices that send their activity every 15 min to the LoRaWAN network. From the figure, we can observe that when the ADR is disabled, the delivery ratio tends to remain stable due to fewer changes in the network operation, whereas when the ADR is enabled, there are instabilities in certain metrics, such as delivery ratio. As the packets in the network increase in the ADR-enabled mechanism, the network server tends to have more data to make better decisions, thus making the metrics (i.e., delivery ratio) stabilize and converge as the communication time increases. The metrics can be considered more stable in the ADR-disabled mechanism compared to the ADR-enabled mechanism in a short time period, but as the number of days increases, both mechanisms tend to be stable.

4.3. Delivery Ratio

This subsection presents the results from the experimental field test regarding the packet delivery ratio (PDR). PDR is calculated as the number of packets received by the gateway to the total number of packets sent, with a value of 1 implying 100% success and a value of 0 implying no success at all. The result is shown in Figure 9. We consider three communication schemes: sending packets every 5, 10, and 15 min, and the test was performed for a 7-day period for both ADR-enabled scheme and ADR-disabled scheme. We can draw the following remarks: For a small number of nodes, which is relatively the situation we considered in this experiment, LoRa networks with ADR disabled achieve a better delivery ratio than those with ADR enabled. This situation can be explained in the following context: a small number of nodes implies a less-saturated spectrum and limited possible collisions. Under these circumstances, network ordering can be optional when deploying these networks in small areas.
LoRa networks achieve a better delivery ratio with an activity of 15 min as compared to 10 min and 5 min for both ADR-enabled and ADR-disabled schemes. When varying the sampling interval, all curves show a standard behavior corresponding to their interval: sampling at 5 min, which denotes more messages, implies a lower delivery ratio, as more nodes are transmitting simultaneously and occupy the same channel. Nonetheless, the results for both schemes are over 82.5%, which is expected for a network with these characteristics.

4.4. Energy Consumption

This subsection presents the assessment of the energy consumption for end devices obtained via field experiments by varying the packet frequency. The field test experiment was performed for a 7-day period for both ADR-enabled scheme and ADR-disabled scheme, where the results are shown in Figure 10a,b. It is essential to note that the energy consumption shown in the figures corresponds to the average energy consumption for the nodes in the network in millijoule (mJ).
It can be seen from Figure 10a that the energy consumption in the ADR-disabled scheme is almost invariant for the days considered when varying the sampling intervals. In the ADR-enabled scheme, the energy consumption of the devices performed better than the ADR-disabled scheme. We observe that when the ADR-enabled networks are considered, as shown in Figure 10b, the effect of transmission control is noticeable. When frequent transmissions occur in a network, this is the most energy-efficient scenario. The results show a substantial energy reduction when operating in the ADR scheme, especially when frequent communication from end devices to the network server is very frequent (every 5 min interval).

4.5. Battery Discharge Measurement

We present, in Figure 11, the battery discharge of the devices over a 14-day period with respect to the sampling intervals of 5 min, 10 min, and 15 min in an ADR-enabled scheme. Six devices are evaluated and divided into three different categories, with each category sending its information at different sampling intervals, as shown in Table 3. The full discharge test was performed on a fully charged battery. From the figure, we observe that sampling at 15 min reduces the discharge rate as compared to 5 min and 10 min. In addition, the battery lasted for all devices operating at different sampling times during the 14-day experiment. The device software is configured in such a way that when the battery level drops beyond 2.8 V, the GPS module will not be able to obtain a GPS fix. Based on this observation, the GPS modules of the devices transmitting at 5 min intervals are disabled at day 10 of the 14-day period. To minimize the energy consumption, the end device’s software is designed to enter low-power modes whenever there are no active functions, as described in Section 3.2.

4.6. Localization Accuracy

The accuracy findings of the flock of sheep through GPS are shown in this subsection. Each device obtains the location data from the satellite in a periodic manner. In our experiment, we set the sampling period for all devices to be 5 min. Table 4 presents the results of a 7-day field test. MD represents the device’s maximum distance from the sheep area’s perimeter. The average distance (AD) is denoted as the mean distance of all S h e e p - i outside of the sheep area, while out of bounds (OB) is defined as the percentage of sheep that are located outside of the sheep area. We can make the following observations: In a 7-day experiment, the percentage of sheep outside of the sheep area sampling at 5 min was quite low, showing good accuracy. This answer, however, does not offer the exact position of the flock of sheep, but rather the general area of where the flock of sheep is located. Furthermore, outside of the sheep region, the flock of sheep has an average distance of less than 5 m from the boundary, demonstrating the accuracy of the localization procedure. Lastly, we also notice that Sheep-8 achieved the maximum distance of 14.2 m from the boundary, indicating some discrepancies in the localization process. This could be due to a shorter mission life to retrieve a reliable valid GPS signal, resulting in out-of-bounds signals.

4.7. Average Delay

In this subsection, we demonstrate the average delay for different payload sizes while varying the SF. The average delay per received uplink packet is calculated by dividing the total delay of all the received uplink packets by the number of received uplink packets. The delay of one uplink packet is the time from when the uplink packet is first transmitted until it is successfully received at the LoRaWAN gateway and becomes available to the network server. We consider three payload sizes: (a) 10 bytes, (b) 15 bytes, and (c) 25 bytes. These payload sizes are chosen based on the information we want to send, and also following the maximum allowed payload size of 51 bytes according to the specification when using slow transmissions with SF 12. We consider 10 end devices sending their uplink packets to the network with a 15 min sampling interval for a duration of 7 days. Our results in Figure 12 show an average delay of 10 bytes per payload packet, which increases from 322 ms at SF7 up to 1575 ms at SF12. While the values at SF7 to SF11 for the different payload sizes are comparatively low, we observe a considerably spread at SF12, resulting in a delay of up to 1956 ms for a payload size of 25 bytes. Our results follow the relationship between the time on air (ToA) and the SF. For higher SF, the impact of the payload size on ToA increases.

4.8. Collisions

In this subsection, we analyze and comment on the number of perceived collisions concerning the gateway. The result in Figure 13 shows the collisions at the gateway when considering three different sampling intervals in a 7-day period. Although the number of nodes is relatively small, we were still able to observe some collisions at the network server when varying the packet frequency. The experimental results show that there is a noticeable reduction in collisions when the sampling interval is 15 min, compared to the high packet frequency (every 5 min). When the packet frequency is low (every 15 min), this mechanism helps in providing a better energy usage, a higher reception throughput, and fewer collisions.

5. Discussion

The main goal of this field test is the presentation of GPS for localization and using LoRaWAN for control and monitoring. Modern telecommunications are aimed to provide solutions that are carefully tailored to the specific requirements of the domain. The motivations of our real trial were related to the possibility to control a flock of sheep while also providing appropriate warning to the companies that typically leave hundreds of animals grazing. The collected data will be processed in the cloud to extract relevant information related to the behavior of a single sheep and the flock itself. Many aspects were covered in this interdisciplinary collaboration that was designed not just as a demo, but as a field test, as well as highlighting the specific requirements that qualified the challenge of this future service aimed at improving the quality of life of the operators in the domain and of the animals themselves, considering situations such as car crushes, train accidents, etc.
An LoRaWAN coverage of one of Italy’s most important veterinary campuses was achieved, along with the establishment of a platform that will be extended with future services enabled on the same infrastructure. Many issues, such as the frequency of data acquisition, event-driven (for example, based on accelerations or chance of position) or periodic transmission of data, setup of LoRaWAN parameters, localization precision, power consumption, asset management, ease of use on field by the operating staff, coverage, and lifetime, were considered in the framework of this real experience, starting with a limited number of devices to better maintain control of the many different aspects ranging from periodic recharging of the devices to the visualization of the data. The experience also gave some relevant feedback on the adoption of LoRaWAN in this application domain.
Field tests show that the average PDR in both ADR-enabled and ADR-disabled schemes was over 82.5%, which is efficient when considering a network with these characteristics. From the results given, we can conclude that ADR-disabled networks behave better than ADR-enabled networks with a small number of end devices when considering the packet delivery ratio. We also observe, based on the results, that the use of ADR in LoRa networks has a noticeably positive impact on the energy consumption of the devices in the network, but comes at the cost of the slow convergence of the ADR-enabled scheme to adapt to the changing link conditions, requiring days to converge to energy-efficient communication state. The importance of the ADR mechanism for dynamic and scalable LoRa networks was demonstrated in our research. Despite the fact that the number of nodes required to fully explore the potentials of ADR is quite minimal, our investigations revealed certain variations when ADR is enabled. Our future research will try to expand the pilot study of a small-scale scenario to a larger network with hundreds of nodes, several gateways, and kilometers of areas covered, demonstrating the impact of ADR on scaling and deployment capacity.
When compared to cellular connectivity, the usage of LoRa for communication consumes less energy. With minimum infrastructure, our experimental results show great coverage of the site area. For low data rate demands such as location reports, LoRaWAN configurations have been shown to be cheaper and more convenient than deploying cellular repeaters. Even if the requirements include motion reports with the accelerometer data, our system proves reliable at the expense of extra battery life and bandwidth usage. LoRaWAN also ensures reduced radio-frequency radiation to the animals, which means less heating due to SAR (specific absorption rate). Such power is completely safe, as described in [77]. Other LPWAN technologies, such as Sigfox, use a similar amount of energy, but duty policies allow just 144 messages per day, which is not sufficient when sending messages every 5 min. Two-way satellite communications’ main drawback is associated with power consumption and operation costs (which is quite high if we are sending movement data), and other wireless technologies, such as Zigbee, are not adequate due to higher power consumption, higher difficulties in the management and setup of the infrastructure, and increased problems with respect to scalability.
A lesson learned from this work is regarding the methodology to follow for the design and development of the hardware and software components for the location monitoring system of our livestock in real time. One decade ago, Langendoen et al. [78] wrote a foundational paper listing everything that went wrong in a precision agricultural deployment similar to our use case, which includes board failure, unreliable network communication, high power consumption, etc. In our deployment, low-power devices for IoT applications have substantially evolved and have radically changed the suitability of embedded devices on the field in around one decade. However, although IoT technology has successfully transitioned from the academic to the commercial world, when uncommon use cases are considered, the development and deployment of applications still require accurate customization and complex integration activities, also giving the possibility to detail some of the specific requirements in the domain.

6. Conclusions

This paper has presented a solution for dealing with this problem of lack of established communication infrastructures for controlling the movements of animals from extensive livestock farms. This study describes the development of a Smartsheep location monitoring system based on integration of ad hoc IoT devices, LoRaWAN technology, and cloud computing. The developed system consists of three main parts: (i) the ad hoc IoT device in the form of a wearable that is equipped with inertial sensors, GPS, and an LoRaWAN transceiver to transmit data retrieved from the sensors to the LoRaWAN network, (ii) an LoRaWAN-based communication network that collects data retrieved from the sensors and transmits it to the cloud, and (iii), the cloud solution that ensures a reliable, robust, and secure infrastructure that supports automatic scaling of resources according to the system needs.
To experimentally evaluate the location monitoring system, the system was deployed in the northern part of Italy as a pilot study, evaluating its performance in terms of the network reliability, location accuracy, battery discharge measurement, energy consumption, and delay. Based on the results, the synergy between LoRaWAN technology and GPS technology provided a satisfactory compromise between accuracy, reliability, and energy consumption. In addition, ADR-enabled schemes were compared with ADR-disabled schemes, showing the effect of ADR on energy consumption and packet delivery ratio. This study presented a method to locate and monitor livestock in extensive farming, which also includes the necessity to track the movement of the animals to evaluate their impact on the plant biodiversity, as well as the intention to virtually reduce the distance between the animals and the shepherds.
This work, motivated by the Smartsheep project, will conduct future tests that can be carried out in the mountainous pastures and at a large scale to study the impact of the environment (in terms of high temperature, air humidity, pressure, rainfall, etc.) on the LoRa performance, and propose a suitable propagation model for mountainous pastures from the obtained results.

Author Contributions

The presented work was carried out in collaboration with all of the authors. Conceptualization, M.O.O., M.B. and S.G.; Data Curation, M.O.O. and I.V.; Methodology, M.O.O. and S.G.; Investigation, M.O.O. and I.V.; Visualization, M.O.O.; Resources, I.V. and M.B.; Software, M.O.O.; Formal Analysis, M.O.O.; Writing—Original Draft Preparation, M.O.O.; Writing—Review and Editing, M.O.O. and M.B.; Supervision, M.B. and S.G.; Project Administration, M.B.; Funding Acquisition, M.B. All authors have read and agreed to the published version of the manuscript.


This work was supported by the Smartsheep project, Fondazione Cassa di Risparmio di Cuneo (CRC), Agricoltura 4.0.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.


The authors are grateful for the excellent assistance in the experimental trials by Giovanni Persona and Stefano Nurisso (Teaching Farm of the Department of Veterinary Science (University of Turin, Italy) and Ing Angelo Saccà e Nicola Carlone (IT Department—Innovation Projects office, University of Turin) for the the commitment made in supporting the project.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analysis, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.


  1. Liu, Y.; Ma, X.; Shu, L.; Hancke, G.P.; Abu-Mahfouz, A.M. From Industry 4.0 to Agriculture 4.0: Current Status, Enabling Technologies, and Research Challenges. IEEE Trans. Ind. Inform. 2020, 17, 4322–4334. [Google Scholar] [CrossRef]
  2. De Clercq, M.; Vats, A.; Biel, A. Agriculture 4.0: The Future of Farming Technology. In Proceedings of the World Government Summit, Dubai, United Arab Emirates, 11–13 February 2018; pp. 1–30. [Google Scholar]
  3. Caja, G.; Castro-Costa, A.; Salama, A.A.; Oliver, J.; Baratta, M.; Ferrer, C.; Knight, C.H. Sensing Solutions for Improving the Performance, Health and Wellbeing of Small Ruminants. J. Dairy Res. 2020, 87, 34–46. [Google Scholar] [CrossRef]
  4. Maltz, E. Individual Dairy Cow Management: Achievements, Obstacles and Prospects. J. Dairy Res. 2020, 87, 145–157. [Google Scholar] [CrossRef] [PubMed]
  5. Halachmi, I.; Guarino, M.; Bewley, J.; Pastell, M. Smart Animal Agriculture: Application of Real-time Sensors to Improve Animal Well-being and Production. Annu. Rev. Anim. Biosci. 2019, 7, 403–425. [Google Scholar] [CrossRef] [PubMed]
  6. Bocquier, F.; Debus, N.; Lurette, A.; Maton, C.; Viudes, G.; Moulin, C.-H.; Jouven, M. Elevage de Précision en Systèmes D’élevage Peu Intensifiés. INRA Prod. Anim. 2014, 27, 101–112. [Google Scholar] [CrossRef] [Green Version]
  7. Rutter, S.M. Advanced Livestock Management Solutions. In Advances in Sheep Welfare; Elsevier: Amsterdam, The Netherlands, 2017; pp. 245–261. [Google Scholar]
  8. Isselstein, J.; Jeangros, B.; Pavlu, V. Agronomic Aspects of Biodiversity Targeted Management of Temperate Grasslands in Europe—A Review. Agronomy Res. 2005, 3, 139–151. [Google Scholar]
  9. El Bilali, H.; Allahyari, M.S. Transition Towards Sustainability in Agriculture and Food Systems: Role of Information and Communication Technologies. Inf. Process. Agric. 2018, 5, 456–464. [Google Scholar] [CrossRef]
  10. Greenwood, P.L.; Bishop-Hurley, G.J.; González, L.A.; Ingham, A.B. Development and Application of a Livestock Phenomics Platform to Enhance Productivity and Efficiency at Pasture. Anim. Prod. Sci. 2016, 56, 1299–1311. [Google Scholar] [CrossRef]
  11. Macmillan, K.; Gobikrushanth, M.; Plastow, G.; Colazo, M. Performance and Optimization of an Ear Tag Automated Activity Monitor for Estrus Prediction in Dairy Heifers. Theriogenology 2020, 155, 197–204. [Google Scholar] [CrossRef]
  12. Antanaitis, R.; Žilaitis, V.; Kučinskas, A.; Juozaitienė, V.; Leonauskaitė, K. Changes in Cow activity, Milk Yield, and Milk Conductivity before Clinical Diagnosis of Ketosis, and Acidosis. Vet. Med. Zoot 2015, 70, 3–9. [Google Scholar]
  13. Nóbrega, L.; Gonçalves, P.; Pedreiras, P.; Pereira, J. An IoT-based Solution for Intelligent Farming. Sensors 2019, 19, 603. [Google Scholar] [CrossRef] [Green Version]
  14. Dardari, D.; Conti, A.; Ferner, U.; Giorgetti, A.; Win, M.Z. Ranging with Ultrawide Bandwidth Signals in Multipath Environments. Proc. IEEE 2009, 97, 404–426. [Google Scholar] [CrossRef]
  15. Chen, Z.; Xia, F.; Huang, T.; Bu, F.; Wang, H. A Localization Method for the Internet of Things. J. Supercomput. 2013, 63, 657–674. [Google Scholar] [CrossRef] [Green Version]
  16. Sadowski, S.; Spachos, P. Rssi-based Indoor Localization with the Internet of Things. IEEE Access 2018, 6, 30149–30161. [Google Scholar] [CrossRef]
  17. Cheng, X.; Thaeler, A.; Xue, G.; Chen, D. TPS: A Time-Based Positioning Scheme for Outdoor Wireless Sensor Networks. In Proceedings of the IEEE INFOCOM 2004, Hong Kong, China, 7–11 March 2004; Volume 4, pp. 2685–2696. [Google Scholar]
  18. Khelifi, F.; Bradai, A.; Benslimane, A.; Rawat, P.; Atri, M. A Survey of Localization Systems in Internet of Things. Mob. Netw. Appl. 2019, 24, 761–785. [Google Scholar] [CrossRef]
  19. Cannizzaro, D.; Zafiri, M.; Pagliari, D.J.; Patti, E.; Macii, E.; Poncino, M.; Acquaviva, A. A Comparison Analysis of BLE-based Algorithms for Localization in Industrial Environments. Electronics 2020, 9, 44. [Google Scholar] [CrossRef] [Green Version]
  20. Niculescu, D.; Nath, B. Ad Hoc Positioning System (APS) Using AOA. In Proceedings of the IEEE INFOCOM 2003, Twenty-Second Annual Joint Conference of the IEEE Computer and Communications Societies (IEEE Cat. No. 03CH37428), San Francisco, CA, USA, 30 March–3 April 2003; Volume 3, pp. 1734–1743. [Google Scholar]
  21. Liu, H.; Darabi, H.; Banerjee, P.; Liu, J. Survey of Wireless Indoor Positioning Techniques and Systems. IEEE Trans. Syst. Man Cybern. Part C Appl. Rev. 2007, 37, 1067–1080. [Google Scholar] [CrossRef]
  22. Wang, Y.-P.E.; Lin, X.; Adhikary, A.; Grovlen, A.; Sui, Y.; Blankenship, Y.; Bergman, J.; Razaghi, H.S. A Primer on 3GPP Narrowband Internet of Things. IEEE Commun. Mag. 2017, 55, 117–123. [Google Scholar] [CrossRef]
  23. 3GPP. Evolved Universal Terrestrial Radio Access (E-UTRA). In Technical Specification (TS), 3rd Generation Partnership Project (3GPP), TS 36.321, Version 14.7.0; Technical Report; 3GPP: Valbonne, France, 2018; Available online: (accessed on 1 December 2021).
  24. Lin, X.; Bergman, J.; Gunnarsson, F.; Liberg, O.; Razavi, S.M.; Razaghi, H.S.; Rydn, H.; Sui, Y. Positioning for the Internet of Things: A 3GPP Perspective. IEEE Commun. Mag. 2017, 55, 179–185. [Google Scholar] [CrossRef] [Green Version]
  25. Chen, M.; Miao, Y.; Hao, Y.; Hwang, K. Narrow Band Internet of Things. IEEE Access 2017, 5, 20557–20577. [Google Scholar] [CrossRef]
  26. Hofmann-Wellenhof, B.; Lichtenegger, H.; Wasle, E. GNSS–Global Navigation Satellite Systems: GPS, GLONASS, Galileo, and More, 1st ed.; Springer: Vienna, Austria, 2008; p. 518. [Google Scholar]
  27. Groves, P.D. Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems. IEEE Aerosp. Electron. Syst. Mag. 2015, 30, 26–27. [Google Scholar] [CrossRef]
  28. Vejlgaard, B.; Lauridsen, M.; Nguyen, H.; Kovács, I.Z.; Mogensen, P.; Sorensen, M. Coverage and Capacity Analysis of Sigfox, LoRa, GPRS, and NB-IOT. In Proceedings of the 2017 IEEE 85th Vehicular Technology Conference (VTC Spring), Sydney, Australia, 4–7 June 2017; pp. 1–5. [Google Scholar]
  29. SIGFOX. Sigfox in Agriculture [online]. Available online: (accessed on 1 December 2021).
  30. Ribeiro, G.G.; de Lima, L.F.; Oliveira, L.; Rodrigues, J.J.; Marins, C.N.; Marcondes, G.A. An Outdoor Localization System based on Sigfox. In Proceedings of the 2018 IEEE 87th Vehicular Technology Conference (VTC Spring), Porto, Portugal, 3–6 June 2018; pp. 1–5. [Google Scholar]
  31. Reynders, B.; Pollin, S. Chirp Spread Spectrum as a Modulation Technique for Long Range Communication. In Proceedings of the 2016 Symposium on Communications and Vehicular Technologies (SCVT), Mons, Belgium, 22 November 2016; pp. 1–5. [Google Scholar]
  32. Adelantado, F.; Vilajosana, X.; Tuset-Peiro, P.; Martinez, B.; Melia-Segui, J.; Watteyne, T. Understanding the Limits of LORAWAN. IEEE Commun. Mag. 2017, 55, 34–40. [Google Scholar] [CrossRef] [Green Version]
  33. Ojo, M.O.; Adami, D.; Giordano, S. Experimental Evaluation of a LoRa Wildlife Monitoring Network in a Forest Vegetation Area. Future Internet 2021, 13, 115. [Google Scholar] [CrossRef]
  34. Froiz-Míguez, I.; Lopez-Iturri, P.; Fraga-Lamas, P.; Celaya-Echarri, M.; Blanco-Novoa, Ó.; Azpilicueta, L.; Falcone, F.; Fernández-Caramés, T.M. Design, Implementation, and Empirical Validation of an IoT Smart Irrigation System for Fog Computing Applications Based on LoRa and LoRaWAN Sensor Nodes. Sensors 2020, 20, 6865. [Google Scholar] [CrossRef] [PubMed]
  35. Adami, D.; Ojo, M.O.; Giordano, S. Design, Development and Valuation of an Intelligent Animal Repelling System for Crop Protection Based on Embedded Edge-AI. IEEE Access 2021, 9, 132125–132139. [Google Scholar] [CrossRef]
  36. Codeluppi, G.; Cilfone, A.; Davoli, L.; Ferrari, G. LoRaFarM: A LORAWAN-Based Smart Farming Modular IOT Architecture. Sensors 2020, 20, 2028. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  37. LoRa Alliance Strategy Committee. LoRaWAN Geolocation Whitepaper; Technical Report; LoRa Alliance: Fremout, CA, USA, 2020. [Google Scholar]
  38. Janssen, T.; Berkvens, R.; Weyn, M. Benchmarking RSS-based Localization Algorithms with LoRaWAN. IOT 2020, 11, 100235. [Google Scholar] [CrossRef]
  39. Darroudi, S.M.; Gomez, C. Bluetooth Low Energy Mesh Networks: A Survey. Sensors 2017, 17, 1467. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  40. Woolley, M. Bluetooth Core Specification Version 5.2 Feature Overview; Bluetooth SIG: Kirkland, WA, USA, 2020. [Google Scholar]
  41. Nikodem, M. Bluetooth Low Energy Livestock Positioning for Smart Farming Applications. In Proceedings of the International Conference on Computational Science, Krakow, Poland, 16–18 June 2021; pp. 55–67. [Google Scholar]
  42. Makario, J.; wa MAINA, C. A Bluetooth Low Energy (ble) Based System for Livestock Tracking and Localization. In Proceedings of the 2021 IST-Africa Conference (IST-Africa), South Africa, South Africa, 10–14 May 2021; pp. 1–7. [Google Scholar]
  43. Baronti, P.; Pillai, P.; Chook, V.W.; Chessa, S.; Gotta, A.; Hu, Y.F. Wireless Sensor Networks: A Survey on the State of the Art and the 802.15.4 and Zigbee Standards. Comput. Commun. 2007, 30, 1655–1695. [Google Scholar] [CrossRef]
  44. Huircán, J.I.; Muñoz, C.; Young, H.; von Dossow, L.; Bustos, J.; Vivallo, G.; Toneatti, M. Zigbee-based Wireless Sensor Network Localization for Cattle Monitoring in Grazing Fields. Comput. Electron. Agric. 2010, 74, 258–264. [Google Scholar] [CrossRef]
  45. Nadimi, E.S.; Søgaard, H.; Bak, T.; Oudshoorn, F.W. Zigbee-based Wireless Sensor Networks for Monitoring Animal Presence and Pasture time in a Strip of New Grass. Comput. Electron. Agric. 2008, 61, 79–87. [Google Scholar] [CrossRef] [Green Version]
  46. Raizman, E.; Rasmussen, H.B.; King, L.; Ihwagi, F.; Douglas-Hamilton, I. Feasibility Study on the Spatial and Temporal Movement of Samburu’s Cattle and Wildlife in Kenya using GPS Radio-tracking, Remote Sensing and GIS. Prev. Vet. Med. 2013, 111, 76–80. [Google Scholar] [CrossRef]
  47. Andriamandroso, A.; Bindelle, J.; Mercatoris, B.; Lebeau, F. A Review on the Use of Sensors to Monitor Cattle Jaw Movements and Behavior When Grazing. Biotechnol. Agron. SociÉTÉ Environ. 2016, 20, 273–286. [Google Scholar]
  48. Li, Q.; Liu, Z.; Xiao, J. A Data Collection Collar for Vital Signs of Cows on the Grassland Based on LoRa. In Proceedings of the 2018 IEEE 15th International Conference on e-Business Engineering (ICEBE), Xi’an, China, 12–14 October 2018; pp. 213–217. [Google Scholar]
  49. Panckhurst, B.; Brown, P.; Payne, K.; Molteno, T.C. Solar-powered Sensor for Continuous Monitoring of Livestock Position. In Proceedings of the 2015 IEEE Sensors Applications Symposium (SAS), Zadar, Croatia, 13–15 April 2015; pp. 1–6. [Google Scholar]
  50. Siror, J.K.; Huanye, S.; Wang, D.; Jie, W. Use of RFID Technologies to Combat Cattle Rustling in the East Africa. In Proceedings of the 2009 Fifth International Joint Conference on INC, IMS and IDC, Seoul, Korea, 25–27 August 2009; pp. 1556–1562. [Google Scholar]
  51. Wamuyu, P.K. A Conceptual framework for Implementing a WSN Based Cattle Recovery System in Case of Cattle Rustling in Kenya. Technologies 2017, 5, 54. [Google Scholar] [CrossRef] [Green Version]
  52. Molapo, N.A.; Malekian, R.; Nair, L. Real-time Livestock Tracking System with Integration of Sensors and Beacon Navigation. Wirel. Pers. Commun. 2019, 104, 853–879. [Google Scholar] [CrossRef]
  53. Casas, R.; Hermosa, A.; Marco, Á.; Blanco, T.; Zarazaga-Soria, F.J. Real-time Extensive Livestock Monitoring using LPWAN Smart Wearable and Infrastructure. Appl. Sci. 2021, 11, 1240. [Google Scholar] [CrossRef]
  54. Dieng, O.; Congduc, P.; Thiare, O. Outdoor Localization and Distance Estimation based on Dynamic RSSI Measurements in LoRa Networks: Application to Cattle Rustling Prevention. In Proceedings of the 2019 International Conference on Wireless and Mobile Computing, Networking and Communications (WiMob), Barcelona, Spain, 21–23 October 2019; pp. 1–6. [Google Scholar]
  55. Ma, N.; Pan, L.; Chen, S.; Liu, B. NB-IOT Estrus Detection System of Dairy Cows based on LSTM Networks. In Proceedings of the 2020 IEEE 31st Annual International Symposium on Personal, Indoor and Mobile Radio Communications, London, UK, 31 August–3 September 2020; pp. 1–5. [Google Scholar]
  56. Llaria, A.; Terrasson, G.; Arregui, H.; Hacala, A. Geolocation and Monitoring Platform for Extensive Farming in Mountain Pastures. In Proceedings of the 2015 IEEE International Conference on Industrial Technology (ICIT), Seville, Spain, 17–19 March 2015; pp. 2420–2425. [Google Scholar]
  57. Barbedo, J.G.A.; Koenigkan, L.V.; Santos, P.M.; Ribeiro, A.R.B. Counting Cattle in UAV Images—Dealing with Clustered Animals and Animal/background Contrast Changes. Sensors 2020, 20, 2126. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  58. Aburasain, R.; Edirisinghe, E.A.; Albatay, A. Drone-based Cattle Detection Using Deep Neural Networks. In Proceedings of the SAI Intelligent Systems Conference, London, UK, 3–4 September 2020; Springer: Berlin, Germany, 2020; pp. 598–611. [Google Scholar]
  59. Rivas, A.; Chamoso, P.; González-Briones, A.; Corchado, J.M. Detection of Cattle using Drones and Convolutional Neural Networks. Sensors 2018, 18, 2048. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  60. Webb, P.; Mehlhorn, S.A.; Smartt, P. Developing Protocols for Using a UAV to Monitor Herd Health. In Proceedings of the 2017 ASABE Annual International Meeting, Spokane, WA, USA, 16–19 July 2017; p. 1700865. [Google Scholar]
  61. Li, X.; Xing, L. Use of Unmanned Aerial Vehicles for Livestock Monitoring based on Streaming K-means Clustering. Ifac-Papersonline 2019, 52, 324–329. [Google Scholar] [CrossRef]
  62. Li, X.; Xing, L. Reactive Deployment of Autonomous Drones for Livestock Monitoring based on Density-based Clustering. In Proceedings of the 2019 IEEE International Conference on Robotics and Biomimetics (ROBIO), Dali, China, 6–8 December 2019; pp. 2421–2426. [Google Scholar]
  63. Goolsby, J.; Jung, J.; Landivar, J.; McCutcheon, W.; Lacewell, R.; Duhaime, R.; Schwartz, A. Evaluation of Unmanned Aerial Vehicles (UAVS) for detection of Cattle in the Cattle Fever Tick Permanent Quarantine Zone. Subtrop. Agric. Environ. 2016, 67, 24–27. [Google Scholar]
  64. Nyamuryekung’e, S.; Cibils, A.F.; Estell, R.E.; Gonzalez, A.L. Use of an Unmanned Aerial Vehicle-mounted Video Camera to Assess Feeding Behavior of Raramuri Criollo Cows. Rangel. Ecol. Manag. 2016, 69, 386–389. [Google Scholar] [CrossRef]
  65. Barbedo, J.G.A.; Koenigkan, L.V. Perspectives on the Use of Unmanned Aerial Systems to Monitor Cattle. Outlook Agric. 2018, 47, 214–222. [Google Scholar] [CrossRef] [Green Version]
  66. Ampatzidis, Y.; Partel, V.; Costa, L. Agroview: Cloud-based Application to Process, Analyze and Visualize UAV-collected Data for Precision Agriculture Applications Utilizing Artificial Intelligence. Comput. Electron. Agric. 2020, 174, 105457. [Google Scholar] [CrossRef]
  67. Valecce, G.; Strazzella, S.; Radesca, A.; Grieco, L.A. Solarfertigation: Internet of Things Architecture for Smart Agriculture. In Proceedings of the 2019 IEEE International Conference on Communications Workshops (ICC Workshops), Shanghai, China, 22–24 May 2019; pp. 1–6. [Google Scholar]
  68. Dineva, K.; Atanasova, T. Design of Scalable IOT Architecture Based on AWS for Smart Livestock. Animals 2021, 11, 2697. [Google Scholar] [CrossRef] [PubMed]
  69. Dave, D.; Naik, H.; Singhal, S.; Dwivedi, R.; Patel, P. Towards Designing Computer Vision-based Explainable-AI Solution: A Use Case of Livestock Mart Industry. arXiv 2021, arXiv:2103.03096. [Google Scholar]
  70. Nofence Grazing Technology. Available online: (accessed on 1 December 2021).
  71. Ojo, M.O.; Giordano, S.; Procissi, G.; Seitanidis, I.N. A Review of Low-end, Middle-end, and High-end IoT Devices. IEEE Access 2018, 6, 70528–70554. [Google Scholar] [CrossRef]
  72. Buyya, R.; Broberg, J.; Goscinski, A.M. Cloud Computing: Principles and Paradigms; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2011. [Google Scholar]
  73. Avram, M.-G. Advantages and Challenges of Adopting Cloud Computing from an Enterprise Perspective. Procedia Technol. 2014, 12, 529–534. [Google Scholar] [CrossRef] [Green Version]
  74. Making Sense of IoT Platforms: AWS vs. Azure vs. Google vs. IBM vs. Cisco [online]. Available online: (accessed on 1 December 2021).
  75. Kufakunesu, R.; Hancke, G.P.; Abu-Mahfouz, A.M. A Survey on Adaptive Data Rate Optimization in LoRaWAN: Recent Solutions and Major Challenges. Sensors 2020, 20, 5044. [Google Scholar] [CrossRef]
  76. Finnegan, J.; Farrell, R.; Brown, S. Analysis and Enhancement of the LoRaWAN Adaptive Data Rate Scheme. IEEE Internet Things J. 2020, 7, 7171–7180. [Google Scholar] [CrossRef]
  77. Zook, B.C.; Simmens, S.J. The effects of 860 MHZ Radiofrequency Radiation on the Induction or Promotion of Brain Tumors and other Neoplasms in Rats. Radiat. Res. 2001, 155, 572–583. [Google Scholar] [CrossRef]
  78. Langendoen, K.; Baggio, A.; Visser, O. Murphy Loves Potatoes: Experiences from a Pilot Sensor Network Deployment in Precision Agriculture. In Proceedings of the 20th IEEE International Parallel & Distributed Processing Symposium, Rhodes Island, Greece, 25–29 April 2006; pp. 1–8. [Google Scholar]
Figure 1. Livestock localization taxonomy.
Figure 1. Livestock localization taxonomy.
Sensors 22 00273 g001
Figure 2. System architecture.
Figure 2. System architecture.
Sensors 22 00273 g002
Figure 3. Hardware block diagram.
Figure 3. Hardware block diagram.
Sensors 22 00273 g003
Figure 4. State machine diagram of the device.
Figure 4. State machine diagram of the device.
Sensors 22 00273 g004
Figure 5. Smartsheep system infrastructure and communication flow.
Figure 5. Smartsheep system infrastructure and communication flow.
Sensors 22 00273 g005
Figure 6. LoRaWAN gateway and the sheep area.
Figure 6. LoRaWAN gateway and the sheep area.
Sensors 22 00273 g006
Figure 7. A flock of sheep grazing in a field.
Figure 7. A flock of sheep grazing in a field.
Sensors 22 00273 g007
Figure 8. Convergence time.
Figure 8. Convergence time.
Sensors 22 00273 g008
Figure 9. Average delivery ratio at the network server. (a) ADR disabled; (b) ADR enabled.
Figure 9. Average delivery ratio at the network server. (a) ADR disabled; (b) ADR enabled.
Sensors 22 00273 g009
Figure 10. Energy consumption: (a) ADR disabled; (b) ADR enabled.
Figure 10. Energy consumption: (a) ADR disabled; (b) ADR enabled.
Sensors 22 00273 g010
Figure 11. Battery discharge measurement.
Figure 11. Battery discharge measurement.
Sensors 22 00273 g011
Figure 12. Average delay.
Figure 12. Average delay.
Sensors 22 00273 g012
Figure 13. Collisions perceived by LoRa gateway.
Figure 13. Collisions perceived by LoRa gateway.
Sensors 22 00273 g013
Table 1. Pros and cons of different localization techniques.
Table 1. Pros and cons of different localization techniques.
Localization TechniquesAdvantagesDisadvantages
  • It can provide high localization accuracy.
  • It does not require fingerprinting.
  • Low attenuation.
  • It requires time synchronization between the transmitters and receivers.
  • It might also require time stamps and multiple antennas at the transmitter and receiver.
  • Line of sight is a requisite to achieve good accurate position.
  • It ensures low latency and high performance reliability while processing thousands of received blinks.
  • It can provide high localization accuracy.
  • It does not require fingerprinting.
  • It does not require clock synchronization among the device and the reference node.
  • Low attenuation.
  • It requires clock synchronization among the reference nodes.
  • It might also require time stamps.
  • Large bandwidth is also a requirement.
  • Localization accuracy depends on the signal bandwidth, sampling rate at the receiver, and the existence of direct line of sight between the transmitters and the receiver.
  • It is cost-efficient.
  • It is easy to implement.
  • It is compatible with the majority of the technologies.
  • Low hardware requirements.
  • It is very sensitive to interference, noise, and multi-path fading.
  • It can require fingerprinting.
  • Lower accuracy.
  • It can provide high localization accuracy.
  • It does not require fingerprinting.
  • It might require directional antennas and complex hardware.
  • It is not cost-efficient.
  • It also requires complex algorithms.
  • Performance deteriorates with increase in distance between the transmitter and receiver.
Table 2. A summary of related works.
Table 2. A summary of related works.
Ref.Target AnimalLocalization TechnologiesLocalization MethodCloud InfrastructureNature of Research
[41]CowBLERSSINSPerformance Analysis
[44]CattleZigbeeratiometric vector iteration (RVI)NSPerformance Analysis
[45]CattleZigbeeNSNSUse Case Analysis
[53]CattleGPS + LoRaWANNSYesLaboratory and Field Tests
[54]CattleGPS + LoRaRSSINoPerformance Analysis
[55]CattleNB-IoTNSYesPerformance Analysis
[13]SheepNSRSSIYesPerformance Analysis
[70]GoatGPS + Bluetooth, LTENSNSNS
[56]CattleGPS + SigfoxNSNSPerformance Analysis
[46]CattleGPS + GSMNSNoStatistical Analysis
[52]CattleZigbeeToANoExperimental Analysis
[48]CattleGPS + LoRaNSNoField tests
[61,62]Cattle & SheepGPS + UAVNSNoSimulation tests
NS: Not specified.
Table 3. Sampling intervals.
Table 3. Sampling intervals.
End DevicesSampling Interval
Sheep-15 min
Sheep-310 min
Sheep-515 min
Table 4. Location accuracy.
Table 4. Location accuracy.
Sheep-IAD (m)MD (m)OB (Percentage)
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ojo, M.O.; Viola, I.; Baratta, M.; Giordano, S. Practical Experiences of a Smart Livestock Location Monitoring System Leveraging GNSS, LoRaWAN and Cloud Services. Sensors 2022, 22, 273.

AMA Style

Ojo MO, Viola I, Baratta M, Giordano S. Practical Experiences of a Smart Livestock Location Monitoring System Leveraging GNSS, LoRaWAN and Cloud Services. Sensors. 2022; 22(1):273.

Chicago/Turabian Style

Ojo, Mike O., Irene Viola, Mario Baratta, and Stefano Giordano. 2022. "Practical Experiences of a Smart Livestock Location Monitoring System Leveraging GNSS, LoRaWAN and Cloud Services" Sensors 22, no. 1: 273.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop