=Paper= {{Paper |id=Vol-3293/paper54 |storemode=property |title=SpaceSheep: Satellite-aided E-shepherd System |pdfUrl=https://ceur-ws.org/Vol-3293/paper54.pdf |volume=Vol-3293 |authors=Raquel Rainho,Daniel Corujo,Pedro Gonçalves |dblpUrl=https://dblp.org/rec/conf/haicta/RainhoCG22 }} ==SpaceSheep: Satellite-aided E-shepherd System== https://ceur-ws.org/Vol-3293/paper54.pdf
SpaceSheep: Satellite-aided E-shepherd System
Raquel Rainho 1, Daniel Corujo 1 and Pedro Gonçalves 1
1
    Instituto de Telecomunicações and Universidade de Aveiro, Aveiro, Portugal


                 Abstract
                 The use of electronic means to help with tasks such as pastoralism is a way of intelligently
                 optimizing the activity. As any autonomous system, it requires human intervention in case of
                 failure, and therefore it needs an autonomous mechanism that draws the attention of the human
                 operator whenever the system or the animals evolve to undesired conditions. The present work
                 progresses an existing alarm system, used in the SheepIT gateway, which can monitor the
                 behavior of animals and equipment, warning human supervisors of the occurrence of unwanted
                 events and the need for intervention. Concretely, given the lack of coverage of Internet access
                 in rural areas, the system was integrated with a satellite interface to guarantee communication
                 and the timely delivery of alarm messages. The paper compares the overall networking
                 performance of the satellite link, against a Wi-Fi laboratorial baseline.

                 Keywords1
                 Smart-agriculture, Internet-of-Things, Sensors, Satellite


1. Introduction

    The use of ICT Technologies for supporting livestock activities is a strategy that aims to increase
productivity and reduce their environmental impact. By allowing tasks to become automated, the cost
of labor and, consequently, of the final products, is reduced.
    As part of the SheepIT project [1], an autonomous system was developed for the postural
conditioning of ovines used for grazing within a vineyard, without threatening the vines or the grapes.
Using smart collars and beacons, posture data was collected, and actuators allowed for conditioning
measures. Despite being automated, the system requires human supervision to guarantee animal and
crop safety: animals are often attacked and abducted, systems fail or lack maintenance, and often animal
behavior requires supervisory action.
    Tests under the scope of SheepIT [6] demonstrated the importance of liberating the shepherd, both
because the task of guarding animals implies enormous loneliness that renders the profession
unattractive, and because it allows the person to be involved in other agricultural tasks related to the
treatment of the vines, thus, reducing labor cost.
    To free the shepherd and allow him to carry out remote supervision, an application for monitoring
animals and equipment was developed, integrated with the SheepIT gateway. The application monitors
communications from the system's collars and the beacons, [2] sending alarms whenever supervision is
needed.
    The proper operation of an alarm system depends on fast communication so that it is possible to
trigger the necessary corrective measures, which in rural areas is not very easy due to the lack of radio
coverage of WLAN technologies, and sometimes even mobile networks. Presently, several technologies
for extended coverage or Machine-to-Machine (M2M) characteristics exist and are deployed, such as
NB-IoT, Sigfox, and others. However, such solutions are mostly deployed in or close to urban centers,
leaving rural areas with large coverage gaps or without access to all the characteristics needed by M2M


Proceedings of HAICTA 2022, September 22–25, 2022, Athens, Greece
EMAIL: raquel.a.rainho@ua.pt (A. 1); dcorujo@ua.pt (A. 2); pasg@ua.pt (A. 3)
ORCID: 0000-0002-7484-1027 (A. 2); 0000-0002-7696-4231 (A. 3)
              ©️ 2022 Copyright for this paper by its authors.
              Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
              CEUR Workshop Proceedings (CEUR-WS.org)




                                                                                   298
scenarios [3]. As a way of mitigating the lack of coverage, while providing a performance link, the
system documented in this paper was extended with a satellite communications interface, increasing
the alarm generation capability.
   The paper continues in Section 2 with the description of the implemented system, followed by
Section 3 which evaluates its performance in terms of latency of communications and bandwidth
consumed. Section 4 concludes the paper and points out future work.

2. The Architecture of the Electronic Sheepshead

    SheepIT was originally built providing a posture control mechanism that prevents the sheep from
eating the vine leaves and grapes, allowing them to be used for animal-based weeding. The mechanism
was implemented in a collar carried by the animals and integrated in a wireless sensors network (WSN)
that simultaneously monitors the behavior of the animals [4] and localizes them [5]. The WSN includes
a set of fixed nodes, and a gateway that aggregates and filters the information, performs the localization
of animals within the infrastructure, and interconnects the WSN with a cloud-based alarm generation
system.
    While grazing, the animals are tempted to also eat the vine leaves located at a higher height, which
are important for the vineyard. The system, thus, monitors the height at which the animals are eating
leaves, checking for a configured threshold value. Once this maximum height is violated, the system is
activated, and it starts the conditioning process. The analysis over time of the animal behavior [6] shows
that the animal keeps trying to exceed the maximum height, and that the collar is the defense of plants
against animal attack.
    SheepIT’s main use case consists of animal grazing in Adriano Ramos Pinto vineyards, in the Douro
region, where the relief is especially rugged [7], and where cellular communications have irregular
coverage, hindering communications between the WSN and cloud infrastructure, impairing the dispatch
of alarm messages. SheepIT infrastructure was built in order to monitor animal behavior, to transfer the
monitoring data to a system stored in the cloud, allowing for long-term data analysis via the web,
assisting in the determination of trends, or even prediction of behavior.
    The gateway integration (whose internal architecture is illustrated in Figure 1) with the cloud,
required that two tasks were carried out: first, optimizing the encoding of animal monitoring messages
in order to reduce the signallling volume and, second, integrating the satellite communications interface
for sending alarm messages.
    The communication between the gateway and the cloud application was initially implemented
through a RabbitMQ [8] producer API with the information encoded in JSON. To evaluate the best
solution for highly available and fault-tolerant message processing capability, we tested three different
information encoding APIs, namely Apache AVRO [9], MessagePack [10] and Protocol Buffers [11].
    For our experimental network setup we used the EchoStar Mobile satellite network and the Hughes
4200 portable data terminal. The Hughes 4200 acts as a concentrator in the field to which the edge
computing device (collecting data from the SheepIT sensors) is connected to upload data in the SheepIT
cloud service. The use of satellite connectivity enables deployment of SheepIT technology in rural and
remote unconnected areas and guarantees 24/7 smart monitoring.




                                                    299
Figure 1: Internal architecture of the gateway


2.1.    Pasture Alarm System

    The alarm system was implemented in the SheepIT gateway and it monitors the periodic
communications forwarded by fixed WSN beacons, reporting the data sensed by the collars. Those
periodic communications allow the detection of various events of interest related to animal behavior
and health, as well as other events that require prompt intervention by the herd supervisor.
    Alarms can be generated by the gateway or by the cloud system. Table 1 summarizes the types of
alarms generated by the system, the source, the context in which they are generated and size (bytes).
    One of the alarms generated by the system is the detection of the excess of infractions carried out
by an animal, since there are animals that do not accept to be conditioned, and therefore must be
removed from the vineyard.
    Network nodes need battery power to operate, and the system periodically monitors their charge,
and informs the system supervisor, especially about the collar battery charge, as these are the key
elements which guarantee that the animals do not threaten the vineyards. Moreover, the alarm system
triggers an alarm to the supervisor as soon as the battery charge drops below the minimum threshold
set.
    With consequences like those of battery drainage, two other events can happen: equipment failure
and inactivity. The first may be due to the equipment inoperability, in which case it leaves the animal
free to eat whatever it wants, threatening the plants; the second is related to a pattern of sensor-detected
accelerations, which are not very common in the normal behavior of the animals and denotes that the
equipment was abandoned on the ground, leaving the animal free as well.
    The last type of alarm generated locally by the gateway is the panic alarm. In particular, the gateway
continuously compares the accelerations measured by the collars with the baseline of the acceleration
values and for each of the animals present in the system. Thus, it detects herd disturbances, such as herd
interaction with strangers or other animals such as stray dogs.
    The cloud also monitors the herd data received and can generate alarms, for example, signaling a
potential illness due to a continuous decrease in animal activity. As the message is generated in the
cloud, it is not exchanged in the satellite/Wi-Fi links, and thus its size is irrelevant.



                                                     300
Table 1
System alarms
   Alarm      Source                       Alarm context                                 Message size
    type                                                                                   (bytes)
 Battery     Gateway Battery level of the network nodes drops below a                            1134
                     minimum threshold
 Absence     Gateway Network node is no longer detected after several                              1147
                     communication cycles
 Infraction Gateway Animal crosses a threshold of infractions per unit of time                     1161
 Panic       Gateway Pattern of accelerations of herd elements in the same                         1159
                     period is detected
 Inactivity Gateway Pattern of collar inactivity is detected, indicating that the                  1134
                     collar may have fallen off the animal.
 Health      Cloud   Prolonged decrease in activity has been detected for an                        -
                     animal



3. System Evaluation

    The system was functionally validated and tested to characterize its performance in terms of volume
of traffic generated and in terms of latency. During the system tests, a gateway was implemented using
a Raspberry PI 3 Model B+, and the cloud application was hosted in a Ubuntu 20.04.4 LTS server
virtual machine enabled with 8GB RAM and 2 cores, hosted at the datacenter of the Instituto de
Telecomunicações.
    We started by testing the signaling volume produced by each of the interconnection APIs. For the
tests, a simple client of the gateway was used, simulating various amounts of each of the types of alarms,
using each of the encoding APIs, and the signaling volume of the alarm transport messages was
measured through a network sniffer.
    The results illustrated in Figure 2 showed greater efficiency of the MessagePack API, in the transport
of alarm messages.


                               Average message size per alarm type
                                    (10 Collars | 10 Beacons)
                                   MessagePack    Protocol Buffers   Avro

                       1,400

                       1,350
        Size (Bytes)




                       1,300

                       1,250

                       1,200

                       1,150




                                                    Alarm type

Figure 2: Message encoding sizes for different alarms and encoding APIs




                                                    301
  The latency of the system in the transport of alarms was also tested, both in the case of transport via
Wi-Fi and in the case of using the Satellite Link, and the results are illustrated in the plots of Figure 3.


                         WIFI Latency                                            Satellite Latency
                  24.0                                                  1800.0

                  20.0                                                  1500.0




                                                         Latency (ms)
   Latency (ms)




                  16.0                                                  1200.0

                  12.0                                                   900.0

                   8.0                                                   600.0

                   4.0                                                   300.0

                   0.0                                                     0.0
                          1                  100                                      1              100
                              Number of alarms                                        Number of alarms

Figure 3: System latency with Wi-Fi and Satellite connectivity

    Results show a considerably higher latency time for the satellite case, with the difference increasing
along with the size of the messages. In the case of smaller messages, there is a difference in latency due
to the difference in the path taken by the two technologies. For larger messages the total latency value
reaches 1.5 seconds, a value much higher than the necessary in the Wi-Fi connection, that is due to the
bandwidth available in the case of the satellite connection.

4. Conclusions

   The alarmist component in an electronic grazing system like the one developed in the SheepIT
project is essential, to free the human supervisor for other tasks, or simply to free him from an arduous
and lonely task. Present work made possible to implement a system that monitors animals and network
devices, generating and sending a set of alarms, to guarantee the safety of animals and plants.
   Most vineyards are in rural areas, with very low population density, and therefore have poor cellular
coverage, making it difficult to connect to the Internet. In this context, we integrated the gateway with
a satellite interface, thus allowing a means of accessing the Internet, even in very difficult access places
such as the uneven slopes of the Douro region.
   The system was functionally validated to evaluate the communication latency as well as the volume
of signaling produced during its operation. Three information encoding APIs were tested and it was
verified that MessagePack allowed better performance.
   The results made it possible to verify that the values are perfectly acceptable and compatible with
the system alarm function. For future work, we will also consider a LoRaWAN-satellite integrated
environment supported with AI-assisted opportunistic transmission.

5. Acknowledgements

   This work is funded by FCT/MCTES through national funds and when applicable co-funded EU
funds under the project UIDB/50008/2020-UIDP/50008/2020.
   We would like to express as well our thanks to EchoStar Mobile (https://www.echostarmobile.com/)
for allowing us access to their satellite terminal and mobile satellite data services.




                                                     302
6. References

[1] L. Nóbrega, P. Pedreiras, P. Gonçalves, “SheepIT - An electronic shepherd for the vineyards,”
     2017.
[2] L. Nóbrega, P. Gonçalves, P. Pedreiras, and J. Pereira, “An IoT-Based Solution for Intelligent
     Farming,” Sensors, vol. 19, no. 3, p. 603, Jan. 2019, doi: 10.3390/s19030603.
[3] J. Lorincz, Z. Klarin, and D. Begusic, “Modeling and Analysis of Data and Coverage Energy
     Efficiency for Different Demographic Areas in 5G Networks,” IEEE Systems Journal, 2021, doi:
     10.1109/JSYST.2021.3074100.
[4] L. Nóbrega, P. Gonçalves, M. Antunes, and D. Corujo, “Assessing sheep behavior through low-
     power microcontrollers in smart agriculture scenarios,” Computers and Electronics in Agriculture,
     vol. 173, p. 105444, Jun. 2020, doi: https://doi.org/10.1016/j.compag.2020.105444.
[5] R. Guedes, P. Pedreiras, L. Nóbrega, and P. Gonçalves, “Towards a low-cost localization system
     for small ruminants,” Computers and Electronics in Agriculture, vol. 185, p. 106172, Jun. 2021,
     doi: 10.1016/j.compag.2021.106172.
[6] P. Gonçalves, L. Nóbrega, A. Monteiro, P. Pedreiras, P. Rodrigues, and F. Esteves, “SheepIT, an
     E-Shepherd System for Weed Control in Vineyards: Experimental Results and Lessons Learned,”
     Animals, vol. 11, no. 9, p. 2625, Sep. 2021, doi: 10.3390/ani11092625.
[7] T. Andresen, F. B. de Aguiar, and M. J. Curado, “The Alto Douro Wine Region greenway,”
     Landscape and Urban Planning, vol. 68, no. 2–3, 2004, doi: 10.1016/S0169-2046(03)00156-7.
[8] M. Rostanski, K. Grochla, and A. Seman, “Evaluation of highly available and fault-tolerant
     middleware clustered architectures using RabbitMQ,” in Computer Science and Information
     Systems (FedCSIS), 2014 Federated Conference on, 2014, pp. 879–884.
[9] D. Vohra, “Apache Avro,” Practical Hadoop Ecosystem, pp. 303–323, 2016, doi: 10.1007/978-1-
     4842-2199-0_7.
[10] Travers Ching and D. Eddelbuettel, “RcppMsgPack: MessagePack Headers and Interface
     Functions for R”, Accessed: Mar. 21, 2022. [Online]. Available: https://msgpack.org,
[11] G. Kaur and M. M. Fuad, “An evaluation of protocol buffer,” Conference Proceedings - IEEE
     SOUTHEASTCON, pp. 459–462, 2010, doi: 10.1109/SECON.2010.5453828.




                                                  303