<figure><img src="image_1.png" /></figure>

HAL
open science

# Accelerometer technology to perform precision feeding of pregnant sows and follow their health status

Michel Marcon, Marie-Christine Meunier-Salaün, M. Le Mer, Y. Rousselière

► To cite this version:

Michel Marcon, Marie-Christine Meunier-Salaün, M. Le Mer, Y. Rousselière. Accelerometer technology to perform precision feeding of pregnant sows and follow their health status. 8. European Conference on Precision Livestock Farming (ECPLF), Sep 2017, Nantes, France. hal-01591149

HAL Id: hal-01591149

https://hal.science/hal-01591149

Submitted on 20 Sep 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution - ShareAlike 4.0 International License
Accelerometer technology to perform precision feeding of pregnant sows
and follow their health status

M. Marcon¹, M.C. Meunier-Salaün², M. Le Mer³, Y. Rousselière¹

1,2 Unité Mixte Technologique Ingénierie des Systèmes de Production Porcine

¹IFIP-Institut du Porc, BP 35104, 35651 Le Rheu cedex, France

²INRA-Agrocampus Ouest, UMR1348 PEGASE, 35590 Saint-Gilles, France

³RF-Track, Espace Gallium, 80 Av des Buttes de Coësmes, 35700 Rennes,
France

michel.marcon@ifip.asso.fr

Abstract

Two trials were conducted at experimental stations of IFIP, located in Romillé
(France, Trial 1), and INRA, located in Saint Gilles (France, Trial 2), on
pregnant sows equipped with individual ear tag accelerometers to record their
activity level: duration of lying, standing and moving sequences. The first trial
involved 72 sows penned on a slatted floor in a dynamic group with connected
drinkers and automatic feeders, whereas the second trial was carried out on 4
small groups of 6 sows penned on a concrete floor with straw and fed in
individual stalls. Firstly, an algorithm was built from video recordings of 24
sows on the slatted floor (2 x 2 h sequences per sow, 96 h). Secondly, the
accuracy of the algorithm was assessed by recording and sequencing 96 h and
109 h, respectively, on the slatted floor and concrete floor with straw. The
respective sensitivities of the lying, standing and moving behaviours on the
slatted floor were 94.4%, 66.9% and 68.4%. With straw, lower sensitivity values
were found: 93.65% for lying, 68.35% for standing and 38.83% for moving,
linked to more investigative behaviours using the head. The final step was to use
these data to improve the feeding practices of pregnant sows, taking their activity
level into account. The strong inter- and intra-individual variability shown in the
physical activity is a limiting factor for detection of health problems, such as
lameness, through the accelerometers. Thus we need additional information,
especially the behaviour data generated by identified drinkers and automatic
feeders.

**Keywords:** Sow, precision feeding, physical activity, accelerometer, sensor

Introduction

The individual level of sow activity affects their body condition and food needs,
and may be a good health indicator (Noblet et al., 1993, 1994; Quiniou, 2016).
Noblet et al. (1994) showed that the energy used by a standing sow is twice that used in a lying position. Thus, if the physical activity level of a sow can be assessed, it becomes feasible to adjust the feeding plan to compensate for the energy expended by each sow and to achieve better homogeneity of back fat thickness in the herd. Several studies have shown that accelerometer sensors can be a good tool for measuring the activity of a sow (Ringgenberg et al., 2010, Cornou et al., 2011, Ramonet and Bertin, 2015). However, the sensor must be robust and accessibility must be low to circumvent the high motivation of pigs to investigate any substrate available in the pen or conspecific (Studnitz et al, 2007). The positioning of the sensor on the neck or leg could be a limiting factor for widespread use in pig barns. A possible position is the sow's ear where the sensor is more protected. This position was chosen for the accelerometer to measure animal activity. The aim of this paper is to (i) create an algorithm which is capable of determining three sow states (lying, standing and moving) and (ii) evaluate the quality of measurement under two conditions (dynamic group of sows penned on a fully slatted floor and small groups of 6 sows penned on straw).

# Materials and methods

## Animals and housing conditions

To meet the objectives of the project, three trials were established. The first (Trial 1) focused on algorithm development, and the other two were carried out to evaluate the accuracy of the sensor for sows in two flooring conditions: on a fully slatted floor (Trial 2) and on a concrete floor with a thin straw layer (Trial 3).

Trial 1 took place at the IFIP experimental station in Romillé, (France) using Landrace x Large White crossbreed sows, with erect or drooping ears. The pregnant sows were housed in a large dynamic group of 72 sows (three batches), in a pen measuring 226 m² and equipped with two automatic feeders (AF) and 6 connected drinkers (CD). Six groups of four sows are selected randomly from the 72 sows in order to build the algorithm.

Trial 2 also took place at Romillé using 10 sows with a similar breed and housing conditions as those in trial 1. They were chosen according to different litter rank and activity level defined by the number of visits to the AF and/or CD. Trial 3 was conducted on 24 Large-White X Landrace crossbred sows, penned in 4 groups of six and fitted with accelerometers on the ears as in trials 1 and 2. Each group was penned in an area measuring 18 m², on a concrete floor with straw and equipped with 6 feeding stalls which only opened during the two daily meals. Every morning the pens were cleaned and fresh straw supplied while sows were fed in the feeding stalls.
## Animal activity assessment

To build the algorithm (trial 1), 24 sows at mid-gestation were simultaneously equipped with accelerometers and video recorded (cameras: National Electronics and a video tape recorder: Geutebrück) twice during a two-hour period (10:00-12:00 and 14:00-16:00). Ninety-six hours of video were considered, and in order to observe a variety of behaviours, especially investigative behaviours such as playing with a chain or exploring on the floor, the selected sows were introduced into a new area equipped with chains. The posture of the animals was continuously recorded with reference to four states: lying down, sitting, standing up, and moving (standing up in motion). The activities associated with each state were not recorded. As a result, a standing sow chewing a chain was not "moving" as long as its legs were not displaced. The start and end time of each state was noted.

To assess the accuracy of the algorithm in trial 2, two video recording sessions (18-31 March 2016 and 11 April-9 May 2016) provided 96 additional hours of video acquired on 10 sows (different from the sows in trial 1). Video recordings were taken using five cameras for monitoring sows all over the room with continuous recordings during diurnal periods. The video sequencing related to the same four states as in trial 1 and took place over four 1h time periods: 8:30-9:30; 11:30-12:30; 14:30-15:30; 17h30:18h30, which were chosen to be representative of the main diurnal activity of sows.

For the assessment of accuracy in trial 3 on small groups of sows penned on a concrete floor with straw, 12 sows at mid-gestation were chosen (3 per group) according to their behavioural activity, exhibited at a high level during three hours (9-11h, 14-15h) and representative of high physical activity within groups. A total of 103 hours were considered for the analysis.

## Accelerometer sensors

Two types of accelerometer were used. In the first trial, the accelerometer data logger (RF-Track, Rennes) prototype recorded acceleration levels on three axes in space with a frequency of 16 Hertz. The raw data were stored on a micro SD card. A second version double accelerometer datalogger was used in trials 2 and 3, including a device with radiofrequency (RF) transmission of processed data by the embedded algorithm in a microcontroller. Ultimately, we obtained three types of signal: the first was the acceleration within the 3 axes (x,y,z), the second the video sequencing and the third a cleaned raw signal (Fig.1).
<figure><img src="image_3.png" /><figcaption>Figure 1: Signal analysis methodology</figcaption></figure>

These prototype sensors were autonomous and battery powered. The accelerometers were fixed on an identification ring using a plastic self-locking collar (Fig. 2). The new tags equipped with accelerometers were attached to the sow's ear, assuming that the accelerometer was positioned on the inner face of the ear.

<figure><img src="image_4.png" /><figcaption>Figure 2: Location of the experimental prototype accelerometer</figcaption></figure>

In order to synchronise accelerometer data with video recording, the operator rotated the sensor three times in front of one of the five cameras before attaching it to the animal.

### Accuracy of algorithm assessment:

The quality of the algorithm was evaluated separately for the different states, analysing the correspondence between the state indicated by the algorithm and the state observed by real-time video analysis. To do this, we used the binary classification test with sensitivity and specificity calculation. Sensitivity is the
true positive rate which measures the proportion of positives correctly identified (Fig. 3). The specificity, or true negative rate, measures the proportion of negatives that are correctly identified. Finally, the accuracy measures the global exactitude.

<table><caption>Figure 3: Confusion matrix</caption><thead><tr><th rowspan="2"></th><th rowspan="2">Total population</th><th colspan="2">Predicted condition (n second predicted by sensor)</th></tr><tr><th>Prediction positive</th><th>Prediction negative</th></tr></thead><tbody><tr><th rowspan="2">True condition (n second given by video)</th><td>positive condition</td><td>True positive (TP)</td><td>False negative (FN)</td></tr><tr><td>negative condition</td><td>False positive (FP)</td><td>True negative (TN)</td></tr></tbody></table>

$$ \text{Sensitivity} = \frac{TP}{TP+FP}; \text{Specificity} = \frac{TN}{TN+FN}; \text{Accuracy} = \frac{TN+TP}{TP+FP+TN+FN} $$

To achieve good sensitivity and specificity, we needed to have perfect synchronisation between the accelerometer data and the video sequences. Indeed, we worked on a time base expressed in seconds. So the total population for a trial lasting 96 hours was 345 600 (96 hours * 3 600 seconds).

## Results

### Recordings of sows

Of the 96 hours and 109 hours of sequential video recordings and accelerometer data from trial 2 and 3, respectively, we excluded the sitting behaviour from the analysis. This posture was rarely observed (Trial 2: 1.6% and Trial 3: 2.45% of the recorded time, Table 1) and the algorithm did not allow recognition of this type of behaviour which is intermediate between the lying or standing position and thus generates confusing data. Therefore, to perform our analysis, we used 94 hours and 27 minutes of data for trial 2 and 87 hours and 48 minutes for trial 3.

<table><caption>Table 1: Relative share of different states over trial 2 and 3 (% of recorded time)</caption><thead><tr><th>States</th><th>Time proportion trial 2</th><th>Time proportion trial 3</th></tr></thead><tbody><tr><td>Lying</td><td>66.57</td><td>22.69</td></tr><tr><td>Standing</td><td>28.21</td><td>68.92</td></tr><tr><td>Moving</td><td>3.61</td><td>5.94</td></tr><tr><td>Sitting</td><td>1.61</td><td>2.45</td></tr></tbody></table>

<figure><img src="image_5.png" /></figure>
## Algorithm accuracy

The algorithm was able to predict the lying position (sensitivity 94.3% and 89.1%, respectively, for trials 2 and 3) with very high accuracy (Table 2). Specificity analysis confirmed these results with values of more than 83% for the slatted floor and 96% for sows penned with straw. For the standing state, the results were limited, as shown in Table 2; standing sensitivity was around 67% in both trials but the specificity remained good with 94.1% and 75.9% in trials 2 and 3, respectively. For the moving state, there was a large difference between the slatted floor and straw. In the second trial, sensitivity was near 70% and specificity up to 94%, while with straw, the sensitivity value decreased to 41.4%. More generally, the global accuracy was better with data from trial 2 (84.2%) than from trial 3 (69.2%).

<table><caption>Table 2: Binary classification within the two trials (%)</caption><thead><tr><th rowspan="2">State</th><th colspan="3">Trial 2</th><th colspan="3">Trial 3</th></tr><tr><th>Lying</th><th>Standing</th><th>Moving</th><th>Lying</th><th>Standing</th><th>Moving</th></tr></thead><tbody><tr><td>Sensitivity</td><td>94.3</td><td>66.9</td><td>68.4</td><td>89.1</td><td>67.5</td><td>41.4</td></tr><tr><td>Specificity</td><td>83.2</td><td>94.1</td><td>93.7</td><td>96.2</td><td>75.9</td><td>78.3</td></tr><tr><td>Accuracy</td><td></td><td>84.2</td><td></td><td></td><td>69.2</td><td></td></tr></tbody></table>

## Discussion

Two major hypotheses can explain the fact that better results were observed for sows penned on a fully slatted floor than for sows penned with straw. Firstly, the algorithm was developed using only sows penned on a slatted floor and should be better adjusted to this kind of environment. Secondly, sows penned on a floor with straw exhibited high levels of investigation at ground level and the straw produced a higher number of head movements. Since the accelerometer sensor is fixed on an ear tag, any head movements, even when the sow was not walking, could be analysed as a moving state.

Nevertheless, with regard to the total time spent "lying" in the different trials (66.57% and 22.69%) and because the specificity is very good for evaluation of whether a sows is lying or not, it is likely that the sensitivity will increase over a full day's analysis. In fact, as the sows can sleep for at least 60% of the daytime, we suggest that trial 3 overestimates the standing time. The next step will be to calculate the accuracy over a 24-hour period.

In a recent study Ramonet and Bertin (2015) reported a sensitivity of 98.8% and a specificity 99.8% (lying or not), which was higher than in our results, with accelerometers fixed to the legs of the animal. Sensor position is a real issue. When sensors are fixed to the leg (Ringgenberg & al., 2010) or around the neck
(Cornou & Lundbye-Christensen, 2008) of a sow, it is easier to determine its state (lying, standing or walking), but it is difficult to transfer this system into commercial breeding. Indeed, the device was manipulated by the other sows in the group so good protection is needed, for instance using repulsive lotion, or it will be necessary to accept the loss of some sensors.

With European implementation of group-housed sows during gestation, sows have more opportunities to move freely in the pen, promoting increased activity levels, linked in particular to social interactions in dynamic groups when new sows are introduced or to competition for access to the automatic feeder (Spoolder et al, 2009). The development of precision feeding according to the energy expended individually by each sow should improve feeding management within the sow herd. In addition, identification of potential health state indicators, based on the onset of changes in physical activity, can be a useful way of managing herd health, which is generally more difficult to assess in a big dynamic group of sows. Therefore, in our study we accept a decrease in accuracy when using ear tag accelerometers in order to develop a version that is suitable for on-farm use.

## Conclusion

The accuracy of ear tag accelerometers appears to be good enough to assess the energy expended by a sow according to its physical activity level. The results showed that the sensitivity of the ear tag sensor was higher than 90% on average for sows lying or standing (on a fully slatted floor or on a concrete floor with straw). However it is clearly difficult to determine whether the sow is walking or not due to numerous technical noises (head movements, repeatability and duration of the signal, etc.). These issues are even more evident in housing conditions with the provision of straw, which generates a high level of straw-directed investigation behaviour, which tricks the algorithm. The accelerometer is designed to work more efficiently on sows housed in groups on a slatted floor. Further investigations are needed to evaluate the expected gains in the homogeneity of sow back fat thickness reserves when the individual activity level is taken into account.

## Funding and acknowledgement

This project is co-financed by the IFIP-Institut du porc, INRA, Rf-track, the Chambres d'agriculture de Bretagne, and the French government: Ministère de l'agriculture et de la forêt. It is one of the winners of the call for proposals CASDAR Research & Technology.
References

Cornou C., Lundbye-Christensen S., 2008. Classifying sows' activity types from acceleration pattern an application of the multi-process Kalman Filter. Appl. Animal Behav. Sci., 111, 262-273.

Cornou C., Lundbye-Christensen S., Kristensen A. R., 2011. Modelling and monitoring sows' activity types in farrowing house using acceleration data. Comput. Electron. Agric., 76, 316-324.

Noblet J., Shi X.S., Dubois S., 1993. Energy cost of standing activity in sows. Livest. Prod. Sc., 34, 127-136.

Noblet J., Shi X.S., Dubois S., 1994. Composantes de la dépense énergétique au cours du nycthémère chez la truie adulte à l'entretien: rôle de l'activité physique. Inra. Prod. Anim., 7, 135-142.

Quiniou N., 2016. Une activité motrice coûteuse en énergie. Tech Porc, 29, 18-19.

Ramonet Y., Bertin C., 2015. Utilisation d'accéléromètres pour évaluer l'activité physique des truies gestantes logées en groupes. Développement de la méthode et utilisation dans six élevages au DAC. Rapport d'étude. Chambres d'agriculture de Bretagne, 12 p.

Ringgenberg N., Bergeron R., Devillers N., 2010. Validation of accelerometers to automatically record sow postures and stepping behaviour. Appl. Anim. Behav. Sci., 128, 37-44.

Spoolder HAM., Geudeke MJ., Van der Peet-Schwering CMC., Soede, NM., 2009. Group housing of sows in early pregnancy: A review of success and risk factors. Livestock Science, 125, 1-14.

Studnitz M., Jensen MB., Pedersen LJ., 2007. Why do pigs root and in what will they root? : a review on the exploratory behaviour of pigs in relation to environmental enrichment. Applied Animal Behaviour Science 107, 183-197.