Using Passive Infrared Detectors to Record Group Activity and Activity in Certain Focus Areas in Fattening Pigs

Simple Summary Pigs are important livestock for meat production. Because of rising demand for animal products from housing systems that enable high standards of animal welfare, solutions must be found to record and assess welfare parameters. Pigs have a wide behavioral repertoire and fixed daily routines, which offers an opportunity to detect deviations from normal behavior as a measure of welfare. In this study, we evaluated the use of passive infrared detectors (PID) for measuring group activity and activity in certain focus areas in a pen of fattening pigs. PIDs can be used to measure activity by detecting thermal changes between moving bodies and the infrared radiation they emit compared to the background. For evaluation, the data of the detectors were compared to human observation to see if the technique is able to represent the behavioral patterns of the animals correctly. The results indicate that PIDs are suitable for recording the activity of a group of pigs in a pen as well as in clearly definable areas, such as the trough. Such activity profiles obtained initial conclusions to be drawn about resting, stress, and activity phases, which can be used combined with other factors like the air temperature to assess animal welfare. Abstract Animal behavior is an important aspect in the assessment of animal welfare. Passive infrared detectors (PID), detecting thermal changes to measure activity, have already been used to record data on the behavior of groups of animals. Within this study, the suitability of these detectors for the collection of activity profiles for focused areas is further investigated. The aim was to record the activity of a group of eleven fattening pigs in a pen, as well as the activity in the five functional areas for resting, feeding, drinking, exploration, and elimination. In order to evaluate the data obtained, the behavior was video recorded for visual assessment. In addition, relevant indoor environment parameters were recorded (ammonia, air temperature, and relative humidity). For the measurement of activity by PID, strong correlations from up to r = 0.87 (p < 0.01) could be found compared to visual assessment. The results indicate that activity changes during the day and activity in defined functional areas can be recorded using PIDs. These data combined with data of climate-related sensors could serve the farmer as a monitoring tool for early detection of behavioral changes or serve as partial aspect within a Weak Point Analysis within external on-farm consulting.


Introduction
Consumers are increasingly interested in the well-being of farm animals [1,2], and food quality is also defined by animal welfare and not exclusively by the quality of the end product itself [2,3]. be focused on specific areas of the pen to monitor behavioral changes. Furthermore, results of other studies already indicate how important and useful it is to relate measured barn climate parameters or indoor air quality such as airborne dust levels, heat, moisture, carbon dioxide or NH 3 emissions to animal activity [16,21,30,31].
Therefore, this study focused on the following three aims: • Further verification of PIDs for their suitability to record the activity of a group of fattening pigs within the pen in order to obtain information on behavioral changes during the day; • Determining whether it is possible to obtain information on behavioral changes not only at group level in general but also in specific functional areas of the pen by focusing PIDs; • Verification of the relationship between indoor environment parameters and the activity pattern of the focused animal group.

Animals and Housing
The trial was carried out on the educational and research center Frankenforst (Königswinter-Vinxel, Germany) of the Agricultural Faculty of the Rheinische Friedrich-Wilhelms-University Bonn. The experimental period covered one fattening cycle of 105 days and extended from March to July 2019 in a forced ventilated fattening stable. The measurements were focused on 11 weaned and docked pigs housed in a 6.00 × 2.54 m pen (see Figure 1) with partly slatted concrete floor and a metal lattice as the partition wall for additional structuring. The focus pen does not border on any side directly on another pen. It is located at the beginning of the compartment and on the other side, a delimited area of 2.00 m width, in which the data loggers were accommodated, separates it from the neighboring pen. other studies already indicate how important and useful it is to relate measured barn climate parameters or indoor air quality such as airborne dust levels, heat, moisture, carbon dioxide or NH3 emissions to animal activity [16,21,30,31]. Therefore, this study focused on the following three aims: • Further verification of PIDs for their suitability to record the activity of a group of fattening pigs within the pen in order to obtain information on behavioral changes during the day; • Determining whether it is possible to obtain information on behavioral changes not only at group level in general but also in specific functional areas of the pen by focusing PIDs; • Verification of the relationship between indoor environment parameters and the activity pattern of the focused animal group.

Animals and Housing
The trial was carried out on the educational and research center Frankenforst (Königswinter-Vinxel, Germany) of the Agricultural Faculty of the Rheinische Friedrich-Wilhelms-University Bonn. The experimental period covered one fattening cycle of 105 days and extended from March to July 2019 in a forced ventilated fattening stable. The measurements were focused on 11 weaned and docked pigs housed in a 6.00 × 2.54 m pen (see Figure 1) with partly slatted concrete floor and a metal lattice as the partition wall for additional structuring. The focus pen does not border on any side directly on another pen. It is located at the beginning of the compartment and on the other side, a delimited area of 2.00 m width, in which the data loggers were accommodated, separates it from the neighboring pen. The pigs entered the pen with an average live weight of 23.0 kg and were slaughtered with an average carcass weight of 85.2 kg. Ten days before the end of fattening, one pig was excluded from the trial due to illness. The pigs were fed ad libitum on a wet feeder including two nipple drinkers ( Figure 1a). In addition, water was supplied with a nipple drinker placed across the feeder. A cotton rope was offered as enrichment material and was exchanged once a week. In order to test the usefulness of PIR to assess behavioral interactions with a novel object in the form of an unknown enrichment material, at the end of the fattening on day 89, the rope was exchanged for an unknown object. This consisted of a combination of wood, metal chains, and plastic tubes.

Passive Infrared Detector and Functional Areas within the Pen
In total six PIDs were installed at a height of 1.36 to 1.76 m to measure the activity in five different functional areas plus the overall activity of the animal group itself. The observed focus areas were divided into their functions: the feeding area, the drinking area, the exploration area with enrichment material, the resting, and the elimination area ( Figure 1). The PID (item no. 1362922, renkforce, Conrad Electronic SE, Hirschau, Germany) selected for this study provides an analogous signal. Due to modification of the detector signal, the activity is not displayed and stored in volts, but directly converted into a percentage. A voltage around 1 V corresponds to the resting state of the PIDs and an activity level of 0%, while a voltage of 10 V corresponds to an activity level of 100%. The basic voltage, which also differs between identically constructed sensors, was taken into account in order to compare the sensors independently. Beyond that, the PIDs have been equipped with a signal light for quick and easy testing of the functional readiness or to adjust the focus to specific areas. The measuring data were stored every minute by a data logger (ALMEMO ® , Ahlborn Mess-und Regelungstechnik GmbH, Holzkirchen, Germany). The pigs entered the pen with an average live weight of 23.0 kg and were slaughtered with an average carcass weight of 85.2 kg. Ten days before the end of fattening, one pig was excluded from the trial due to illness. The pigs were fed ad libitum on a wet feeder including two nipple drinkers ( Figure 1a). In addition, water was supplied with a nipple drinker placed across the feeder. A cotton rope was offered as enrichment material and was exchanged once a week. In order to test the usefulness of PIR to assess behavioral interactions with a novel object in the form of an unknown enrichment material, at the end of the fattening on day 89, the rope was exchanged for an unknown object. This consisted of a combination of wood, metal chains, and plastic tubes.

Passive Infrared Detector and Functional Areas within the Pen
In total six PIDs were installed at a height of 1.36 to 1.76 m to measure the activity in five different functional areas plus the overall activity of the animal group itself. The observed focus areas were divided into their functions: the feeding area, the drinking area, the exploration area with enrichment material, the resting, and the elimination area ( Figure 1). The PID (item no. 1362922, renkforce, Conrad Electronic SE, Hirschau, Germany) selected for this study provides an analogous signal. Due to modification of the detector signal, the activity is not displayed and stored in volts, but directly converted into a percentage. A voltage around 1 V corresponds to the resting state of the PIDs and an activity level of 0%, while a voltage of 10 V corresponds to an activity level of 100%. The basic voltage, which also differs between identically constructed sensors, was taken into account in order to compare the sensors independently. Beyond that, the PIDs have been equipped with a signal light for quick and easy testing of the functional readiness or to adjust the focus to specific areas. The measuring data were stored every minute by a data logger (ALMEMO ® , Ahlborn Mess-und Regelungstechnik GmbH, Holzkirchen, Germany).
In accordance with the manufacturer's specification, the PID has a detection angle of 360 • . When mounted in a height of 2.50 m, it is able to detect movements in a distance up to 16.00 m. The range could be also affected by the mounting height, the temperature difference between the body and the background, the distance and size of the moving body, and by the intensity of movement.
In order to exclude certain areas from the detection or rather to focus the detector accurately, the lens can be partly covered as shown in Figure 2.
Animals 2020, 10, x 5 of 20 In accordance with the manufacturer's specification, the PID has a detection angle of 360°. When mounted in a height of 2.50 m, it is able to detect movements in a distance up to 16.00 m. The range could be also affected by the mounting height, the temperature difference between the body and the background, the distance and size of the moving body, and by the intensity of movement.
In order to exclude certain areas from the detection or rather to focus the detector accurately, the lens can be partly covered as shown in Figure 2.

Visual Assessment as Reference Method
In order to evaluate activity data from the PID, the behavior of animals was recorded by video cameras for visual assessment. Two dome cameras were mounted on the compartment ceiling on both sides of the pen (see Figure 1b). Infrared radiators were installed underneath the cameras to be able to evaluate the behavior also at twilight or in darkness.
In contrast to the continuous recording of activity by the PID, the recording of behavior by cameras was done for certain focus days. To get a good overview of the entire fattening cycle, two control days were chosen at the beginning (fattening day 12 and 35), four in the middle (fattening day 40, 47, 61, and 68) and four days at the end (fattening day 75, 82, 89, and 96). The video material obtained was analyzed by assessing still frames in 10-min intervals over 24 h using a scan sampling method. Thus, 144 frames were analyzed per day. In order to be able to judge whether animals are moving, the still frames were also viewed one second before and one second after the frame. The behavior of the animals was generally divided into "inactive" or "active". The inactive behavior was exclusively assigned to lying; active behavior, however, was further subdivided into standing, sitting, locomotion, drinking, eating, excretion, and exploration of enrichment material (Table 1). Drinking, eating, and exploration behavior was only classified as such if it was recorded in certain areas. For example, drinking was only classified as such at the separate nipple drinker and not at the ones in the trough. The level of activity was determined in percentage as the number of pigs per behavior in relation to the total number of animals. The overall activity arose from the sum of all single behavior patterns besides lying.
The visual assessment was performed by a single observer who was trained on the basis of the exact description of the defined behavioral subtypes (see Table 1) and video material independent of the experiment to avoid interpretation errors.

Visual Assessment as Reference Method
In order to evaluate activity data from the PID, the behavior of animals was recorded by video cameras for visual assessment. Two dome cameras were mounted on the compartment ceiling on both sides of the pen (see Figure 1b). Infrared radiators were installed underneath the cameras to be able to evaluate the behavior also at twilight or in darkness.
In contrast to the continuous recording of activity by the PID, the recording of behavior by cameras was done for certain focus days. To get a good overview of the entire fattening cycle, two control days were chosen at the beginning (fattening day 12 and 35), four in the middle (fattening day 40, 47, 61, and 68) and four days at the end (fattening day 75, 82, 89, and 96). The video material obtained was analyzed by assessing still frames in 10-min intervals over 24 h using a scan sampling method. Thus, 144 frames were analyzed per day. In order to be able to judge whether animals are moving, the still frames were also viewed one second before and one second after the frame. The behavior of the animals was generally divided into "inactive" or "active". The inactive behavior was exclusively assigned to lying; active behavior, however, was further subdivided into standing, sitting, locomotion, drinking, eating, excretion, and exploration of enrichment material (Table 1). Drinking, eating, and exploration behavior was only classified as such if it was recorded in certain areas. For example, drinking was only classified as such at the separate nipple drinker and not at the ones in the trough. The level of activity was determined in percentage as the number of pigs per behavior in relation to the total number of animals. The overall activity arose from the sum of all single behavior patterns besides lying. The visual assessment was performed by a single observer who was trained on the basis of the exact description of the defined behavioral subtypes (see Table 1) and video material independent of the experiment to avoid interpretation errors.

Climate Measurements
In addition to activity, important indoor environment parameters were recorded. To measure NH 3 concentration in the stable air, one Polytron C300 (Dräger, Lübeck, Germany) equipped with an electrochemical gas sensor (DrägerSensor© NH 3 AL; accuracy according to manufacturer: 1.5 ppm or ± 10% of the measured value) was installed in the middle of the pen at a height of 1.47 m. The data were stored every minute on a second data logger (ALMEMO ® , Ahlborn Mess-und Regelungstechnik GmbH, Holzkirchen, Germany). Air temperature and relative humidity were measured with a Tinytag (Gemini Data Loggers Ltd., West Sussex, United Kingdom), which was also installed in the middle of the pen at a height of 1.86 m. The sensor stored the data in 10-min intervals.
In order to identify days with potential heat stress for fattening pigs, the Temperature Humidity Index (THI), or rather the THI NOAA according to the definition of Vitt et al. [32] as a quantification parameter, was calculated with the subsequent equation: where dry bulb temperature T DB (= air temperature T), relative humidity R (%). Following Vitt et al. [32] and St-Pierre et al. [33], a value of ≥72 was chosen as threshold with economic impact on fattening pigs.

Processing of Data and Statistical Analysis
Due to technical problems, no sensor data could be generated for fattening days 49 to 59. The available data were checked and corrected or invalidated when necessary due to signal interference of the detectors or other reasons. SPSS Statistics 25 (IBM, New York, NY, USA, 2017) was used to analyze the data. The distribution of data was tested with the Kolmogorov-Smirnov test. The quality of the linear relationship between the PID data and the visual assessment was verified using Spearman-Rho for not normally distributed data. The assessment of the strength of the effect-the effect size-of the determined correlations was carried out using the classification by Cohen [34]. The PID data were analyzed descriptively. For better representation and smoothing in graphics, the PID data recorded every minute were processed by calculating moving average values. In addition, the valid sensor data were averaged every 60 min and summarized for specific phases or time periods according to the respective question. The quality of the linear relationship between the corresponding variables of these "average days" thus obtained for each phase was verified using Spearman-Rho for not normally distributed data as well.

Comparison between PID and Visual Assessment
The comparison of the visually recorded and calculated activity during fattening as well as the PID data recorded at the corresponding times are listed in Table 2.
For the measurement of activity by PID for the group activity, the activity at the trough, in the exploration area as well as in the resting area, strong correlations could be found compared to the visual assessment. In addition, the correlation between PID data for group activity and corresponding visual assessment seems to decrease over the course of fattening from r = 0.87 to 0.60. For the measurement of activity using PID at the nipple drinker and in the elimination area, often only significant correlations with low or medium effect strength could be detected.
Furthermore, the focus days were divided into calmer and more active phases depending on the measured average activity values of group PID and visual assessment ( Figure 3). For the measurement of activity by PID for the group activity, the activity at the trough, in the exploration area as well as in the resting area, strong correlations could be found compared to the visual assessment. In addition, the correlation between PID data for group activity and corresponding visual assessment seems to decrease over the course of fattening from r = 0.87 to 0.60. For the measurement of activity using PID at the nipple drinker and in the elimination area, often only significant correlations with low or medium effect strength could be detected.
Furthermore, the focus days were divided into calmer and more active phases depending on the measured average activity values of group PID and visual assessment ( Figure 3). In the statistical evaluation, no major difference in the strength of the effect for the correlation between PID and visual assessment could be found in dependence of the considered two phases, calm and more active, over all focus days (r = 0.54, p = 0.00, n = 848 and r = 0.56, p = 0.00, n = 592, respectively).
All focus days considered, the analysis shows that the PIDs generally overestimate activity (as derived from passive infrared activation), as compared to visual assessment of activity (as can be seen in Figure 3).

Development of Group Activity over the Course of Fattening
Recording the animals' activity over the entire fattening cycle provided the opportunity to illustrate the development of activity. As shown in Figure 4, the daily rhythm and the intensity of the animals' activity change over the course of the fattening period. In the statistical evaluation, no major difference in the strength of the effect for the correlation between PID and visual assessment could be found in dependence of the considered two phases, calm and more active, over all focus days (r = 0.54, p = 0.00, n = 848 and r = 0.56, p = 0.00, n = 592, respectively).
All focus days considered, the analysis shows that the PIDs generally overestimate activity (as derived from passive infrared activation), as compared to visual assessment of activity (as can be seen in Figure 3). Table 2. Statistical analysis for group activity as well as activity in the focus areas calculated by visual assessment and measured by passive infrared detectors (PIDs). One-hundred and forty-four data pairs were available for evaluation on each of the ten focus days.

Development of Group Activity over the Course of Fattening
Recording the animals' activity over the entire fattening cycle provided the opportunity to illustrate the development of activity. As shown in Figure 4, the daily rhythm and the intensity of the animals' activity change over the course of the fattening period.  In the case of the very young fattening pigs until fattening day 19, the overall activity level was high for the whole day with a number of peaks, the highest in the afternoon. Over time and starting approximately from the 20th fattening day, an activity profile evolves with one main peak in the morning and another, longer one in the afternoon, as well as resting periods at night and between daytime peaks. A biphasic course has adjusted. The type of activity or (defined) behavior shown by the animals does not differ between morning and afternoon peak. In the intermediate phase of the fattening period, the total activity level remained high. There was generally much less activity at night than during the day. During the course of fattening, the activity level decreased with increasing age and weight of animals. Toward the end of fattening, the biphasic pattern was yet visible, but the level of activity was noticeably reduced. Video analysis gives the impression that the younger fattening pigs generally move more, as well as faster and more erratically, although the data were not statistically analyzed to validate this observation. In addition, there was more free space available to them in relation to their body size.

Use of Different Enrichment Material
Using PID in the exploration area, the utilization and attractiveness of enrichment material could be recorded and assessed. In general, activity in the exploration area decreased significantly over the course of fattening (r = −0.79, p = 0.00, n = 93). Toward the end of the fattening period, if the pigs were offered a fresh cotton rope, interest increased at first in contrast to the older one but decreased relatively quickly after offering as shown in Figure 5. However, the same figure illustrates that the interest in a new and unknown object is higher from the beginning and lasts longer. In the case of the very young fattening pigs until fattening day 19, the overall activity level was high for the whole day with a number of peaks, the highest in the afternoon. Over time and starting approximately from the 20th fattening day, an activity profile evolves with one main peak in the morning and another, longer one in the afternoon, as well as resting periods at night and between daytime peaks. A biphasic course has adjusted. The type of activity or (defined) behavior shown by the animals does not differ between morning and afternoon peak. In the intermediate phase of the fattening period, the total activity level remained high. There was generally much less activity at night than during the day. During the course of fattening, the activity level decreased with increasing age and weight of animals. Toward the end of fattening, the biphasic pattern was yet visible, but the level of activity was noticeably reduced. Video analysis gives the impression that the younger fattening pigs generally move more, as well as faster and more erratically, although the data were not statistically analyzed to validate this observation. In addition, there was more free space available to them in relation to their body size.

Use of Different Enrichment Material
Using PID in the exploration area, the utilization and attractiveness of enrichment material could be recorded and assessed. In general, activity in the exploration area decreased significantly over the course of fattening (r = −0.79, p = 0.00, n = 93). Toward the end of the fattening period, if the pigs were offered a fresh cotton rope, interest increased at first in contrast to the older one but decreased relatively quickly after offering as shown in Figure 5. However, the same figure illustrates that the interest in a new and unknown object is higher from the beginning and lasts longer. Comparing the activity course of two whole days with different enrichment materials, the result was as follows: although the animals generally become more inactive with increasing age and weight, the supply of an unknown wooden toy at the end of the fattening period can considerably increase use ( Figure 6). The agreement of the exploratory PID data with visual assessment showed that the measured activity was indeed employment behavior. The significant correlations for the day with the cotton rope and the wooden toy was r = 0.57 (p = 0.00, n = 144) and r = 0.88 (p = 0.00, n = 144), respectively. The activity level measured by the detector for the wooden toy was on average about 14% higher than for the cotton rope.
As well as in the assessment of group activity, the use of enrichment material had its peaks in the morning and afternoon, while the activity in the afternoon was more pronounced. Comparing the activity course of two whole days with different enrichment materials, the result was as follows: although the animals generally become more inactive with increasing age and weight, the supply of an unknown wooden toy at the end of the fattening period can considerably increase use ( Figure 6). Comparing the activity course of two whole days with different enrichment materials, the result was as follows: although the animals generally become more inactive with increasing age and weight, the supply of an unknown wooden toy at the end of the fattening period can considerably increase use ( Figure 6). The agreement of the exploratory PID data with visual assessment showed that the measured activity was indeed employment behavior. The significant correlations for the day with the cotton rope and the wooden toy was r = 0.57 (p = 0.00, n = 144) and r = 0.88 (p = 0.00, n = 144), respectively. The activity level measured by the detector for the wooden toy was on average about 14% higher than for the cotton rope.

PID Combined with Climate Analysis
As well as in the assessment of group activity, the use of enrichment material had its peaks in the morning and afternoon, while the activity in the afternoon was more pronounced. The agreement of the exploratory PID data with visual assessment showed that the measured activity was indeed employment behavior. The significant correlations for the day with the cotton rope and the wooden toy was r = 0.57 (p = 0.00, n = 144) and r = 0.88 (p = 0.00, n = 144), respectively. The activity level measured by the detector for the wooden toy was on average about 14% higher than for the cotton rope.

PID Combined with Climate Analysis
As well as in the assessment of group activity, the use of enrichment material had its peaks in the morning and afternoon, while the activity in the afternoon was more pronounced.

Indoor Climate
Over the whole test period, the average temperature and relative humidity measured above the focus pen was 21.47 • C ± 3.29 and 50.99% ± 8.24. NH 3 concentration was on average 12.05 ppm ± 6.94. As shown in Figure 7, NH 3 concentration increased significantly throughout the fattening period (r = 0.77, p = 0.00, n = 93).

Indoor Climate
Over the whole test period, the average temperature and relative humidity measured above the focus pen was 21.47 °C ± 3.29 and 50.99% ± 8.24. NH3 concentration was on average 12.05 ppm ± 6.94. As shown in Figure 7, NH3 concentration increased significantly throughout the fattening period (r = 0.77, p = 0.00, n = 93).

Activity as a Function of THI
The results indicate that when pigs suffered from heat stress, they changed their behavioral pattern toward a reduction of activity ( Figure 8). For the total of 82 fattening days, during which all relevant data were available, a significant correlation between group PID as well as trough PID and THINOAA could be determined (r = −0.80 (p = 0.00, n = 82) and r = −0.83 (p = 0.00, n = 82), respectively). The available results indicate that the animals reduced not only their activity per se, but also the activity at the trough and thus the feed intake with increasing THI.

Activity as a Function of THI
The results indicate that when pigs suffered from heat stress, they changed their behavioral pattern toward a reduction of activity ( Figure 8).

Indoor Climate
Over the whole test period, the average temperature and relative humidity measured above the focus pen was 21.47 °C ± 3.29 and 50.99% ± 8.24. NH3 concentration was on average 12.05 ppm ± 6.94. As shown in Figure 7, NH3 concentration increased significantly throughout the fattening period (r = 0.77, p = 0.00, n = 93).

Activity as a Function of THI
The results indicate that when pigs suffered from heat stress, they changed their behavioral pattern toward a reduction of activity ( Figure 8). For the total of 82 fattening days, during which all relevant data were available, a significant correlation between group PID as well as trough PID and THINOAA could be determined (r = −0.80 (p = 0.00, n = 82) and r = −0.83 (p = 0.00, n = 82), respectively). The available results indicate that the animals reduced not only their activity per se, but also the activity at the trough and thus the feed intake with increasing THI. For the total of 82 fattening days, during which all relevant data were available, a significant correlation between group PID as well as trough PID and THI NOAA could be determined (r = −0.80 (p = 0.00, n = 82) and r = −0.83 (p = 0.00, n = 82), respectively). The available results indicate that the animals reduced not only their activity per se, but also the activity at the trough and thus the feed intake with increasing THI.

NH 3 Concentration Profile as a Function of Activity
For the sum of the evaluable data (n = 128,561), no relevant correlation between group activity and NH 3 concentration could be determined. If the available data are summarized in hourly averages and the entire measurement period is divided into two phases as they result from Figure 7-phase with low NH 3 concentrations (FD < 35) and phase with higher NH 3 concentrations (FD ≥ 35)-no consistent correlation between group activity and NH 3 concentration can be found here either. However, there are considerable differences between the individual fattening days with regard to the context under examination. For example, there is no relevant correlation between the two parameters on fattening day 42 (r = −0.01, p = 0.71, n = 1440). For the following fattening day 43, however, a significant correlation of r = 0.58 (p = 0.00, n = 1440) can be demonstrated (see also Figure 9). Animals 2020, 10, x 13 of 20

NH3 Concentration Profile as a Function of Activity
For the sum of the evaluable data (n = 128561), no relevant correlation between group activity and NH3 concentration could be determined. If the available data are summarized in hourly averages and the entire measurement period is divided into two phases as they result from Figure 7-phase with low NH3 concentrations (FD < 35) and phase with higher NH3 concentrations (FD ≥ 35)-no consistent correlation between group activity and NH3 concentration can be found here either. However, there are considerable differences between the individual fattening days with regard to the context under examination. For example, there is no relevant correlation between the two parameters on fattening day 42 (r = −0.01, p = 0.71, n = 1440). For the following fattening day 43, however, a significant correlation of r = 0.58 (p = 0.00, n = 1440) can be demonstrated (see also Figure 9).

Comparison between PID and Visual Assessment
The correlation between PID data and visual assessment with regard to the measurement of group activity was very strong with correlations from up to 0.87 (Table 2) and comparable to that of other studies despite differences in definition and assessment/scoring of behavior and activity [14,17,18]. For comparison, in Besteiro et al. [14], the correlation determined for the dataset was 0.86.

Comparison between PID and Visual Assessment
The correlation between PID data and visual assessment with regard to the measurement of group activity was very strong with correlations from up to 0.87 (Table 2) and comparable to that of other studies despite differences in definition and assessment/scoring of behavior and activity [14,17,18]. For comparison, in Besteiro et al. [14], the correlation determined for the dataset was 0.86. This is comparable to the correlation of 0.92 determined by Ott et al. [5], who compared automated video analysis of pixel changes with human observation of activity in pigs. Thus, the estimation of the group activity level is possible with both PID and automated video analysis [14]. Compared to the activity measurement by automated video analysis, however, the data evaluation and processing has so far been considerably simpler, and the activity measurement of PIDs is independent of the time of day or the available light, which can sometimes restrict video-based behavior evaluation.
Furthermore, in Puppe et al. [18], significant strong correlations between behavioral observation by an observer and the PID technique were found. In addition, it was shown that PID measures data more reliably in terms of objectivity, especially in situations where the observer's assessment is influenced more by expectations of certain events than by the actual events or behavior of the animals themselves [18]. In addition to the objectivity of PID, this technique also allows a largely undisturbed recording of behavior compared to direct observation, the costs of which are also higher for manpower and technical investment [17].
Comparing the correlations of the present study between group PID data and visual assessment over the 10 focus days, a decreasing comparability with proceeding fattening could be determined, as was also found by Besteiro et al. [14]. They justified this correlation with higher and more homogeneous temperatures with increasing live weight of the animal, which presumably influences PID measurement based on temperature differences [14]. However, in comparison to the results of Besteiro et al. [14], no significant differences in the strength of the correlation between calm and more active phases could be found in the present study. The differences may be due to the fact that the day itself was not strictly divided into night and daytime in the present study, but the phases were divided into rest and activity phases depending on the measured activity. Thus, for example, resting phases during day and night were combined for the correlation analysis; on the other hand, (total) activity was not classified exclusively via feeding and playing behavior as in Besteiro et al. [14]. Other behaviors, such as undirected sitting or standing, which also influence the PID signal strength, may have been less frequent at night than during the day and thus led to stronger correlations between visual assessment and PID in Besteiro et al. [14].
Comparable to the results of Besteiro et al. [14], the present experiment also showed that PIDs generally overestimate activity (as derived from passive infrared activation), as compared to the visual assessment of activity. A possible reason might be that the detector measured the intensity of activity, while the human observer determined activity by the number of animals that pursued a behavior except lying. Because the single behaviors of an animal did not always trigger the same level of activity, the detector received impulses of varying intensity. Therefore, the PID method was more sensitive than human observation and visualized the actual level of activity more precisely.

PID Combined with Behavioral Analysis
In general, activity data of the group PID show a circadian rhythm, which is considered as typical for pigs and which has already been described in other studies, partly also by PIDs [3,14,15,[35][36][37]. In the course of fattening, an activity profile emerged with two activity peaks, one in the morning and a more pronounced one in the afternoon. Between these two activity peaks during the day and in the evening and night hours, resting phases can be observed, which are only partially interrupted by individual animals rising to drink or to change their position. Other studies have also described that a certain circadian rhythm is formed or consolidated over time, which is then maintained until the end of the observation period [3,15,35]. As in other studies, at the end of the experimental phase, a biphasic rhythm with two peaks per day was observed [3,15,38,39], which in Hillmann et al. [35] was also found in the context of salivary cortisol measurement-a parameter for stress and non-stress-related physiological action with effects on animal welfare [40]. As with Saha et al. [38] or Ni et al. [15], in the present experiment, the second daily peak in the afternoon proved to be more intensive and/or longer-lasting than the morning peak.
Based on the knowledge about the activity profile typical for pigs in general and about the individual profile of the pen or the compartment depending on feeding management or similar, in future, the PID data could be used as a basis for early warning systems in case of deviations. Changes in resting and activity phases-be they related to course, frequency or intensity-could provide important information on animal welfare. For example, changes in the typical daily rhythm and a reduction in activity in general could appear in the case of disease [41] as well as triggered by heat stress [42]. The latter is also indicated by our own results of reduced activity in general and at the trough with increasing THI values (see Figure 8). In addition, changes in the typical daily rhythm in the sense of an increase in activity could provide early warning of the outbreak of tail biting [28,29,43,44]. Furthermore, the activity data of a group of animals could be used for control purposes in order to observe the development of fights for establishing a social hierarchy [45] at the beginning of housing in or moving pigs. This could be used to monitor whether the frequency of fights decreases after usually a few days [46] and, when intensive phases of fighting occur during the day, which could be mitigated by the administration of additional enrichment material to reduce possible injuries to the animals. However, not only group-based activity data but also data related to specific focus areas such as trough or drinker can provide important information for the assessment of animal welfare. Therefore, the suitability of the PIDs for activity detection in certain functional areas was also investigated in the present experiment.
Due to strong correlations, the data of the PIDs in the resting, feeding, and exploration area of the pen in focus proved to be meaningful for the expected behavior corresponding to the specific functional area. The partly very weak correlations for the PIDs in the drinking and elimination area are probably mainly due to deficiencies in the position of the functional areas themselves and the dual use. Although an increased amount of space per animal compared to practice has already been implemented in order to allow the animals an improved division of the pen into separate functional areas, not all circumstances could be optimized for later evaluation. For example, the nipple drinker PID did not primarily record drinking animals or animals at the drinker, but frequently animals on their way from the elimination area to another functional area such as the trough area. Furthermore, the focused drinker was not the only source of water for the animals in this pen. As fattening progressed, an increase in the use of the drinker at the wet feeder was observed. Presumably, the animals use the possibility of increased water intake per unit of time at the feeder compared to the focused nipple drinker [25] in order to meet their increasing total water consumption rate during fattening [24]. This is because the nipple drinkers included in the wet feeder not only allow the animals to take in water directly, but also to fill the trough with it and thus take in water from an open surface, regardless of the current water flow rate.
Due to the good correlations between PID and visual assessment compared to drinking and elimination area, the activity data for the trough, exploration, and resting area in the focus pen could in future be directly included in the assessment of animal welfare.
The assessment of activity at the trough requires the following knowledge: Pigs are synchronous eaters [47], who also show a biphasic feed intake rhythm with two peaks when fed ad libitum [48]. Similar to the results of de Haer and Merks [48], the wet feeder PID data in the focus pen show a peak in the morning and a higher or rather longer-lasting peak in the afternoon. A changed feed intake behavior can have different influencing factors. On the one hand, temperature not only has an influence on water intake [26] but can also lead to a reduction in feed intake [42]. In the present experiment, a reduced activity at the trough was observed with increasing THI. Collin et al. [26] and Quiniou et al. [49] also describe a decrease in feed intake associated with a shorter daily consumption and ingestion time. A general shift in feed intake times during the course of the day [26] or a change in the daily number of meals [26,49] due to high ambient temperatures could not be observed. Another factor may be diseases that adversely influence activity at the trough and the appetite of animals [41]. As a third factor, the animal/feeding place ratio and therefore the competition for feed can also influence activity and the circadian pattern and thus indicate too much stress at feeding times. Thus, Nielsen et al. [50] showed differences in feeder occupation during the day depending on group size. As in the experiment, the feed intake was distributed over two peak periods, one in the morning and a second in the evening [50]. In contrast to the unchanged morning peak, in the afternoon, the feed intake was distributed over a longer period of time and partly extended into the evening hours when group sizes were increased [50]. Hyun and Ellis [51] also showed an increase in the proportion of time the feeder was occupied with increasing group size.
A decrease in activity on the enrichment material can also indicate deficiencies in husbandry or rather management. Play behavior in general is considered to be an important indicator of positive emotions and indicates welfare [1,52,53], as it is only expressed when all other needs are met and environmental conditions are ideal for the animal [1,54]. In the experiment itself, however, only the play with enrichment material was recorded and evaluated, not play behavior between conspecifics or other furnishings. A decreased activity in the exploration area was observed during the course of fattening. In the experiment, the activity could be increased for a short time when changing the cotton rope as a generally already known material. However, if the pigs were offered a completely unknown item at the end of the fattening period, an increased duration of activity shortly after the addition and an increased activity during the course of the day in general was observed. The added value of the information the PID could provide by activity measurement in the exploration area is that the farmer is able to change the current material as soon as it loses its long-term attractiveness and it therefore no longer fully serves its purpose. Such a habituation to the offered material and thus a loss of attractiveness can occur very quickly within a few days [55].
Moreover, increase in activity on the enrichment material without having previously exchanged it could also indicate the outbreak of tail biting [27][28][29].
Overall, the results of the PIDs focused on specific areas confirm the statement of Besteiro et al. [14] that affixing and focusing of the PIDs is decisive for meaningful results [14]. Weak correlations for certain functional areas and corresponding behavior have already been determined by optimized pen design or space available per animal. Thus, testing the PIDs in functional areas under practical conditions should be the next important step to further investigations on the suitability of PIDs.

PID Combined with Climate Analysis
With regard to climate parameters, the focus of this study was primarily to investigate the relationship between NH 3 concentration and overall activity of the animal group. Taking into account the entire fattening period, the results show a clear correlation between NH 3 and the fattening day (Figure 7), as already shown by Aarnink et al. [30] or Jeppsson [56]. As the fattening progresses, the measured NH 3 concentration increases. The fluctuations or partly abrupt reductions as seen in Figure 7, for example, on fattening days 42, 88 or 99, are probably attributable to the ventilation or cleaning management, which was not recorded in this experiment. However, it turned out that the functional areas were used differently by the pigs depending on the air temperature inside the barn and the growing size of the pigs. With rising inside air temperatures, the animals increasingly lay down on the slatted floor. In addition, the elimination area was extended to the concrete floor area of the pen and thus to other functional areas (exploration and feeding area). The extension of the elimination area resulted in the animals also depositing feces and urine in the floor area below the NH 3 sensor. To avoid heat stress and further pollution of pen and pigs by wallowing, in addition to increasing the ventilation rate, the solid areas were regularly cleaned with water. Especially the cleaning of the pen and thus the removal of feces probably led to this partly noticeable reduction of NH 3 concentration, which only lasted for a short time. A similar cause-effect relationship between cleaning and the reduction of NH 3 emissions was shown by Aarnink et al. [30].
A consistent correlation between NH 3 concentration during the course of a day and the animal activity on the basis of each individual fattening day of the fattening period [30,56] could not be proven in this study. Figure 9 shows how strongly the correlation between NH 3 and activity differs between two individual fattening days. While on fattening day 43, for example, the diurnal character of NH 3 concentration is clearly recognizable depending on the animal activity, a comparable correlation is not seen the day before. On the one hand, the proven higher correlation found by Jeppsson [56] could be attributable to the investigated deep litter system. On the other hand, NH 3 concentrations in the barn air are significantly influenced by a number of other factors (e.g., ventilation rate, outside air temperature, liquid manure management, cleaning management, and barn hygiene) [57][58][59][60], which unfortunately could not be measured and evaluated in this study.
The effects of increasing THI levels and thus of temperature and relative humidity on activity have already been described in the context of group and trough activity measurements. Nevertheless, the following should be pointed out in connection with the temperature: Air temperature above 28 • C should be avoided because it leads to heat stress for the animals [32]. Heat stress degrades animal welfare as pigs are not able to sweat to the appropriate extent and suffer from high temperatures [42]. To prevent these negative effects of temperature, the use of PIDs could help to recognize behavioral changes early and take countermeasures such as evaporative cooling with cooling pads [32] to improve animal welfare.

Outlook for Future Application Possibilities in Practice
Overall, it can be summarized that PIDs and the activity data they generate in combination with other information would meet the demand not only to determine the current welfare status as a monitoring system, but also to be able to indicate potential risks at an early stage [2]. PIDs can be used to monitor general behavioral changes that may be related to factors or circumstances such as heat stress, disease or tail biting that may have a negative impact on animal welfare. However, further development of the output and analysis of PID data is needed to improve the usability and gain of information for the farmer. A meaningful processing and presentation with the help of, for example, algorithmic processing or supported by artificial intelligence is to be aimed at for practical use as well as the increased fusion of data from various sensors [61].
In future, low-cost and easy to handle PIDs could be used in two very different ways to complement and improve the assessment of animal welfare: for self-monitoring and as an on-farm consulting tool.
On the one hand, PIDs could be used for internal monitoring of livestock (even with large numbers of animals) to supplement continuous assessment with regard to animal-welfare-relevant indicators and precise documentation of so far mainly resource-and management-based indicators such as temperature, relative humidity or NH 3 concentration. In this way, appropriate animal welfare on farm can be more comprehensively evaluated and monitored by the animal owner themselves. As a decision support system, it can thus indicate changes in animal behavior at an early stage, to which the farmer can then react according to the situation, even before there is any actual impairment of animal welfare, e.g., through the outbreak of tail biting or heat stress. However, PIDs cannot and should not replace the daily visual inspection of animals by the farmer.
On the other hand, a profile of the group activity or the activity in certain focus areas obtained by the PIDs can also be used as a supplement to (already existing) animal welfare assessment protocols for evaluation or consultation in the context of a Weak Point Analysis. In addition to the usual resource-and management-based indicators, more attention is already being given to assessment using animal-based indicators. In addition to the assessment of health (using slaughter data) and the status quo assessment of phenotype (via BCS, manure on the body or the like) or behavior by novel object test, assessment of exploration behavior, etc., the behavior of animals could thus be incorporated even more meaningfully and above all much more objectively into the assessment of animal welfare by means of PIDs as a basic real time tool.

Conclusions
The experiment showed that PIDs are suitable for recording the activity of a group of fattening pigs in a pen. The activity profile obtained over the day, over a specific phase or over the whole fattening period allows initial conclusions to be drawn about resting, stress, and activity phases, which can be used combined with other factors to assess animal welfare. In addition, it was shown that activity profiles could be obtained in certain clearly definable areas of the pen such as the trough, the resting or the exploration area with the help of PIDs. The results of the present investigation based just on one pen indicate the following: These profiles in combination with each other and with further information on group activity as well as data on, for example, the temperature in the compartment can improve the assessment of the situation in the pen or barn and enable the farmer to react to behavioral changes at an early stage.
In future, low-cost and easily manageable PIDs should not only be used in the context of scientific questions but should also be used for operational self-monitoring of animal welfare or as part of an on-farm consulting tool. They can be used for an entire compartment, a pen or for specific, definable functional areas within the pen. Since in the present study, only one pen serves as the basis for the results of focusing PIDs, further investigations must show the extent to which stables or compartments and corresponding focus areas must be equipped with PIDs in order to be useful for the purpose of obtaining information and to be profitable at the same time.