Case Study on Recording Pigs’ Daily Activity Patterns with a UHF-RFID System

: The main objective of this paper is the monitoring of daily activity patterns of fattening pigs at di ﬀ erent locations in the housing environment using UHF-RFID. Four hundred fattening pigs were equipped with UHF-RFID ear tags and monitored during the fattening period for about four months. The RFID antennas were installed at the feeding troughs, playing devices and drinkers. A validation phase for each of these locations was carried out prior to the ﬁrst data collection. The sensitivity (true positive rate) of the UHF-RFID system was about 80% at the feeding trough and the playing device and about 60% at the drinkers. The mean of the daily visiting time of all pigs at the trough was about 55 min. The mean visiting duration at the playing device was about 38 min and at the drinkers about 9 min. The visiting times of the pigs showed a high intra- and inter-variability. It was observed that the average visit duration at the feeding trough decreases over the course of a fattening period but increases at the playing device. A documentation of visiting times of animals is possible utilizing RFID systems, allowing a higher data density than video or direct observations.


Introduction
The monitoring of individual animals has been growing in importance due to the rising level of interest in animal welfare. Additionally, the transparency of production methods and product traceability has become more relevant on the consumer side.
Research on the individual behavior of animals is very time-consuming and laborious in the conventional way of direct or video observation. An automatic system monitoring the relevant behavior of pigs at an individual level can lead to a higher data output in a shorter time and is interesting for many different topics. According to Ahmed et al. [1], farm animals express a broad spectrum of behaviors, many of which may be impacted by their health and welfare conditions directly or indirectly. Berckmans [2] stated that continuous direct monitoring of animals can help farmers to control health and welfare issues, but only a few precision livestock farming tools have focused on the animals themselves.
The animals' visits at different locations in the barn (e.g., at the feeding trough) can be registered utilizing radio-frequency identification (RFID) for electronic animal identification [3][4][5][6]. Consequently, a continuous monitoring of daily patterns is possible and leads to a very high data density. The three primary frequency ranges in RFID systems are low frequency (LF: 125 kHz or 134.2 kHz), high frequency (HF: 13.56 MHz) and ultra-high frequency (UHF: 860-960 MHz). All three main frequency bands are currently being used by different research groups for studying animal behavior [7]. According to Brown-Brandl et al. [7], an advantage of UHF-RFID systems is the ability to work as a long-range as a long-range system with a very flexibly adjustable reading range up to 12 m for passive transponders. There are some UHF transponders on the market for cattle, pigs and sheep for use as ear tags but further development is needed to make them less sensitive to the surrounding body tissue [8]. In contrast to LF and HF, UHF-RFID utilizes the simultaneous identification of several transponders inside larger areas or alongside long feeding troughs with a single antenna and without separating individual animals [3,7,9,10], which opens up many different possibilities for research and practice.
The main objective of this paper is to monitor the daily visiting pattern of fattening pigs at different locations in the housing environment using a UHF-RFID system. For this purpose, (1) the accuracy of detection was measured for three different types of locations and (2) the visiting activity of 400 fattening pigs was measured over the entire fattening period of about four months.

Research Barn, Animals and Technical Equipment
Experiments were conducted in a conventional fattening pig barn at the Agricultural Sciences Experimental Station of the University of Hohenheim, Germany, during four fattening periods from August 2016 to November 2018. The barn consisted of two identical compartments each with two pens of the same design but mirrored ( Figure 1). All of the pens were equipped with three nipple drinkers and a metal trough (1.51 m × 0.37 m) with a sensor-controlled liquid feeding system. The feeding was distributed over six feeding times with two doses each, starting at 6 a.m. and ending with the last feeding at 10 p.m. During this time (16 h per day), artificial light was provided in addition to natural daylight. Four mixed-gender groups of 25 fattening pigs each were kept in the four pens in each of the four fattening periods. This resulted in 100 pigs per fattening period and 400 in total. The pigs weighed 30.4 ± 4.1 kg (mean value ± standard deviation: SD) at the beginning of each fattening period and were each fed to a total weight of about 120 kg. There is no data on the final weight for the day of slaughter. The pigs were tagged with UHF-RFID transponder ear tags, which were developed within a previous research project [11,12]. The transponders were equipped with an Impinj Monza 4 ® chip and the antenna was of a planar inverted f-shaped design. The transponders were grouted into flexible plastic ear tags with dimensions of 45 mm × 46 mm (Primaflex ® , Caisley International GmbH, Bocholt, Germany). The part of the ear tag containing the transponder was located at the inside of the The pigs were tagged with UHF-RFID transponder ear tags, which were developed within a previous research project [11,12]. The transponders were equipped with an Impinj Monza 4 ® chip and the antenna was of a planar inverted f-shaped design. The transponders were grouted into flexible plastic ear tags with dimensions of 45 mm × 46 mm (Primaflex ® , Caisley International GmbH, Bocholt, Germany). The part of the ear tag containing the transponder was located at the inside of the pigs' ears. During the fattening periods, the outer parts of the ear tags got chewed on and were in some instances heavily damaged. The inner parts with the transponders remained completely intact. There were no Agriculture 2020, 10, 542 3 of 14 losses or electronic failures of the transponders during any of the fattening periods. The functionality of the transponders was tested before and after the fattening periods.
The places for feeding, drinking and a playing device were equipped with UHF antennas in each of the four pens ( Figure 2). A cable antenna with an active length of 2 m was installed in a horizontal plastic pipe along the feeding trough (Locfield ® , Cavea Identification GmbH, Olching, Germany). The same kind of cable antennas with an active length of 0.35 m were also mounted vertically in plastic pipes at the nipple drinkers. They were installed to the right of the drinkers because the pigs were tagged with the UHF-RFID ear tag in their right ears. A mid-range antenna (MIRA-100, Kathrein Sachsen GmbH, Mühlau, Germany) was installed horizontally, directed downwards to the floor, on the top of the playing device ("Porky Play," Zimmermann Stalltechnik GmbH, Eberhardzell, Germany).
Agriculture 2020, 10, x FOR PEER REVIEW 3 of 13 pigs' ears. During the fattening periods, the outer parts of the ear tags got chewed on and were in some instances heavily damaged. The inner parts with the transponders remained completely intact. There were no losses or electronic failures of the transponders during any of the fattening periods. The functionality of the transponders was tested before and after the fattening periods. The places for feeding, drinking and a playing device were equipped with UHF antennas in each of the four pens ( Figure 2). A cable antenna with an active length of 2 m was installed in a horizontal plastic pipe along the feeding trough (Locfield ® , Cavea Identification GmbH, Olching, Germany). The same kind of cable antennas with an active length of 0.35 m were also mounted vertically in plastic pipes at the nipple drinkers. They were installed to the right of the drinkers because the pigs were tagged with the UHF-RFID ear tag in their right ears. A mid-range antenna (MIRA-100, Kathrein Sachsen GmbH, Mühlau, Germany) was installed horizontally, directed downwards to the floor, on the top of the playing device ("Porky Play," Zimmermann Stalltechnik GmbH, Eberhardzell, Germany). The antennas were connected to five UHF-RFID readers, which were functional models (deister electronic GmbH, Agrident GmbH) with a multiplexer for four antennas. The operating frequency was at 865.7 MHz and the maximum output power was 29 dBm. The communication between reader The antennas were connected to five UHF-RFID readers, which were functional models (deister electronic GmbH, Agrident GmbH) with a multiplexer for four antennas. The operating frequency was at 865.7 MHz and the maximum output power was 29 dBm. The communication between reader and transponder followed EPC class 1, generation 2 specifications defined by ISO 18,000 6C. Regarding the multiplexing process, each of the four antennas was switched on for 250 ms per second, which led to Agriculture 2020, 10, 542 4 of 14 approximately one potential reading for each transponder at any antenna per second. Anti-collision procedures allowed the reader to coordinate the points in time at which the transponders sent their data, so that simultaneous reading of multiple transponders was possible.
The data collection over the four fattening periods lasted between 15 and 19 weeks, depending on the weight gain of the individual pigs. Due to differences in the weight gain (885 ± 112 g/day), some pigs had a shorter fattening period than others. Nineteen out of 400 pigs needed to be removed into another barn before the end of the finishing period because of severe health conditions (e.g., severe lameness or tail biting).
The health status of each individual pig was documented twice a week during the fattening periods. This included lameness (Locomotion Scoring 0 to 3), skin lesions (number of scratches) and skin soiling (scale from 0 to 3 for each side, numbers of soiled areas, such as legs/thighs, belly and side/back), tail lesions (scale from 0 to 2, where 1 was crusts or scratches and 2 open wounds), diarrhea (yes/no) and signs of respiratory infections (coughing, sneezing, shortness of breath). Additionally, the fouling of different sections inside the pen was recorded twice a week (scale from 0 to 3). The individual weights of the pigs were measured every four weeks. The temperature and humidity inside the two compartments were logged by data loggers every ten minutes (testo 175H1, Testo AG).
The experimental procedures were approved by the regional authorities in Baden-Württemberg, Germany, and were carried out in accordance with EU Directive 2010/63/EU for animal experiments (approval code A 409/16 VT).

Validation Phases
A validation of the UHF-RFID system was carried out in the first weeks of the first finishing period with ten focal pigs to test the accuracy of the system and determine the optimal output power for the antennas at each location. A target reading area was defined for each location in one of the pens and cameras enabled visual monitoring at these five locations. The target area for the feeding trough was the trough itself. The target area for the playing device was defined inside a circle around the middle of the antenna (radius r = 43 cm). The target area at the drinkers was within a circle around the nipples with a radius of 40 cm. Perspective distortions on the two-dimensional images were included in the definition of the areas in the video analysis. A focal pig was scored as "in the target area" when its whole head, including both ears, was inside the area defined around each location. It was not differentiated whether the pigs were eating at the trough, playing at the playing device or drinking at the drinkers. Only lying pigs were registered separately at the areas of the playing device and the drinkers when they were not occupied there.
Four different antenna output powers were each tested on two of eight consecutive test days. This was done to ensure that the reading power was not too high or too low at the different locations and the pigs were mainly detected only when they were inside the target areas. The video data was analyzed continuously as an event sampling to record the pigs' visits to each location. For reasons of time efficiency, to determine the best output power for each antenna as fast as possible, for each location and each of the four power settings, only one test day was analyzed for at least 6 h. The RFID-data was compared to the results of the video observation. Sensitivity (true positive rate), specificity (true negative rate), accuracy and precision (positive predictive value) were calculated by comparing video and RFID data to the split second according to common definitions [3,13]. To determine the best antenna output for each location, the results were compared by looking at the highest sensitivity and the highest accuracy with a simultaneously high specificity. For this, the RFID raw data was used as well as an exemplary aggregation of visiting events for each location according to similar studies [3,13]. After this part of the validation had been completed, the determined antenna output power for each location was set for the rest of the trial.
For the determined antenna output power, the validation was extended for each location. The RFID data was aggregated to visiting events according to similar studies [3,13]. Various combinations of minimum visit durations (0, 1, 3 and 5 s) and bout criteria (20,30,40, 50 and 60 s) were tested Agriculture 2020, 10, 542 5 of 14 and compared to the results of the video observation to specify the most appropriate aggregation of the RFID registrations for each location. Again, sensitivity, specificity, accuracy and precision were calculated by comparing video and RFID data to the split second. The video observation was carried out with ten focal pigs on two days with at least 11.5 h of observation time per location and day, resulting in a total observation time between 23.5 and 28 h per location. Regarding the drinkers and the playing device, the events when pigs were lying inside the location area without drinking or playing were excluded from the video data for the analysis.
A second validation was carried out in the second fattening period with ten focal pigs at the feeding trough. This validation was meant to determine whether the performance of the UHF-RFID system changes during the course of a fattening period due to the different sizes of the growing pigs and the influence of the pig mass and ears [8]. Consequently, the video data and the RFID data of one location (the feeding trough) were compared in the same way as above at three different stages of fattening (weight of the focal pigs was 31 ± 4 kg, 86 ± 8 kg and 105 ± 8 kg) from 12:15 p.m. to 10:00 p.m. on two days each (70.5 h in total). The agreement between the time the pigs spent at the trough and the time they were recorded by the RFID system was determined by a Bland-Altman analysis. For this, the differences between those two values are plotted against the respective means. Each dot in the graph ( Figure 3) represents the value of one focal pig at one validation day in the second validation phase. The mean difference and the limits of agreement (mean difference ± 1.96 × SD) are displayed in the graph.
Agriculture 2020, 10, x FOR PEER REVIEW 5 of 13 of minimum visit durations (0, 1, 3 and 5 s) and bout criteria (20,30,40, 50 and 60 s) were tested and compared to the results of the video observation to specify the most appropriate aggregation of the RFID registrations for each location. Again, sensitivity, specificity, accuracy and precision were calculated by comparing video and RFID data to the split second. The video observation was carried out with ten focal pigs on two days with at least 11.5 h of observation time per location and day, resulting in a total observation time between 23.5 and 28 h per location. Regarding the drinkers and the playing device, the events when pigs were lying inside the location area without drinking or playing were excluded from the video data for the analysis. A second validation was carried out in the second fattening period with ten focal pigs at the feeding trough. This validation was meant to determine whether the performance of the UHF-RFID system changes during the course of a fattening period due to the different sizes of the growing pigs and the influence of the pig mass and ears [8]. Consequently, the video data and the RFID data of one location (the feeding trough) were compared in the same way as above at three different stages of fattening (weight of the focal pigs was 31 ± 4 kg, 86 ± 8 kg and 105 ± 8 kg) from 12:15 p.m. to 10:00 p.m. on two days each (70.5 h in total). The agreement between the time the pigs spent at the trough and the time they were recorded by the RFID system was determined by a Bland-Altman analysis. For this, the differences between those two values are plotted against the respective means. Each dot in the graph (Figure 3) represents the value of one focal pig at one validation day in the second validation phase. The mean difference and the limits of agreement (mean difference ± 1.96 × SD) are displayed in the graph. . Agreement between the time the ten focal pigs spent at the trough between 12:15 p.m. and 10:00 p.m. as seen in the video observation and the duration of the aggregated visiting events in this time interval (ten focal pigs, three fattening stages, two observation days each, n = 60). The mean difference is displayed by the solid line and the dashed lines indicate the limits of agreement (mean difference ± 1.96 × SD).

Statistical Analysis
Statistical analysis was carried out with a mixed model for the daily duration of stay at the feeding trough and at the playing device separately (procedure MIXED, SAS 9.4). The fattening period (1-4), the pen (1-4), the fattening stage (day 1-30, day 31-60, day 61-90) and the sex of the . Agreement between the time the ten focal pigs spent at the trough between 12:15 p.m. and 10:00 p.m. as seen in the video observation and the duration of the aggregated visiting events in this time interval (ten focal pigs, three fattening stages, two observation days each, n = 60). The mean difference is displayed by the solid line and the dashed lines indicate the limits of agreement (mean difference ± 1.96 × SD).

Statistical Analysis
Statistical analysis was carried out with a mixed model for the daily duration of stay at the feeding trough and at the playing device separately (procedure MIXED, SAS 9.4). The fattening period (1)(2)(3)(4), the pen (1-4), the fattening stage (day 1-30, day 31-60, day 61-90) and the sex of the pigs were taken as fixed effects. The animals (1-400) were modelled as random effects. A normal distribution of the studentized residuals was confirmed graphically using QQ-plots and residual plots versus predicted values.

Validation Phases
The results of the extended validation in the first fattening period with the optimal output power chosen for all three locations are shown in Table 1. The ten focal pigs each weighed about 35 kg at this time. All results were calculated together for the three drinkers. The combination of visit criteria selected for aggregation of the RFID raw data was a minimum duration of 1 s and a bout criterion of 60 s at the feeding trough, 0 s and 50 s at the drinkers and a minimum duration of 3 s with a 40 s bout criterion at the playing device. The sensitivity was over 80% at the trough and the playing device, and about 60% at the drinkers. At all locations, the precision was between 52% and 65%. The specificity was never less than 97%. The data of the second validation phase at the trough, which was conducted in the second fattening period, was used to compare the aggregated RFID events (minimum duration of 1 s and a bout criterion of 60 s) with the actual visits determined by video observation. Table 2 shows the results of this validation phase. There are small differences in the results of the three stages of fattening and between the two test days of the same fattening stage. The second day in the first fattening stage had lower results. The sensitivity for three pigs was lower than 25%. The lower results in the second day of the third fattening stage are based on the result of one focal pig with a sensitivity of less than 30%. The other pigs had a sensitivity of more than 90% on that day. The agreement of the time the ten focal pigs spent at the feeding trough between 12:15 p.m. and 10:00 p.m. as seen in the video observation in the second fattening period (three fattening stages, two Agriculture 2020, 10, 542 7 of 14 observation days each) and the total duration of the aggregated visiting events during this time is presented in a Bland-Altman plot in Figure 3. In this plot, the differences (video observation-RFID events) are plotted against the means of video observation time and added up duration of aggregated RFID events.
The Bland-Altman analysis indicated the mean difference at −14.4 min. This implies that the duration calculated with the aggregated RFID-data was higher on average than the visiting duration observed in the video data. The limits of agreement are calculated as mean difference ± 1.96 × SD of the mean values and are between −47.1 and 18.3 min (SD 16.7 min). There are four points outside of this area; the value most different from the mean difference is at −73.6 min (difference between the duration of video observation and the duration of aggregated RFID data) with a mean duration of trough visits of 66.8 min.

Visiting Times at Locations
Regarding the analysis of the visiting times, the duration at the different locations was calculated for each pig on each day during the trial using the aggregated RFID visiting events with the minimum duration and bout criteria determined from the validation phase.
The overall mean of the daily visiting time of all pigs at the feeding trough throughout all days over all four fattening periods was 54.9 ± 31.6 min (mean value ± SD). The mean visiting duration at the drinkers was 9.1 ± 11.2 min and at the playing device 38.2 ± 29.0 min. The average daily mean values are grouped by fattening period in Table 3. The mean values showed only minor, and only partly significant differences (p < 0.05) between the different trial periods at the trough and the drinkers. The visiting time at the playing device was a little shorter in the third fattening period compared to the other periods (p < 0.05). The pigs with the lowest and the highest average daily visiting time at the different locations are also shown in Table 3 grouped by fattening period. The average daily visiting time per pig throughout all four fattening periods ranged between 17.5 and 164.5 min at the trough, between 7.7 and 103.8 min at the playing device and between 2.1 and 38.4 min at the drinkers. Table 3. Mean value (MV) and standard deviation (SD) of the daily visiting time of all 400 pigs at the locations over the four different fattening periods as well as minimum and maximum average daily visiting time of single pigs. No common letter within the same column means a significant difference (p < 0.05) between fattening periods. Because of the low sensitivity of the detection of events at the drinkers (about 60% on average) and little overall time pigs spent at this location, the results and discussion will concentrate on the other locations, the trough and the playing device, from now on.

Fattening Period
The daily duration of stay at the feeding trough and at the playing device of all 100 pigs in the first fattening period are shown in Figure 4 as exemplary comparisons between the four different pens. The results for the other three fattening periods were similar (data not displayed). There were only minor differences in the visiting times at the locations between the four groups within a fattening period. In the first period, the daily duration of stay at the trough was significantly different between pen 3 and pen 4 (p < 0.05). At the playing device, the daily duration of stay was different between pen 2 and pen 4 in the first fattening period (p < 0.05). There was no significant difference between the time female or male pigs spent at the trough. Female pigs spent approximately 53.6 min at the trough per day and male pigs about 56.6 min. There was a significant difference in the time they spent at the playing device (p < 0.05). Female pigs spent 38.8 min at the playing device per day on average and male pigs 37.4 min.  The visiting durations at the feeding trough and the playing device of all 400 pigs are shown in Figures 5 and 6, divided into the hours of the day and into three fattening stages until the 90th day, before the first pigs were moved out for slaughter. The six feeding times are clearly visible in the graph, as well as an increased occupation at the playing device in the afternoon times. The average daily duration at the trough decreased with every fattening stage significantly (p < 0.05). The average daily duration at the playing device increased significantly from the first fattening stage to the second (p < 0.05).  The visiting durations at the feeding trough and the playing device of all 400 pigs are shown in Figures 5 and 6, divided into the hours of the day and into three fattening stages until the 90th day, before the first pigs were moved out for slaughter. The six feeding times are clearly visible in the graph, as well as an increased occupation at the playing device in the afternoon times. The average daily duration at the trough decreased with every fattening stage significantly (p < 0.05). The average daily duration at the playing device increased significantly from the first fattening stage to the second (p < 0.05).  The visiting durations at the feeding trough and the playing device of all 400 pigs are shown in Figures 5 and 6, divided into the hours of the day and into three fattening stages until the 90th day, before the first pigs were moved out for slaughter. The six feeding times are clearly visible in the graph, as well as an increased occupation at the playing device in the afternoon times. The average daily duration at the trough decreased with every fattening stage significantly (p < 0.05). The average daily duration at the playing device increased significantly from the first fattening stage to the second (p < 0.05).      1-30 a , day 31-60 b , day 61-90 b ). No common letter means a significant difference (p < 0.05) between fattening stages. With the monitoring of the daily activities, the estimation of daily weight gain using the time spent at the feeding trough could be a possible application for a UHF-RFID system. The pigs were weighed approximately once every four weeks. The average daily weight gain of each of the 400 pigs in the four fattening periods was 885 ± 112 g per day. The average daily visiting time at the feeding trough was compared to the average daily weight gain between two weighing times. The correlation coefficients were not significant with r = 0.018 between weighing time 1 and 2, r = 0.000 between weighing time 2 and 3 and r = 0.004 between weighing time 3 and 4.

Validation Phases
The results of the validation in the first fattening period, as shown in Table 1, are comparable with the results in other similar studies regarding the locations feeding trough and playing device. Adrion et al. [3] achieved a sensitivity of about 56 to 80% with two different UHF-RFID antennas at the trough, which was the same as in this study. The precision was at about 54 to 61% and the accuracy was about 98%. The sensitivity in the study of Maselyne et al. [13] with an HF-RFID system at a round feeder was about 67%, the precision 77% and the accuracy about 96%. Maselyne et al. [6] found that the performance of the HF-RFID system could be increased by using two instead of a single RFID ear tag per pig. However, this would mean higher costs and time investment. Kauselmann et al. [14] observed the visiting times of fattening pigs at a playing device with different enrichment materials and used UHF ear tags available on the market. They also had to use two UHF transponders per pig to achieve a sensitivity of about 71 to 79%.
A minimum sensitivity of 80%, a minimum specificity of 95%, a minimum precision of 70% and a minimum accuracy of 95% should be achieved for validations of such an RFID system to ensure reliable results [7]. In the present study, those values could not always be achieved. The precision was less than 70% for all locations. The value for the specificity is highly dependent on the visiting events at the location or, rather, the absence of RFID events, because it represents the likelihood that a pig that is not at the location is not detected by the RFID system. With a high number of seconds where no visiting event is detected in the video, the accidental registrations at these locations only have a small influence on the specificity [6]. According to Adrion et al. [3], one key issue for the setup of an RFID monitoring system is the precise adjustment of the reading area of the system (antenna-transponder combination) to the observation area. Brown-Brandl et al. [7] concluded that the precision can be a bit lower than the minimum of 70% desired because of the difference in the reading area of the RFID system and the shape of the area observed. If it is necessary to cover the whole observation area with the RFID system, it might lead to an exceedance of the reading area in some directions. This results in more readings outside the observation area and, thus, a lower precision. In the present study, the reading area was not clearly defined especially at the playing device due to the circular antenna field and the fact that the pigs also tend to play in the area around the playing device. This reduces the precision. At the drinkers, the reading area itself was very small. For a better precision at the feeding trough, it could be helpful to reduce the antenna output power.
In the present study, the sensitivity at the drinkers was about 60%. This is not enough to make clear conclusions about the visiting events at the drinkers. Consequently, the drinkers were excluded for most of the data analysis. The pigs' visits at the drinkers are not representative of their water intake in this husbandry system, because, in theory, it is possible to fulfil the pigs' drinking needs with the water in the liquid feeder [15]. Nevertheless, the visiting events at the drinkers and at the other locations could be used for other kinds of analyses, such as the localization or calculation of so-called virtual walking distances [16]. Only the visits to the different locations can generally be recorded by an RFID system. Regarding the time a pig spends at the trough, for example, it might be possible to deduce the time it spends feeding, but it is not possible to record the behavior directly. The smaller the target area, i.e., the area where the RFID antenna should read the transponders, the harder it is to adjust the system precisely.
There is a high potential for the influence of ear tissue and body mass on the reading performance of the transponder ear tags using a UHF-RFID system [3,8]. This can lead to both false positive and false negative registrations [3]. This could be one possible explanation for the high variability between animals and could also explain some of the variation between validation days. Since the ear tags can turn within the ear it is possible that the ear tags of some animals were in an unfavorable position towards the ear, leading to lower reading performance during parts of the validation period. Consequently, it is important to test and validate a UHF-RFID system for growing animals in different stages of their growth. The results in Table 2 show that the performance of the RFID system in this study does not change drastically during the fattening period despite the growing pigs and, therefore, can be used without adjusting to each fattening stage or body mass of the pigs. The results even tend to get better, which could be a result of the growing ears and thus, more tissue that could serve as additional antenna surface for the UHF transponders [8].
The lower results of day 2 in the first fattening stage and day 2 in the third fattening stage can be attributed to one, respectively three, transponders with a poor performance on these days. Eleven out of the 60 values for sensitivity, for example, (10 focal pigs, three fattening stages, two validation days per fattening stage), were under 80% and the rest above. In addition to changing reading performance of the ear tags, which has been discussed before, some events, such as pigs staying right at the border of the reading area with their ear tag in a bad reading position, can create many false negatives. Also the opposite can happen and many false positives can be created by such events, lowering the precision of detection. These daily variations show the importance of having more than one validation day for an RFID system to increase the amount of data and balance these differences. Maselyne et al. [6] also point out that the values for sensitivity and specificity are affected by the behavior of the individual pig. According to them, the RFID registrations are influenced by ranking order, specific feeding behavior and interactions between pigs. The sensitivity of individual tags in their study varied between 37 and 100%. Of course, also technical damage of transponder antennas could cause these differences. However, in this study all transponders remained intact until the end of the fattening periods.
The Bland-Altman plot in Figure 3 shows that the visiting duration at the trough calculated with the aggregated RFID data is higher on average than the visiting duration observed in the video data. This is most probably a result of the aggregation of single RFID readings to events, which fills gaps between registrations and usually prolongs the calculated time the pigs were read at a location artificially. This also explains that with a longer visiting duration at the trough, the difference of the duration of video observation and the duration of aggregated RFID data increases. The SD of 16.7 min is relatively high, regarding the mean difference of −14.4 min. This could occur from the individual behavior of the pigs, the position of the heads and ears, and the way in which the transponder ear tags are positioned. In a good position, the transponder might be read even outside the validation area. The aggregation of RFID data generally improves the overall agreement with the visiting events seen in the videos regarding the sensitivity but often reduces the specificity. It is important to look at all the binary classifiers, especially the sensitivity and accuracy, and to find the best balance in improving these values with the aggregation. Without an aggregation, too many of the pigs' visiting times are usually undetected. Performing a separate validation for each setup environment and each location and determining the best antenna output power and aggregation for each location and perhaps for the specific research question are recommended.

Visiting Times at Locations
The mean value and SD of the daily visiting time of all pigs at the locations and the display of pigs with the lowest and highest average daily visiting time at the different locations in Table 3 point out the high variability of visiting patterns and, thus, presumably behavioral patterns of the individual pigs. This high variability in individual behavior was also observed by other researchers [4,6,17,18]. The mean value of the daily visiting time at the feeding trough in this study is similar to findings in other studies. In fattening period 2, the average duration of stay at the trough was significantly higher than in fattening periods 3 and 4. This could be related to the difference in the time of the year. Fattening period 2 was between January and May, whereas fattening periods 3 and 4 both occurred between June and November. Brown-Brandl et al. [4] found that the average total time spent at the trough starts at about 24 min/day and increases to approximately 77 min/day after day 42. The feeding duration was about 30 min with a SD of 14 min during the 11.5 h of observation in the study of Maselyne et al. [6]. These numbers are always influenced by the husbandry and feeding conditions. Despite all the imperfections of an RFID system, it allows for the documentation of visiting and provides a higher data density than by video or direct observations. It is, for example, possible to compare different feeding methods (dry/liquid, restrictive/ad libitum) with an RFID system regarding the visiting times at the trough or feeding station.
The results in Figure 4 with only minor differences between the pigs of the four different pens were to be expected due to the same husbandry conditions, technical setup and time periods. A difference in the average daily duration of stay at the feeding trough between the pens could not only be caused due to variation between the animals, but might also be an indicator for the farmer to check for technical problems in either the RFID system or the feeding system. Figures 5 and 6 show significant differences in the visiting time at the locations between the three different fattening stages. The average visit duration at the feeding trough decreases over the course of a fattening period but increases at the playing device. The low average visiting time at the trough, the playing device and the drinkers between 11:00 p.m. and 5:00 a.m. indicates that the pigs' activity period lies between 6:00 a.m. and 10:00 p.m., which might be caused by the provided artificial light in the same time period. Kauselmann et al. [14] also found the most activity at the playing device (material dispenser) between 9:00 a.m. and 6:00 p.m., with an average visiting time of 32.6 min per pig during this period, which is comparable to the results in the present study (an average of 38.2 min per pig per day).
The reduced time at the feeding trough during the feeding times in higher fattening stages, as seen in Figure 5, might be due to the faster eating of the bigger pigs. The fact that the time spent eating decreased with the fattening days was also observed by Carcò et al. [19]. They also concluded in their study that faster eating pigs had a significantly greater final body weight.
The increased time spent at the playing device, as seen in Figure 6, is similar to the findings of Stubbe [20] with video observations at an identical playing device and contrary to the fact that pigs tend to lose interest in playing devices over time. One possible explanation is that the biting log is too big for the pigs in early fattening (Figure 2c). With the growth of the pigs, the mouth becomes larger and the possibility to work on the log occurs. Another explanation might be the reduced space per pig in the pen with the growing of the pigs and, thus, the higher likelihood of pigs staying near the playing device.
The development of the average weight of the pigs in the course of all four fattening periodsshowed a normal weight curve compared to those in other studies with the same feeding system [21,22]. Brown-Brandl et al. [4] found a correlation between the weight gain of fattening pigs and the time they spent at the feeding trough. In the present study, there was no agreement between the average daily weight gain of a pig and the average daily visiting time at the feeding trough. Thus, it is not possible to conclude the weight gain of a pig out of its daily visiting time at the trough in this specific system. It might be possible in systems without such a high competition at the feeding station, such as systems with ad libitum feeding, without determined feeding times and with an animal:feeding place ratio of 1:1. Brown-Brandl et al. [4] found a difference between the gilts and the barrows regarding the time they spent at the feeding trough. Barrows spent more time feeding (85 min per pig and day) than the gilts (about 71 min per pig and day). In the present study, there was no significant difference between the time female and male pigs spent at the feeding trough. Female pigs spent about 54 min per day at the trough and male pigs about 57 min.
In summary, the results of the present study show the potential of UHF-RFID technology for monitoring pigs' daily activity patterns to detect e.g., deviations in feeding or playing time, errors of the feeding system or possibly predict weight gain in certain feeding regimes. However, the setup of an RFID system in large commercial barns requires a lot of hardware, which causes high investment and possibly also high maintenance costs as shown by Hammer et al. [23]. Hence, for widespread use of this technology on farms standardized and validated system designs, for example pre-installed in the feeding trough, are a prerequisite.

Conclusions
The results of this study show that the analysis of pigs' visits to different locations in the barn and the monitoring of the daily activity with an UHF-RFID system are challenging but reasonably possible. It is crucial when using RFID systems to carry out a validation for each setup to ensure the validity of the data.
The RFID data displayed a very high variability in the behavior of different pigs. It was shown that the average visit duration at the feeding trough decreases over the course of a fattening period but increases at the playing device. There were only minor differences between the different fattening periods and between the different pens.
Individual animals can be monitored constantly and continuously with this automatically recorded activity data. This offers the possibility for various analyses, especially regarding the activity and health monitoring of individual pigs.

Funding:
The main author received a scholarship for two years during the study as a doctoral candidate from the Faculty of Agricultural Sciences at the University of Hohenheim.