Sensing solutions for improving the performance, health and wellbeing of small ruminants

Abstract Diversity of production systems and specific socio-economic barriers are key reasons explaining why the implementation of new technologies in small ruminants, despite being needed and beneficial for farmers, is harder than in other livestock species. There are, however, helpful peculiarities where small ruminants are concerned: the compulsory use of electronic identification created a unique scenario in Europe in which all small ruminant breeding stock became searchable by appropriate sensing solutions, and the largest small ruminant population in the world is located in Asia, close to the areas producing new technologies. Notwithstanding, only a few research initiatives and literature reviews have addressed the development of new technologies in small ruminants. This Research Reflection focuses on small ruminants (with emphasis on dairy goats and sheep) and reviews in a non-exhaustive way the basic concepts, the currently available sensor solutions and the structure and elements needed for the implementation of sensor-based husbandry decision support. Finally, some examples of results obtained using several sensor solutions adapted from large animals or newly developed for small ruminants are discussed. Significant room for improvement is recognized and a large number of multiple-sensor solutions are expected to be developed in the relatively near future.


Introduction
Small ruminant farms are numerous and very diverse (sheep or goat, local breeds, different production purposes and degrees of intensification) as a result of their differences in geographic and socioeconomic conditions (Pulina et al., 2018). This diversity is appreciated by some consumers, who recognize that small ruminant farms contribute to the maintenance of natural habitats and biodiversity. The trend is for traditional small ruminant farms to become more specialized, moving either towards more extensive (all-grass or organic lambs, fine wool) or intensive (dairy sheep and goats) production systems. In both cases, the new farms are characterized by a larger number of animals each of relatively low individual value, a reduced husbandry-staff to animal ratio and tight economic returns (e.g. dairy sheep: Milán et al., 2011). Additionally, and despite the work-force available in some countries, few young workers are attracted to work in the small ruminant sector (Schuh, 2019). Under these conditions, less attention is addressed to individuals and the main husbandry practices are group-oriented and strongly limited by labour availability and cost, all of which may compromise production, health and welfare practice. It should be stressed that, in the context of responsible and sustainable animal production systems, animal wellbeing and good husbandry should be considered as synonymous (Caja et al., 2016). Additionally, the sensing solutions to be employed for small ruminants and the associated management practices should be differentiated from those in large ruminants and take into account the specific needs of sheep and goats, especially since they are often the species of choice for farming under harsher environmental conditions.
Engineering advances and decreasing costs of the new electronic technologies have allowed the development of many sensor-based solutions for the livestock industry (Caja et al., 2016;Halachmi et al., 2019). 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 (Caja et al., 2016;Krueger et al., 2020;Maltz, 2020). This technological approach is currently known as Precision Livestock Farming (PLF). According to Berckmans (2008), PLF consists of 'measuring variables, modelling the data to select information, and then using these models in real-time for monitoring and controlling the animals'. Moreover, sensing solutions are implemented in PLF systems at the level of the smallest manageable production unit, 'sensor-based individual animal' approach . Animal wellbeing is increasingly prioritized by consumers and farmers (Alonso et al., 2020), and the hope is that sensor technologies will elevate welfare assessment and management on livestock farms from the farm-level manual assessments currently in use (reviewed by Krueger et al., 2020) to automated or semi-automated continuous monitoring at individual animal level (Maroto-Molina et al., 2020). There is general agreement that PLF systems are an opportunity to improve the profitability and sustainability of livestock farms, including those of small ruminants under extensive conditions (Bocquier et al., 2014;Rutter, 2017). Nevertheless, the scenario of a large number of animals, low individual profit and relatively high device cost is commonly evoked to justify the current lack of interest for sensor manufacturing companies and to explain the delay in the implementation of PLF systems in small ruminants relative to dairy cows. Furthermore, the unitary prices of the sensing solutions for small ruminants are, in many cases, greater than those developed for large animals because of the needs of miniaturization and the higher production costs associated to lower manufacturing numbers. Additionally, poor technological infrastructures and unreliable services (electricity, telephone and internet networks) available in many small ruminant farms (often located in mountainous and remote areas), also contribute to the few local initiatives and the delay in PLF implementation (Bocquier et al., 2014;Rutter, 2017). This may become more problematic, since, as a further step of automation, sensors used in PLF systems should ideally be connected to platforms that enable artificial intelligence solutions (Internet of Things, IoT and smart networked objects, SNO) as reviewed by Perera et al. (2014) and Michie et al. (2020).
In contrast to true sensor technologies, electronic ID is well established in small ruminants. This originates from the bovine spongiform encephalopathy epidemic of the 1990s and the recognition of related problems (scrapie) in small ruminants. The use of a tamperproof and effective tagging system was required for implementing reliable health and tracing controls in small ruminants, which was non-existent at the time. Based on previous EU research (Caja et al., 1997(Caja et al., , 2004Ribó et al., 2001), the EU made compulsory the use of electronic identification (e-ID) in small ruminants by standardized radio frequency (RF) transponders for most breeding stock (i.e. older than 6 months). Despite regional differences in acceptance and speed of implementation, the use of e-ID proved to be cost-effective in sheep (Saa et al., 2005) and in 2010 was finally fully adopted in the whole EU-28 (Morgan-Davies and Wishart, 2015). Ten years later, the small ruminant stock in the EU-27, the UK and other EU-third countries (estimated to be near 150 M head comprising 89% sheep and 11% goats, Pulina et al., 2018) should all be e-ID tagged and searchable for appropriately designed SNO and IoT platforms at an affordable cost for farmers of approximately €1 per animal. This provides an extraordinary opportunity for the implementation of PLF systems in the small ruminant industry.
Although livestock agriculture is currently poorly penetrated by IoT (4%), expert estimates indicate that the market for sensor devices for livestock monitoring grows 10.9% annually and should reach €2,500 M by 2025, mainly driven by PLF systems implemented in dairy farms (Markets and Markets, 2020). Nearly onefifth and one-third, respectively, of the World and European small ruminant populations are devoted to dairy, in which the investments on e-ID and other technologies has proved to be more easily recovered (Ait-Saidi et al., 2014b). One-half of the global population of 2200 M head of small ruminants is located in Asia (512 M sheep, 556 M goats and a total dairy herd of 241 M; Pulina et al., 2018). These small ruminants are located close to the industrial areas where the new technologies are produced at low prices, which should facilitate the implementation of PLF systems adapted to their local requirements.
On the other hand, there are practical, socio-economic and cultural barriers hindering the adoption of new technologies in small ruminants (Rutter, 2017). The main economic driver for PLF systems in dairy cattle has been oestrus detection, which is not such a high priority for small ruminant farmers. In the case of e-ID for Scottish sheep farmers, despite observing reduced labour and handling time (e.g. recording animal movements and health treatments, sorting animals for sale and breeding), Morgan-Davies and Lambe (2015) reported financial issues (chiefly equipment costs) as the main barrier for implementation. They concluded that financial help for buying the technology, specific demonstrations and training on the use of the equipment and face-to-face meetings, are key measures for increasing the uptake of new technologies. According to the specific scenario and barriers previously described, this Research Reflection reviews the basic concepts as well as many of the currently available sensor solutions, and then describes the structure and elements needed for the implementation of PLF systems in small ruminant farms. Finally, some examples of applications are given to illustrate the possibilities and limitations of sensor solutions for small ruminants.

Architecture of PLF systems
The development of new PLF systems requires the collaboration of a broad range of specialists and expert skills (Caja et al., 2016;Tullo et al., 2017). Innovation is key (Banhazi and Black, 2009;Bocquier et al., 2014), as is a deep understanding of the technological state-of-the-art, the problems requiring solution and the architecture and flow of information involved in the elaboration of decisions and recommended solutions.
Basically, sensing devices used by PLF systems collect inputs from the animal or the environment in real-time, convert them into signals, which are translated into data by sensor algorithms. These data are further validated using gold standards and integrated by detection algorithms. Finally, the validated data are combined with external data (animal production, weather data and forecasts, current costs) and analysed by decision-support models to produce realistic predictions, decisions and, on the basis of economic returns, recommended final solutions (Fig. 1a). PLF systems may use huge databases involving data mining methodologies and artificial intelligence techniques (Michie et al., 2020). It is important to emphasize that, despite the final decision in PLF potentially being made autonomously by the system, PLF systems are conceived to be a tool to help the farmers and their external advisors (managers, nutritionists, veterinarians) and not to replace them for relevant management decisions (Rutter, 2017).
When considering the implementation of PLF systems in small ruminant farms, two distinct management approaches ('extensive-grazing' and 'intensive-indoors') with different requirements and problems have to be considered. In the case of intensive farm conditions, previous research was done on the use of e-ID for semi-automatic milk recording in dairy goats (Ait-Saidi et al., 2008) and dairy sheep (Ait-Saidi et al., 2014a, b). Reported results showed lower errors and labour costs in semiautomatic than in manual systems, depending on operator training, milk recording frequency and herd or flock size.
Labour savings paid between 15% and 70% of the extra costs of voluntary investment in e-ID, whereas for the EU mandatory e-ID scenario the device cost is nil, and the savings paid 100% of the extra costs. Little information is available on the use of PLF systems in small ruminants under extensive conditions. Morgan-Davies et al. (2018) compared sheep flocks managed conventionally or individually (using e-ID) over three years, taking into account factors such as winter feeding of pregnant ewes and summer lamb deworming. They concluded that individual management is economically beneficial (36% labour reduction and 46% anthelmintic reduction, by year).

Sensors
The development of sensors was initially driven by advancements in materials science and engineering (e.g. thermal sensitivity of electrical resistance allowed the production of copper resistors) but nowadays it is applications that drive new development. According to the NRC (1995) a sensor (also named transducer) is an 'input device', which produces an output (signal) with respect to a specific input (e.g. physical, chemical or biological quantity). The term input device means that it is part of a bigger system, which provides different inputs to a control system. Sensors detect any input change (e.g. temperature, pressure, force or electrical quantity) and send it to a microcontroller or microprocessor unit that processes the readable signal produced by the sensor. The NRC (1995) taxonomy distinguishes between 'self-generating' sensors which directly respond to the input (e.g. resistor), 'modulating sensors' which are able to vary their output according to a second input (e.g. fiberoptic magnetic-field sensor), and the so-called 'smart sensors' in which the sensor complexities are concealed by an interface and the output shown as an 'on-chip' signal.
Although the classification of sensors (in the generic sense) differs according to authors, they can generally be grouped into 12 main aim-related types and further into sub-types based on the specific technology used (detailed in online Supplementary  Table S1). Image and sound are two of the most used sensor types in PLF systems because of their low cost but, in their case, it is necessary to precisely define and interpret the variations of the recorded signals by special procedures known as 'labelling' (also named coding). Labelling is usually done by expert manual audio-visual analysis (Tullo et al., 2017) in which the alert signals are related to gold standards (reference measurement or direct observation), and thereafter used to develop the algorithms included in many PLF systems (Rutten et al., 2013;Tullo et al., 2017). Accurate labelling is imperative to develop reliable detection algorithms, which are the core of the decision-making tools in PLF.
PLF sensors are commonly classified by their physical relationship to the animal (Rutten et al., 2013;Caja et al., 2016), categorized as wearable and non-wearable (Table 1). Wearable devices are the chosen option for large and high-yielding animals (e.g. dairy cows), as well as for cheap technologies (e.g. thermometer, accelerometer). Non-wearable devices are commonly used under indoor conditions (e.g. optical and infrared cameras, microphones) and/or for large equipment or more complex and expensive technologies (e.g. electronic scales, 3D cameras). Wearable devices need to be: • wireless, with the ability to communicate the collected inputs to the processing or validating unit • small and compact (e.g. button, bolus) • robust and resistant to harsh environment, to avoid breakages and failures (e.g. chewing by sheep and goat, humidity, corrosion by environment).
Most wearable devices previously developed for dairy cattle are not suitable for small ruminants because of their large size and heavy weight, needing a reduction of from 1 : 2 to 1 : 5 scales. This brings a risk of reduced communication range (because of the smaller antenna size) and life span (because of the lower weight of battery). Currently there is no effective technology for automatically recharging the batteries of wearable animal sensors, and this is a major area for future research.
To appreciate the inherent difficulties in sensor development for small ruminants, it is necessary to have some basic understanding of radiofrequency (RF) communication standards. The RF spectrum is organized into bands, as agreed by the International Telecommunication Union (ITU) and shown in online Supplementary Table S2. Greater frequency (lower wavelength) requires the use of greater energy supply to produce the electromagnetic radiation waves (which may be undesriable), provides greater penetration (usually desirable) and hence is associated with greater potential risk (undesirable). Moreover, penetration depends on the absorption and scattering properties of the material, which are critical for biosensor applications (for example, the absorption of infrared (IR) into skin increases with its water content). Electromagnetic waves may be regarded as damaging radiations for living beings when the frequency surpasses IR (frequency, 3 to 430 THz; wavelength, 1-mm to 700-nm), which includes visible and ultraviolet light (skin damage), radar (cataracts and burns), X-rays (cancer) and γ-rays (killing microorganisms). In this regard, the WHO (2006) concluded that 'considering the low exposure levels and research results collected to date, there is no convincing scientific evidence that the weak radiofrequency signals from base stations and wireless networks cause adverse health effects' (in humans). Nevertheless, it should be taken into account that the distance to the source and body size (e.g. animal or human) affect the total amount of energy received, which should be minimized as much as possible in PLF systems for greater safety.
Animal e-ID uses the low frequency band (LF, very safe), while industrial e-ID and Wi-Fi use higher frequencies (high, ultrahigh and super high respectively HF, UHF and SHF bands) which may have potential safety risks when placed at short distance from the user and/or for long exposures. A critical detail of RF waves is that effective propagation through water requires the use of low frequencies (ELF and VLF bands as used in submarine radio). LF waves produced at low energy supply are generally able to pass through water and animal tissues, although they are only readable at short distances and with large antennas. Nevertheless, this makes possible the use of e-ID as part of a bolus located in the reticulorumen of small ruminants. On the contrary, HF and UHF waves are poorly propagated through water and animal tissues, consequently they are used in external or non-animal sensing devices. Most remote control devices and exterior wearable animal devices (ear tags, collars and pedometers) use UHF frequency for communication (e.g. 860 to 960 MHz) which limits their use inside the body. A possible compromise is to work between 100 and 400 MHz and in practice many commercial devices work between 433.05 and 434.79 MHz frequency as this band is open to use by everyone without license. Remote sensing devices (such as natural light or laser-beam sensors) whose use is expected to increase in the near future (Michie et al., 2020) work at the greatest EHF and THF bands.
In the following sections we will consider the suitability of different types of wearable device for small ruminants. These are summarized in Table 1.

Injectable devices
Glass encapsulated injectable transponders were the first wearable device to be used for the e-ID of small ruminants (Caja et al., 1997), mainly in sheep (Caja et al., 1998;Conill et al., 2002). Caja et al. (2014) reviewed their use in goats. They are passive devices (without battery), which respond with a coded signal when they are activated by the electromagnetic pulses produced by a transceiver (so named reader). Although still recommendable in special cases (for example, experimental use, carcass traceability, wild goats), injectables are currently not advised or are banned (in the UK for example) for commercial small ruminant farm conditions, because of consumer safety concerns resulting from difficult and uncertain recovery at slaughter.
The main applications of injectables in small ruminants are related to telemetric assessment of body temperature as a key indicator of physiological, health, nutritional and wellbeing status. Measuring the body temperature may seem easy, but the use of a rectal thermometer requires restraining the animal, may be unsafe and may produce stress-induced hyperthermia. Sellier et al. (2014) reviewed the use of available temperature sensor subtypes in livestock species, including small ruminants. They differentiated 3 categories, according to sensor and body site measurement: (i) core (rectal, vaginal, tympanic or digestive tract), (ii) mid-peripheral (intramuscular injectables >2 cm depth) and (iii) , temperature values obtained in small ruminants with injectables are lower than those of the core (-1°C to -1.5°C), as well showing poor correlations (r 2 = 0.1 to 0.3). There is general agreement that subcutaneous injectables are not sensitive or precise enough to detect short-term and acute disease-related temperature changes in small ruminants (Goodwin, 1998;Abecia et al., 2015;Kearton et al., 2016).
On the other hand, injectables have also been used as the tagging device for reproductive management (oestrus and mating detection) in sheep and goats (Bocquier et al., 2006). In this case, the transponder is fixed (injected or attached) on the tail region of females, while the male wears a harness carrying a reader designed to be activated when the male mounts the female. Female ID and mating-time are recorded in the reader to be later automatically downloaded into a computer.

Ear tags
Ear tags are the most common wearable device option for e-ID in many countries because of their easy insertion and reading. Because of ear features, tissue consistency and propensity to chewing, ear tag dimensions in small ruminants should be smaller than in cattle or pigs, aiming to prevent ear tearing and ear tag losses. There is a large variability in ear features in small ruminants, which are especially critical for ear tag retention in the case of goats .
The use of a commercial sensor ear tag (eSense Flex, Allflex, Dallas, USA) is currently being researched by one of us in sheep at the CISRA Animal Facility of the University of Turin. The eSense are active PLF devices containing a 3-axial accelerometer designed for measuring rumination and motion activity in cattle (calves and adult). They are powered by a small battery with an expected life span of 3 year and communicate with a reading unit using UHF, being able to cover an area of approximately 200 × 500-m. Because of their material (waterproof plastic case), shape (keychain medal) and dimensions (68 × 38 × 15-mm; weight, 28 g), it was possible to insert eSense devices into the ear of large-sized sheep. A total of 20 Biellese suckling ewes (24 month-old and approximately 80 kg BW), characterized by being lop-eared and of carpet type wool, were ear tagged and monitored for rumination and motion activities every 15 min, during 6 months under indoors conditions. After adapting to the sensor, the ewes were submitted to 3 management stressing events in different experiments followed by washout periods. The events corresponded to common husbandry practices in sheep and were: (i) manure removal and cleaning of the barn, (ii) weaning of the sucking lambs, and (iii) shearing of the flock. No ear or sensor problems (loss of tag, tearing of ear, breakage, failure) were detected during the whole experiment. The results are shown in Figure 2, in which the arrows indicate the moments of the day in which the stress started and ended. The eSense accelerometer showed base line and maximum count repeatable values for rumination and motion activities in the 3 events studied. Moreover, standard errors were low (mean variation coefficients ranged between 35% and 48% for rumination, and between 22% and 33% for motion activity). Sensor analysis was effective for determining significant changes in rumination and motion activity as responses to the stressing events, but also showed marked diurnal variation. Further research will fully define the utility of using this device under on-farm conditions for sheep behaviour monitoring.

Rumen bolus
Rumen boluses are the chosen option for e-ID for small ruminants under tough extensive conditions because of their high retention and tamper-proof features (Caja et al., 2004. Differences of digestive physiology between sheep (selective grazers) and goats (intermediate browsers) justify the need of specific bolus dimensions for each species (Ghirardi et al., 2006;Carné et al., 2011;Caja et al., 2014). Because of their location in the reticulorumen, high performance LF devices are needed. Early studies on active (powered) rumen bolus for measuring gastrointestinal motility in ruminants were developed by Dziuk (1964) and Dougherty et al. (1975) later used similar RF boluses to assess the gastrointestinal motility and pH of experimentally overfed sheep. They reported that the reticulorumen became static when its pH was less than 5; interestingly, the reticulorumen motility and pH returned to normal more quickly in those sheep that survived, indicating the interest of the measurement. Unfortunately, commercially available temperature and pH rumen boluses, which were designed for cattle, are not suitable for small ruminants because of their large dimensions (diameter, 27 to 35 mm; length, 115 to 145 mm; weight, 70 to 240 g). According to previous research on e-ID boluses, the ideal bolus for oral application in small ruminants should be less than 20 × 100-mm and 70 g, with specific gravity greater than 2.5 to warrant its retention in the reticulorumen.
Castro-Costa et al. (2015) used large temperature and pH rumen boluses (27 × 145-mm; 70 g; Khane, Auckland, NZ) in goats. The boluses were inserted through surgery into the rumen of dairy goats (Murciano-Granadina breed, 45 kg BW). They worked in the UHF band (433.9 MHz) and were programmed to collect and store rumen temperatures (0 to 45°C; accuracy, ± 0.08°C) and pH (4.00 to 8.00; accuracy, ± 0.02 units) every 30 min. The boluses were used to assess rumen changes in 2 experiments in dry goats, fed once-a-day and only for 4-h, in which 2 extreme diets (forage-to-concentrate ratio, 70 : 30 vs. 30 : 70) and 2 climatic conditions (thermoneutral, 20 to 23°C day-and-night, vs. heat stress, 37°C-day and 30°C-night), were compared. Despite not detecting differences in the mean rumen temperature according to diet (38.9°C, on average), the bolus showed increases of 0.82°C and 1.25°C at 30 and 60 min postfeeding, respectively. Conversely, differences in the concave daily pattern of rumen pH were seen by diet, values of high-forage goats being greater than low-forage goats for all time points (minimum pH, 6.35 vs. 6.07, respectively). Rumen temperature and pH during the prefeeding 2-h were similar for both diets and because rumen temperature increased while rumen pH decreased during the day after feeding, there was a low negative correlation between them (r = − 0.33). Drinking (4.5 L at 9°C) occurred once-a-day at 6-h after feeding, which produced a marked drop of rumen temperature (−3.4°C and −3.5°C, at 30 and 60 min after drinking, respectively). Rumen temperature needed 6-h to recover after drinking. Temperatures were greater in the rumen than in the rectum (on average, 0.68°C) and a positive correlation (r = 0.91) was detected between the values (Castro-Costa et al., 2015).

Journal of Dairy Research
With regard to the results obtained under thermoneutral or heat-stress conditions, rumen pH of all goats decreased similarly by 0.51 units after feeding, reaching the minimum rumen pH at 3-h postfeeding. Despite being on the same diet, mean daily rumen pH of the heat-stressed goats was lower (−0.12 units) than that of thermoneutral goats, indicating that heat-stress itself induced more acidic environment in the rumen. Rumen temperature pattern was the opposite of that observed for rumen pH, increasing after feeding and slowly decreasing during the night. The heat-stressed goats showed greater rumen temperature (0.3°C) and rectal temperature (0.4°C) than thermoneutral goats before feeding, in accordance with their ambient temperatures. Maximum rumen temperature was greater (0.95°C, on average) than the rectal temperature in the heat-stressed goats and was also greater than the value obtained in the first experiment (Castro-Costa et al., 2015). In short, these experiments validated the principle of using rumen bolus sensors in small ruminants, but further development was needed to create a suitably sized bolus.
Such small-sized rumen boluses, suitable to be orally administered to small ruminants, were recently developed in the University Autonomous of Barcelona (UAB, Bellaterra, ES) and their use in sheep is currently under research by us in Barcelona and Turin. Named BioSens2, these boluses are small (22 × 90-mm; weight, 60 g) and contain a temperature sensing device connected to a microprocessor configured for low power operation by a Li battery (3.6 V, 2.1 Ah, 2/3AA; expected life span 1 year) and programmed to record data every 2 min. The temperature signal from inside the rumen was transmitted by HF (433.4 MHz) to different small receivers placed 5 m from the sheep and provided with removable memory cards (Fig. 1b). Boluses were orally administered by hand (using simple leather gloves) to lactating dairy ewes (Manchega breed, 75 kg BW) in late-lactation, fed a total mixed ration and milked twice daily. Ewes were penned in a climatic chamber and submitted to thermoneutral or heat-stress conditions similar to those previously described (Castro-Costa et al., 2015) according to a cross-over design. Water was freely offered at each ambient temperature. Dry matter intake decreased 20% and water consumption increased 35% in the heat-stressed ewes, whereas milk production did not vary, in comparison to thermoneutral. Rumen temperature changed markedly according to ambient temperature and eating and drinking behaviour (Fig. 3). Although rumen temperatures were similar at the end of the night and early-morning,
when milking and feeding were done, they diverged markedly during the day and for most of the nocturnal period. Mean and extreme rumen temperatures were greater in heat-stressed (40.24 ± 0.01°C; range, 39.49°C to 40.67°C) than thermoneutral (39.71 ± 0.01°C; range, 38.99°C to 40.31°C) ewes, the difference being on average 0.53°C. Interestingly, rumen temperature of the thermoneutral ewes decreased during 3-h after feeding, most likely by effect of drinking after the main meal of the day. This was not observed in the heat-stressed ewes. Drinking bouts were related to drops in rumen temperature in both groups of ewes, although they were more pronounced in the thermoneutral ewes because the water was offered at room temperature. In conclusion, the BioSens2 boluses were safely administered to lactating dairy ewes and were able to detect eating-drinking behaviour and to reflect their thermoneutral and extremely hot ambient conditions. Powell (1968) was the first to use a human pedometer in sheep. Distance walked was greater in daylight hours, although the high variability of the pedometer calibration factor (4% to 44%) and inconsistent results caused by excessive shaking of the ewes in rainy days meant that the method was unreliable. A similar conclusion was obtained by Perz et al. (2016) with 3-axial accelerometers attached to the left hind leg of adult ewes. The values of the pedometer were greater than the visual step counts and the two were poorly correlated (r = 0.03) and consequently, they were considered not adequate for measuring sheep activity. Hobo Pendant G (Onset Computer Corp., Bourne, MA) 3-axial acceleration data loggers were used by Zobel et al. (2015) for monitoring lying behaviour in pregnant Saanen × Alpine dairy goats and Saanen crossbred kids (8 to 12 months old) during 3 weeks. The Hobo Pendants (58 × 33 × 23-mm; weight, 18 g) were attached vertically on the inside of the rear left leg by self-adhesive bandage. This orientation resulted in the x-axis pointing up and the z-axis pointing to the animal's leg; the y-axis did not change because the logger was vertical. Data (64 k) download was done via fast Optic USB interface (HoboWare Pro V3). Goat behaviour was also monitored using video cameras for labelling and validating the measurements. Data loggers accurately measured lying bouts and lying time in adult goats (sensitivity, 99.7%; specificity, 99.5%; false readings, 0.43%) and kids (sensitivity, 99.8%; specificity, 99.4%; false readings, 0.36%), as well as lying laterality (left or right sides) in adult goats under on-farm conditions. Attachment strength was key to avoid logger rotation and errors in laterality, which happened in kids. Adult goats made 16 laying bouts, spent 14.5 h lying-down daily and frequently changed lying side (24 shifts/day). Young goats only made 8 bouts and stayed 8.5 h laying daily. The long lying time of adult goats, which was longer than usually observed in dairy cows, seemed to be because of their late stage of pregnancy.

Pedometers
A later interesting research on the use of 3-axial accelerometers (GCDC X16-mini, Gulf Cost Data Concepts, MS, USA) was performed by Barwick et al. (2018) to discriminate between sound (i.e. unaffected) and lame gait activity in Merino × Poll Dorset ewes (n = 10, 11 months old and 62 kg BW). Accelerometers (50 × 25 × 12-mm and 17.7 g) were deployed attached to a GPS collar (in polycarbonate case), to the cranial side of the left foreleg shin (by self-adhesive bandage) and to large flagged plastic ear tags (by electrical tape). Orientations of the x-, y-, and z-axis were dorso-ventral, latero-lateral and anterior-posterior, respectively. No adverse effects of the accelerometer attachments were detected. Lameness was simulated by banding the front-right hoof and tying its flexed metacarpus to the opposite front-left leg. The simulated lameness system did not produce pain, but the ewes were unable to bear weight on the banded hoof. Activity was monitored by video recording time-synchronized with the accelerometers and classed in 5 behaviour types as sound (walking, standing, grazing and lying) and lame (walking). Lame grazing, standing and lying were excluded because of misclassifications. Accelerometer data were downloaded by appropriate software (XLR8, Gulf Coast Data Concepts). The collar and leg deployed accelerometers failed to classify both soundand lame-walking behaviours. The final classification algorithm model yielded accuracies for lame-walking prediction of 82%, 35%, and 87% for the ear, collar, and leg deployments, respectively. Results indicate that the head bobbing motion, although this may be different in truly lame sheep, provides key information for lameness detection (i.e. greater 3-axis acceleration amplitude). The superiority of the ear tag attachment of accelerometers for all behaviours was also demonstrated (accuracy, 95%; sensitivity, 96%). Because of the reduced step motion of lame-grazing ewes, no differences were detected from sound-grazing ewes. Collar deployment was less suitable for lameness detection in all behaviours. Further research is needed for the implementation of suitable devices to study the behaviour of small ruminants under on-farm conditions.

Collars
To avoid problems of size and excessive weight due to large batteries, PLF devices may also be placed in collars for monitoring small ruminant activity. In this regard, virtual fencing is one of the most desirable PLF systems for extensive small ruminant farms. The term refers to a structure serving as an enclosure or a boundary without providing a physical barrier. Such a system could reduce the very high-fencing costs in difficult terrain, reduce labour in terms of sheep monitoring and give information to improve management (Umstätter, 2011). Early forms of virtual fencing (used in cattle) relied on electromagnetic coupling between a wearable collar and an induction cable either placed on the ground (without poles) or buried to delimit the paddock (Anderson, 2007). Virtual fencing pairs an alert signal (this could be visual, vibration or audio) with a negative stimulus (such as a low intensity, high voltage electric pulse). Through the pairing of the alert and the negative stimulus, the animal learns to avoid the boundaries by responding to the alert signal alone. Nevertheless, there is a high degree of individual variability in the rate of final learning (typically only 50% of animals respond satisfactorily) and on the amount of stimulus needed, most especially in sheep where 4 to 5 stimuli are required. This poses ethical concerns and indicates the need for further research before generalized use (Brunberg et al., 2017;Marini et al., 2018).
Collars are also the preferred option for Global Positioning Systems (GPS), currently used for location (accuracy, 5 to 30 m) of grazing animals as well as for virtual fencing. GPS are active devices that work in the UHF band and have a large energy demand because of their long reading distances. Most PLF systems based on GPS have internet and mobile Apps which are user-friendly interfaces based on common utilities such as Google maps. GPS devices also include accelerometers and temperature sensors to inform and send alarms on the activity and its relationship with the animal (lost device or dead animal). Temperature values are only indicative and they show a large variation according to the animal's features (e.g. long or short fleece, type of wool) and ambient conditions. Use of GPS is recommended under mountainous conditions to monitor grazing, detect predator attacks and to inform on lost or stolen animals. Umstätter et al. (2008) used collars with an automatic sensorbased system of pitch and roll tilt sensors for simple behaviour classification, and these might become a viable option for sheep farmers in some extensive livestock production applications. A virtual fence system based on solar-powered GPS collars has received special interest (NoFence, Beatnfjordsøra, NW). These also include bluetooth, 3-axial accelerometer and mobile phone technology (LTE CAT-M1 with 2 G fallback) for communication (SIM card is required for Tele2 IoT). The collar, which is marketed as cattle, sheep and goat versions, provides GPS position data displayed on an App where the boundary-grazing map is drawn by the farmer. The collar starts emitting warning beeps (40 dB; increasing frequency, 2 to 4.2 kHz) when the animal approaches the virtual boundary, giving the animal the opportunity of turning around. There are 3 warning zones but if the animal remains in the warning zone, an electric mild shock (0.1 J, 4 kV and 0.2 s) is administered 5 to 20s later. When an animal crosses the virtual boundary it is considered as 'escaped' and the beeping and electric shock are inactivated, and a push notification is sent to the farmer through the mobile App. To preserve batteries when the animals are inside a barn, a bluetooth beacon is used to switch-off the collars. First results in Norwegian White and Spael sheep (Brunberg et al., 2013(Brunberg et al., , 2017, showed strong differences in learning ability between animals (9 out of 24, 37.5%) and that the fixed position of virtual boundaries are key for the sheep understanding. The NoFence company claims that the collars are also adequate for free-grazing goats.
It is fair to say that generalized use of GPS devices (costing approximately €150 to €300) and virtual fencing are not currently fully economically viable for extensive small ruminant farms. With the aim of reducing costs, farmers only monitor part (often one-tenth) of the flock or herd grazing under extensive conditions which is not-compatible with an effective virtual fence.
Because behaviour differs between individual animals, the identification of leaders and followers by networking methodologies has been proposed to reduce the number of wearable devices needed to assess the whole flock in practice. With this regard, Maroto-Molina et al. (2019) recently proposed an interesting PLF approach by implementing an IoT-based system in which only some animals of the herd are fitted with GPS collars connected to a low-power wide-area network (LPWAN), while the rest wear Bluetooth ear tags connected to the GPS collars. The authors suggest that the LPWAN allows transmission of small amounts of data (8 to 12 bits) over long distances (10 to 50 km, longer in rural than in urban areas) at low cost (less than €1 per device). They used Sigfox (Labège, FR), a commercial LPWAN working world-wide in free UHF bands (Asia, 433 MHz; Europe, 868 MHz; N. America, 915 MHz). The implemented PLF system consisted of (i) a Sigfox gateway server, (ii) several GPS collars each with a long-range communication module (allowing the transmission of messages every 30 min between collars and server) and a short-range (75 m) communications module based on Bluetooth technology (allowing the collar to receive messages from ear tags every 1 s), both operated by a Li battery pack (weight, 265 g), and (iii) individual ear tags sending Bluetooth advertising signals asynchronously every 1 s, fitted with a coin battery (weight, 25 g). The PLF system (Digitanimal, Madrid, ES) was implemented in 50 Spanish Merino ewes (collars, n = 25; ear tags, n = 25) grazing freely under 'Dehesa' conditions during 100 d. Different collar-tag ratios, which define the cost per animal of the PLF solution, were simulated. Results demonstrated 60% GPS location on average, with values greater than 90% during the night (when the ewes are closer to each other), and it was calculated that 10 GPS collars were enough to monitorize the 25 Bluetooth ear tags (ratio, 1 : 2.5). Estimated annual cost for a 5 years lifespan of devices, was
approximately €20 per ewe which is still probably too expensive for wide utilization in small ruminant farms. A different wearable approach was proposed by Miwa et al. (2015) using the animal's back (behind the withers), as an alternative position for 3-axial accelerometers (USB Accelerometer X6-1A, X6-2, Gulf Coast Data Concepts, Waveland, MS, USA; measurement range, ± 2G) in order to have a 'central body-point' to assess the so called 'Overall Dynamic Body Acceleration' (ODBA). This position avoids the neck's movements when eating or ruminating. They did a comparative grazing study in castrated small ruminants (Corriedale lambs, 37 kg BW; Saanen bucks, 75 kg BW) and adult cows (Japanese Brown, 507 kg BW) under thermoneutral conditions. The ODBA quantifies the 3-axial movement of animals, which is assumed to be a proxy for activity-specific energy expenditures due to the muscular contractions. Moreover, they recorded heart rate (by electrodes) in parallel which, when appropriately calibrated, provides an estimate of the rate of oxygen consumption and the energy expenditure of tested animals, and lying and motion activity by IceTag sensors (IceRobotics, West Lothian, UK) attached to the left hind legs with Velcro straps. They were able to calculate a common equation for heart rate (HR, beats/min) as a function of ODBA (G) and BW (kg), this being: HR = 147.26 × BW -0.141 + 889.64 × ODBA × BW -0.179 (Miwa et al., 2015). Combining this equation with the previously reported energy costs per heart beat (E, kJ/ h = 2.907 × HR 0.516 × BW 0.777 ), they estimated the total energy expenditure in the tested animals. Correlation values were greater with ODBA (r 2 = 0.69 to 0.87) than with number of steps (r 2 = 0.41 to 0.80). The results indicated that ODBA is a good proxy for estimating the energy costs of farm animals across species. Consequently, acceleration loggers are an advisable option in field research and for the evaluation of nutritive requirements of small ruminants under commercial farm and grazing conditions. As shown in Table 1, PLF systems may also be achieved using non-wearable devices. These commonly use large and/or expensive equipment that do not need direct contact with the animal. Moreover, in some cases non-wearable devices actually need distance to make the measurement (e.g. images) or to protect the device from the animal and from adverse environmental conditions such as manure and dust. The main current uses of nonwearable devices in small ruminants are related to optimizing the environmental conditions for improving wellbeing, monitoring individual temperatures to detect health problems or to improve reproduction traits and, finally, weight and body reserves.

Weather and environment monitoring stations
The use of weather stations, combined with indoor sensors, has received special attention recently to monitor the environment of dairy small ruminants in intensive farms, as part of complex PLF systems (Fig. 1). Effects of the environment on small ruminant performance are still not well known, mainly with regard to dairy sheep and goats (Sevi et al., 2009). Special interest is currently addressed to detecting high concentrations of harmful gases (chiefly CO 2 and NH 3 ) inside dairy sheep barns in Spain (G. Caja, unpublished results). Further research on their use under on-farm conditions is needed.

Infrared cameras
Thermal cameras are one of the main handheld devices that are able to provide imaging solutions based on IR radiating energy (heat) for a variety of fields (industrial, medical, security, military). In veterinary applications, temperature changes in a body region are in most cases a result of infection or inflammation, which are linked to vasodilation, increase in local temperature and radiated heat, making thermal imaging a new tool for potential diagnostic use. McManus et al. (2016) reviewed the main uses of IR thermography in animal production and indicated that emissivity (the relative ability to emit infrared energy) of animal surfaces ranges between 0.86 and 0.98 (where a shiny mirror = 0 and a black body = 1).
Thermal imaging has been used in many veterinary applications in small ruminants, including body temperature assessment in sheep and goat (Sellier et al., 2014), as previously discussed. The main applications relate to detection of infective diseases, such as hoof lesions in sheep (Byrne et al., 2019a), bluetongue in sheep (Pérez de Diego et al., 2013), mastitis in dairy ewes (Castro-Costa et al., 2014) but the technique can also potentially be used for oestrus detection in sheep (Barros de Freitas et al., 2018) and goats (Façanha et al., 2018).
Although there was undoubtable value in the use of IR cameras for detecting infected Merino rams showing fever (Pérez de Diego et al., 2013), the results can be more confusing when the infections are local, like hoof lesions (Byrne et al., 2019a) and subclinical mastitis (Castro-Costa et al., 2014). Thus, according to Byrne et al. (2019a) in Texel, Suffolk, Belclare, and crossbred ewes, the best results under experimental conditions (sensitivity, 92%; specificity, 91%) were obtained when the hoof temperature of the infected hooves was 9°C above the average of the five coldest ones in the flock. When the same threshold was used for validation in a different experiment, both values decreased (sensitivity, 77%; specificity, 78%). Nevertheless, thermography could possibly help to detect hoof lesions in practice. On the other hand, Castro-Costa et al. (2014) did not detect differences in the temperature of healthy or subclinically infected udders of Manchega and Lacaune dairy ewes. Nevertheless, the IR camara was able to detect differences in the udder's surface temperature by breed (Lacaune < Manchega, 0.35°C), as well as by machine milking (after >before, 0.13°C; p.m. >a.m., 0.79°C). Moreover, as a response to an E. coli endotoxin challenge by udder half, the udder's temperature was similar between infused and control halves, although vaginal temperature and milk somatic cell count dramatically increased by 6 h postchallenge (approximately, 1°C and 28%), the milk of challenged ewes showing flakes and extremely low lactose content.
There are obviously limitations to using handheld thermal cameras. Following the modernization and the development of more compact drones, which also include thermal cameras, this seems to be the obvious next step to increase the implementation of thermal imaging in PLF systems for small ruminants. Locating lost lambs during lambing season under extensive conditions is an obvious example ('Lambulance', Tasmanian Institute of Agriculture, AU).

Automatically operated sorting gates and weighing scales
Sorting gates and electronic weighing scales are widely used in livestock management, but combined with e-ID readers they allow the automatic collection of weight, which can be done with or without restraining small ruminants using walk-over-weighing (WoW) devices installed in the race-ways. Use of e-ID crates and individual performance monitoring of ewes and targeted selective treatment of lambs with wormers is economically beneficial (36% labour reduction and 46% anthelmintic reduction, by year) as previously cited (Morgan-Davies et al., 2017). González-García et al. (2018) used a WoW device to measure daily changes in weight, and were able to predict hay intake in Romane sheep. They consider that the accuracy may be improved with fresh forage and suggest its use under grazing conditions.
Another interesting application was developed by Byrne et al. (2019b) to detect foot rot (podo-dermatitis) in sheep. The authors developed a hoof-weigh-crate with 4 load platforms to measure the individual hoof load of different sheep breeds with the aim to differentiate healthy (i.e. full weight bearing) from infected hooves (i.e. alleviated weight). Sheep were visually assessed for hoof lesions by independent operators and hoof lesions also categorized according to the measured load values. Sheep with four healthy hooves showed more weight distribution to the front legs than to the rear (60 : 40), but when infected to the same extent, both front and rear hooves carried the same load, irrespective of position. A difference of 4.5 kg was detected between healthy front hooves and those with a mild infection (score = 1), but there was no load difference between healthy and mildly infected rear hooves. The lowest proportion of misclassified hooves (sensitivity, 100%; specificity, 95%) was observed when the contralateral load percentage was used to differentiate between healthy hooves and those with severe foot rot. The results indicate that the hoof-weigh-crate developed by Byrne et al. (2019b) could be used to automatically detect foot rot in sheep under on-farm conditions.

3D Cameras for BCS
Body condition score (BCS) is one of the most useful indicators of small ruminant welfare and it is strongly correlated with most reproductive and lactational performances (Kenyon et al., 2014). Unfortunately, manual BCS assessment is subjective and time consuming, limiting its generalized use in small ruminant farms. In an effort to improve the applicability of BCS, Wickramasinghe et al. (2018) investigated the estimation of BCS using a Microsoft Kinect V2 sensor with Time-of-Flight (ToF) camera to determine depth. The ToF is an active and reflective-optical 3D-method allowing non-contact 3D measurements. Data imaging was analysed by Wickramasinghe et al. (2018) using machine learning techniques to predict BCS in shorn Border-Licester × Merino crossbred ewes in the ranges <2.5, 2.5 to 3.5, and >3.5. In a first phase, images (i.e. lateral, dorsal, posterior) were collected from a sample of freshly-shorn ewes, and the dorsal view was chosen as the region of interest for collecting images and modelling. A new method, based on obtaining vectors at different points on a grid over a 'point-cloud' representing the ewe, was used to define the y-coordinate of the anchor point of the region of interest. In a second phase of the study, manual and automatic BCS were compared in a shorn flock (n = 238 ewes). Inconsistent lighting during image collection and low number of animals in extreme BCS categories made it hard to obtain enough precision in automatic BCS prediction. Current results showed 0.56 precision, on average, depending on BCS (0.22, 0.64 and 0.51, respectively by BCS range).
A system combining automatic weighing and 3D-imaging for small ruminants (OtoP-3D) is under development by the Institute National of Research for Agriculture, Nutrition and Environment (INRAe) and the Livestock Institute (Idele) of France (JM Gautier, unpublished) with the objective of automating the evaluation of phenotypes for improved management efficiency and genetic selection by new traits. Further research is needed to validate the use of these promising technologies in small ruminant practice.

Perspectives
This has not been an exhaustive account of small ruminant sensor technologies. Nevertheless, significant room for improvement is recognized for PLF systems in small ruminants, where numerous types of multiple-sensor solutions are expected to be developed over the next few years both in Asia and in Europe, and both in intensive and extensive systems. Following the 2019 declaration for a smart and sustainable digital future for European agriculture and rural areas, the EU Commission highlighted the advantages and opportunities that the new technologies and digitization offer to improve the sustainability and competitiveness of the agricultural sector. Specific plans of research and development are currently included in the EU Common Agricultural Policy to boost the implementation of PLF systems at national and regional levels. With this regard, a recently granted H2020 EU Research Project (TechCare 2020-2023: Integrating innovative technologies along the value chain to improve small ruminant welfare management), which focuses entirely on sheep (meat and dairy) and goats (dairy), will study the potential of implementing PLF systems in European small ruminant farms (Morgan-Davies et al., 2019).
Sensor technologies will continue their development and relevant improvements should be produced with regard to miniaturization and efficient management of energy, as well as in RF communication and data transmission protocols. These developments will have a direct impact on the increase of reading distances and the amount of information monitored by the PLF systems. Multi-sensor PLF systems will be developed and integrated in innovative sensing solutions, responding to the requirements of farmers and researchers. Use of LPWAN (e.g. Sigfox, Lora), 5 G cellular telephony and space LPWAN connected to terrestrial LPWAN, by using small (50 kg) and cheap satellites (e.g. Teldasat, SAT4M2 M), will solve most current communication problems and provide fast and reliable internet connection on rural and mountainous areas where small ruminants are farmed. Nevertheless, for wide deployment and adoption, PLF systems for small ruminants need to be placed in the market as cost-effective solutions and with user-friendly interfaces for the farmers.

Conclusions
Sheep and goats, most of them already carrying e-ID, should be considered as readable items for IoT platforms and ready for the implementation of PLF systems, especially for the Asian and European scenarios. Although there are significant socioeconomic barriers that explain the current delay of implementation of PLF in small ruminants, there are also many current examples of sensor solutions showing positive impacts on performance, health and wellbeing. Nevertheless, given the diversity of purposes and production systems, no single main sensorsolution can be identified as a priority for small ruminants, and innovative solutions, more than those adapted from other species, are required. Research and farm demonstrations should be considered key aspects for transferring the available technologies from the industrial to agricultural sector, and more specifically to the small ruminant sector.