**1. Introduction**

Behavioural research increasingly requires automated recording and analyses of animal movements [1]. This is exemplified by emerging methods for high-throughput monitoring and statistical analyses of movements that enable the quantitative characterisation of behaviour on large numbers of individuals, the discovery of new behaviours, but also the objective comparison of behavioural data across studies and species [2,3]. These quantitative approaches are particularly powerful to study inter-individual behavioural variability or personalities in animal populations [4]. In livestock, for instance, large-scale genetic selection programmes are based on the measurements of several hundreds (if not thousands) of farm animals [5]. Many behavioural tests have been developed to assess

**Citation:** Dore, A.; Pasquaretta, C.; Henry, D.; Ricard, E.; Bompa, J.-F.; Bonneau, M.; Boissy, A.; Hazard, D.; Lihoreau, M.; Aubert, H. A Non-Invasive Millimetre-Wave Radar Sensor for Automated Behavioural Tracking in Precision Farming—Application to Sheep Husbandry. *Sensors* **2021**, *21*, 8140. https://doi.org/10.3390/s21238140

Academic Editors: Yongliang Qiao, Lilong Chai, Dongjian He and Daobilige Su

Received: 2 November 2021 Accepted: 20 November 2021 Published: 6 December 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

personality traits in these animals [6], with some applications in breeding programmes, for instance to discard the more aggressive individuals [7]. However, in these studies behavioural measures are frequently obtained from direct observations by the experimenters or farmers [8], which considerably limits the possibility to quantify behavioural traits at the experimental or commercial farm level.

Animal tracking methods involving on-board devices, such as Global Positioning Systems (GPS) [9], radio telemetry [10], radio frequency identification (RFID) [11] or harmonic radar [12], are hardly suitable for detailed high throughput behavioural phenotyping due to the limited accuracy and duration of measurements. Best available approaches therefore involve image-based analyses [13]. So far however, these techniques often require large computational resources to fit the classification model and to process images [14], and are sensitive to light variation [15]. Moreover, video processing using machine learning is typically limited to the detection of one type of target (e.g., the focal animal species), which means that other potentially important information in the signal (e.g., the presence of a farmer) is ignored.

Recently, Frequency-Modulated Continuous-Wave (FMCW) radars operating in the millimetre-wave frequency band have been proposed for the automated tracking of the behaviour of a large diversity of animals (sow: [16], bees: [17]; sheep: [18]). In this approach, it was shown it is possible to record one-dimensional movements (distance to radar) of individual sheep in an arena test [18]. Tracking animals with FMCW radars has the great advantage of being non-invasive (does not require a tag), insensitive to light intensity variations, and fast (does not require large memory resource). FMCW radars therefore provide considerable advantages for the development of automated high-throughput analyses of behaviour in comparison to more conventional approaches like video and infrared cells. The radar signal processing does not require fitting a model to detect targets, which relaxes the need to collect thousands of data before application. In addition, it offers the possibility to detect targets placed behind a non-transparent wall, which can be used to hide the tracking device, or to study the effect of physical obstacles on an animal's behaviour.

Here we report a millimetre-wave FMCW radar system for the automated tracking and analysis of the 2D trajectories of freely moving animals. We illustrate our approach with the analysis of the movements of 58 sheep in an experimental farm. The measurements were performed during a behavioural test commonly used to estimate the sociability of individual sheep in genetic selection [8,19]. First, we compared the estimate of the sheep position with the radar and standard video tracking and infrared cells. Second, using the radar data we identified new behavioural estimators that could be used for large-scale behavioural phenotyping. Third we showed that the radar system can also operate for long-distance tracking, in the field, by adjusting radar emission frequency and radiated electromagnetic power.

#### **2. Material and Methods**

#### *2.1. Sheep*

We ran the experiments in July 2019 at the experimental farm la Fage of the French National Research Institute for Agriculture, Food, and Environment (INRAE), France (43.918304, 3.094309). We tested 58 lambs (29 males, 29 females) *Ovis aries* with known weight (range: 12–31.3 kg) and age (range: 59–88 days). Ewes and their lambs were reared outdoor on rangelands. After weaning, lambs were reared together outside and tested for behaviour 10 days later. This delay enabled the development of social preferences for conspecifics instead of preference for mother.

All the lambs were previously tested in a "corridor test" to estimate their docility towards humans. Briefly, the test pen consisted of a closed, wide rectangular circuit (4.5 × 7.5 m) with opaque walls [8]. A non-familiar human entered the testing pen and walked at constant speed through the corridor until two complete tours had been achieved. The corridor was divided into 6 virtual areas. Every 5 s, the areas in which the human

and the animal were located were recorded and the mean distance separating the human and the lamb was calculated. The walking human also recorded with a stopwatch the total duration when he could see the head of the lamb to discriminate between fleeing and following lambs. The reactivity criteria towards an approaching human was constructed by combining both distance and duration measurements (for more details see [20]). The higher the resulting variable (i.e., "docility" variable in the present study), the more docile the animal.

#### *2.2. Arena Test*

We measured sheep behaviour in a standard protocol ("the arena test") used to assess the sociability of sheep through measures of inter-individual variability in social motivation in the absence or presence of a shepherd [8,19]. A sheep (focal sheep) was introduced in the pen (2 m × 7 m) (Figure 1A) (for more details see [21]). Three other sheep from the same cohort (social stimuli) were placed behind a grid barrier, on the opposite side of the arena entrance. The test involved three phases (Figure 1B):


**Figure 1.** Corridor test. (**A**) Top view of the focal sheep and the social stimuli in the corridor (example image extracted

from video data). (**B**) Schematic representation of experimental phases 1, 2 and 3. (**C**) Image of the FMCW radar frontend (phot credit AD). Each rectangle corresponds to patch [22]. (**D**) Example of a trajectory of a sheep obtained with radar tracking after removing the clutter and normalizing the estimated value. The red rectangle represent the pen walls. *2.3. Data Collection*  We measured the displacement of the focal sheep in phases 2 and 3 of the arena test (phase 1 is the initiation phase) using three automated tracking systems: (1) infrared sensors, (2) a video camera, and (3) a millimetre-wave FMCW radar. During the measure-**Figure 1.** Corridor test. (**A**) Top view of the focal sheep and the social stimuli in the corridor (example image extracted from video data). (**B**) Schematic representation of experimental phases 1, 2 and 3. (**C**) Image of the FMCW radar frontend (phot credit AD). Each rectangle corresponds to patch [22]. (**D**) Example of a trajectory of a sheep obtained with radar tracking after removing the clutter and normalizing the estimated value. The red rectangle represent the pen walls.

ment, an experimenter also recorded the number of high-pitched bleats by the focal sheep, a proxy of sociability [8]. A proximity score was computed as the time spent in each virtual area weighted according to the virtual area delimited by the infrared receptor in such a

Sets of 2 infrared cells were placed at the height of the sheep's body and every meter along the arena test to define 7 virtual areas of 1 m. Analyses of the data resulting from the activation of the infrared cells by the sheep were performed with Fortran algorithms to compute longitudinal displacements of the sheep in the device.

## *2.3. Data Collection*

We measured the displacement of the focal sheep in phases 2 and 3 of the arena test (phase 1 is the initiation phase) using three automated tracking systems: (1) infrared sensors, (2) a video camera, and (3) a millimetre-wave FMCW radar. During the measurement, an experimenter also recorded the number of high-pitched bleats by the focal sheep, a proxy of sociability [8]. A proximity score was computed as the time spent in each virtual area weighted according to the virtual area delimited by the infrared receptor in such a way that a high score indicated high proximity to conspecifics [20]. Crossing rate measured the number of virtual areas crossed during arena test phases 2 and 3.

#### *2.4. Video and Radar Tracking*

We compared the efficiency of the radar system and standard video tracking for monitoring the 2D movements of the sheep. For the video tracking, we placed a camera on one end of the arena (opposite to entrance side, Figure 1B). The camera was elevated 2 m above ground in order to film the entire arena, producing black and white images of size 720 p × 576 pixels every 25 ms. Sheep movements were tracked in 2D. For image processing, we applied a detection algorithm using the state-of-the-art image object detector tiny-YOLO V3 (You Only Look Once) network, which is a version of the YOLO model adapted for faster processing allowing 244 images of 0.17 mega pixels (416 × 416 pixels) per second (on a TITAN X graphics card) [23]. This Convolutional Neural Network (CNN) was pre-trained on the PASCAL Visual Object Classes Challenge dataset [24]. YOLO detected all the objects on the image, including the focal sheep, possibly some parts of the background and the human when entering inside the arena. To differentiate between the sheep and non-sheep detected objects, we used another CNN, Alexnet, that we parameterized using transfer learning [25]. A set of 40 sheep and 40 non-sheep images were used to re-train the network. Finally, for some images the focal sheep was not detected, especially when it was located at the opposite of the camera. In these cases, the location of the sheep was extrapolated by continuing the trajectories with a constant speed between the two known locations.

For the radar tracking, we placed a millimetre-wave FMCW radar (Figure 1C, see technical characteristics in Table 1) at one end of the arena test (i.e., entrance side, Figure 1B). The radar was setup outside of the test pen behind a Styrofoam wall transparent to millimetre-waves [26]. The transmitting antenna array radiated a repetition over time of a so-called chirp (i.e., a saw-tooth frequency-modulated signal [27]). The chirp was backscattered by the targeted focal sheep, but also by the surrounding scene which provides undesirable radar echoes called the electromagnetic clutter. The total backscattered signal was then collected by the receiving antenna array and processed to mitigate the clutter and to derive the sheep 2D trajectory from radar data. In the millimetre-wave frequency range, the detectability of the sheep depends mainly on the bandwidth of the frequency modulation, the beamwidth of the radar antennas, and the radiated electromagnetic power [27].

Processing of radar data included two main steps. First, we extracted the position of the animal. Next, we computed behavioural parameters to characterize the movement of the animal. We extracted the distance of the focal sheep to the radar and its direction in the horizontal plane of the scene. To mitigate the electromagnetic clutter, we estimated the mean value and standard deviation of the radar signal in absence of the sheep and we derived the signal, denoted by *D*, from the signal *S* delivered by the radar in presence of the animal, as follows:

$$D(t, r, \theta) = \frac{S(t, r, \theta) - mean(r, \theta)}{std(r, \theta)}$$

where *r* is the radar-to-sheep separation distance, *mean* is the time-averaged radar signal at the range *r* and angular position *θ*, *std* is the time-standard deviation of the radar signal. Figure 1D shows an example of position estimations of a sheep over time after removing the electromagnetic clutter.

#### *2.5. Extraction of New Behavioural Parameters Form the Radar Data*

We used the radar estimated 2D trajectories to extract new behavioural parameters characterizing sheep movements using three approaches.
