METHOD OF NUMERICAL CORRECTION OF ERRORS OCCASIONED BY DELAY OF RECORDS DURING THE MONITORING OF ENVIRONMENTAL VARIABLES OF INTEREST FOR ANIMAL PRODUCTION

Thermal and air conditions inside animal facilities change during the day due to the influence of the external environment. For statistical and geostatistical analyses to be representative, a large number of points spatially distributed in the facility area must be monitored. This work suggests that the time variation of environmental variables of interest for animal production, monitored within animal facility, can be modeled accurately from discrete-time records. The aim of this study was to develop a numerical method to correct the temporal variations of these environmental variables, transforming the data so that such observations are independent of the time spent during the measurement. The proposed method approached values recorded with time delays to those expected at the exact moment of interest, if the data were measured simultaneously at the moment at all points distributed spatially. The correction model for numerical environmental variables was validated for environmental air temperature parameter, and the values corrected by the method did not differ by Tukey’s test at 5% significance of real values recorded by data loggers.


INTRODUCTION
Animals require adequate environmental conditions in order to perform at their maximum production capacity (TOLON et al., 2010).However, the conditions of thermal environment and air within the animal facilities change during the day, mainly due to the influence of the external environment.In extreme cases, the environment in the interior of a facility can change from being ideal to a hostile condition, or the other way around, in a short period of time.
The spatial variability of variables related to thermal environment (CARVALHO et al., 2007;FARIA et al., 2008;MIRAGLIOTTA et al., 2006;PEREIRA et al., 2008), noise (BORGES et al., 2010) and litter quality (MILES et al., 2006;TASISTRO et al., 2004) in facilities of intensive animal production have been widely researched.These studies are important to understand how acclimatization systems and different litter materials influence the environment inside the facility, where one can expect localized production losses (MIRAGLIOTTA et al., 2006;PEREIRA et al., 2008) and propose improvement measures and new facility designs for intensive production systems (FARIA et al., 2008).
For statistical and geostatistical analyses to be representative, a large number of points spatially distributed in the facility area should be monitored (CARVALHO, 2010;MANZIONE, 2002).Depending on the environmental variables of interest, acquisition of sensors with data loggers is very expensive.In these cases, several authors have used the same instrument to measure the full extent of the facility, walking through the area and recording the values in previously marked points (BARATO et al., 2008;CARVALHO et al., 2007;MILES et al., 2006;MIRAGLIOTTA et al., 2006;PEREIRA et al., 2008).Nevertheless, in this type of methodology, there is a time delay between the first and last collection, which should not be neglected, since the conditions of environmental variables changes inside the facility during this period (BARATO et al., 2008;CARVALHO, 2010).BARATO et al. (2008) proposed a methodology to correct the values of variables measured inside cages of laying hens in production.In that work, the authors considered that the time variation of environmental variables of interest was linear between the beginning and the end of measurements, and to make corrections, repeated at the end of data collection in the first measurement point.Therefore, a linear relationship was defined between the first and the last measurement and all data were adjusted for the facility.However, in the same work, the authors stated that the considerations initially assumed might not be absolutely accurate and that a more appropriate methodology should be proposed.
The correction value represents a legitimate concern regarding data variability along time, as noted in publications that the time it takes to complete one cycle of records within a facility of intensive animals production, can reach more than 2h (CARVALHO, 2010;MILES et al., 2006).PEREIRA et al. (2008) observed variations of up to 2.5 °C between the beginning and the end of data collection in egg production.
It is well known that the external environment is dynamic and influences the internal environment of the animal facility, even if the installation is equipped with acclimatization system (MIRAGLIOTTA et al., 2006;TINÔCO, 2001).Thus, in the impracticality of simultaneous recording all sampling points within the facility, a method for correcting the records should be used.
The work herein thus proposes that the time variation of the environmental variables of interest for animal production, monitored inside animal facilities, can be accurately modeled from discrete time records.The objective of this study was to develop a numerical method to correct the temporal variations of these environmental variables, using data transformation so that such observations are independent of the time spent during the measurements.

MATERIAL AND METHODS
The variability of a given environmental parameter can be irregular and mathematically difficult to model.To solve this problem, we propose a method in two steps: i) Monitor systematically one or more strategic and representative points of larger regions within the facility.
ii) Make corrections of the numerical values measured for a desired time considering the variation observed in the points monitored in (i).
Systematic monitoring of one or more points representative of larger areas inside the facility can be accomplished by means of data loggers or a manual tool.In the points chosen to represent the regions inside the facility, it has been defined that the smaller the interval between measurements the more accurate the numerical correction proposed in this work.
For the numerical correction, two mathematical methods are proposed: one to approximate the values measured for the initial recording time and the other for the final recording time.These two methods were developed to enable comparisons between two sites monitored with the same equipment.In this case, it is thought that at the end of data collection in a facility, recording of the other variables begins immediately, and while the values measured in the first facility for the final time are being corrected, the data of the second facility are corrected for the initial time of data collection.Thus, we have an approximation of the values recorded in two facilities at the same time.
To determine the functions of linear adjustment, we used equations of the type: which can equivalently be written as: where Y represents values of the environmental variable, X is the time taken to evaluate this variable.Thus, for any value of the environmental variable Y measured in time X , once can get an equivalent value Y in time X .
The proposed numerical correction method was validated by an experiment in a laying hen production facility, in the municipality of Tupã, São Paulo State, Brazil.In this experiment, the systematic monitoring of the environmental parameter air temperature in all points of interest are shown in Figure 1, where twenty Onset HOBO ® thermometers with data loggers, Pendant AU-002 model, with a resolution of 0.10 °C and accuracy of ± 0.47 °C at 25 °C were installed inside the facility.The pieces of equipment were programmed to record temperature values every minute.
The point of reference for the corrections was point 10 as it was located in the center of the installation.At this point, we considered all records taken to correct the values of air temperature in other parts of the production facility. .We used measurements in one-minute intervals, using 20 minutes for calibrating air temperature with data loggers for validation of the proposed model.For the statistical analysis when comparing (1) the original values measured at different times ( i t ), (2) the values measured in time i t and corrected by the method proposed for the initial time ( 1 t ) or final ( 20 t ) and ( 3) the actual values measured with the data logger in the initial time ( 1 t ) or final ( 20 t ) as reference, nonparametric analysis of variance (ANOVA) for paired data (Friedman test for repeated measurements), was used before applying Tukey's test.For all tests, significance level of 5% was used.

Theoretical Results
For correction of values for the initial time of data recording, it was considered at first the environmental any parameter measurements C , which were discretely recorded within the time interval   b a, in different coordinates of the same location or facility.These values represent the environmental data linked to its recording time.
For these values to be transformed into the corresponding measurements performed at the initial time a t  , they must be carried out as systematic measurements of the variable in the same location in the initial time .
It is noteworthy that, despite the measurements being taken in the same installation, there are different variation intensities of this environmental parameter in time.
Thus, be C any record of the environmental parameter in a given time . The following procedure shows the method to obtain the value corr C referent to the correction of the measurement of time t to its equivalent value at the initial time of data collection a t  .
For this, there have been a few cases to consider the relative position of t in the time interval , to determine the equivalent value of C at time i t , the following relationship should determined from the equation of the line that represents the temporal behavior of this variable between points   and   where , which can be expressed as: (5) Thus, by denoting this correction equivalent to the initial time of data recording for ) 1 ( corr inicial corr C C  , we have that: The correction given by Equation 7can be graphically represented, as shown in Figure 3.To correct a value for the final time of data recording, when , the equivalent value C at time 1  i t must be determined.For this, one should use the following relationship determined from the equation that represents the segment of temporal behavior of this variable between points   and   . Correction of the environmental variable at time t to their equivalent value in time 1 From Equation 8, if t is the final point of the subinterval considered   1 ,  i i t t , i.e., the result is , which can be expressed as: Thus, from Equation 10, if a variable has a value at time i t , than its equivalent value at time 1  i t is given by adding 1   i C .Thus, the equivalent value Applying this process i n  times, to obtain the equivalent value of the environmental variable C at time n t , use: Thus, denoting this correction equivalent to the end time of data recording by or The correction given by Eq. ( 14) is graphically represented in Figure 5.

Practical Results
To validate the formulation of mathematical correction, we applied the method to adjust the measurements of reference point 10.Figures 6 and 7 show the measurement corrections at different times from the point 10 using itself as a correction reference.In this case, the corrected values for the desired time (final or initial) fully agreed with the measurements made at this time.The recorded data of air temperature with time delay in the experiment underwent time correction in two simulations, according to the numerical method aforementioned in theoretical results section, being a simulation to correct to the initial time and another to correct the simulation for the final measurement time.
Subsequently, three sets were created for statistical comparison, namely: (1) the original values measured at different times ( i t ), (2) values measured in time i t and corrected by the proposed method for the initial time ( 1 t ), in the first simulation, and for the final time 20 t , in the second simulation and (3) the actual values measured with the data logging at the initial time ( 1 t ), in the first simulation, and final time 20 t , the second simulation The results of the first simulation (correction to initial time), can be seen in Figure 8, which represents the values of the environmental variable air temperature at points where data loggers were installed, with analysis in Table 1, which presents the results of statistical analysis performed .Values with different letters show significant differences by the Tukey's test at 5% probability.
Table 1 shows that the corrected values for the initial time (10.30) are equivalent to real values measured, whereas the values measured with time delays are significantly different from values measured at start time and also from values corrected for this time.Based on these results, it is considered that the correction method of numerical values for the environmental parameter air temperature was effective when used to obtain equivalent values to the start time.
Results of the second simulation are shown in Figure 9, with the statistical analysis presented in Table 2. Values with different letters show significant differences by the Tukey's test at 5% probability.
From the results presented in Table 2, one can observe that the mean of the corrected values lies between the values measured with time lag and the actual values.In addition, the values corrected by the method do not differ statistically from the other data sets.Based on these results, the correction method of numerical values for the environmental parameter air temperature is also considered effective when used to obtain the equivalent value to the final time.
The numerical correction method proposed herein can be applied to any other environmental parameter, if the general characteristics of the spatial variability of this variable within the facility evaluated are known.It is accepted that air temperature and relative humidity in poultry production facilities vary gradually depending on space, which determines the choice of a few points, perhaps a single one, as reference for corrections.However, some variables, such as sound pressure, may not present spatial dependence, as observed by BORGES et al. (2010).

CONCLUSIONS
The proposed method approximates the recorded values with time delays to the expected moment of interest, as if the data were measured simultaneously in all spatially distributed time points.
The numerical correction model for environmental variables has been validated for the variable air temperature.

FIGURE 1 .
FIGURE 1. Schematic representation of the animal production facility used for model validation of the numerical correction in time and location of thermometer data loggers.

FIGURE 3 .
FIGURE 3. Correction stages of environmental data applied to initial time of data recording.

FIGURE 5 .
FIGURE 5. Correction stages of environmental data for the final time of data recording.
Figures 3 and 5 illustrate the correction steps.

FIGURE 6 .
FIGURE 6. Corrections of several temperature measurements from the reference point 10 for the initial time.
FIGURE 8. Values of environmental variable for different data sets used in the validation of the numerical correction method for records of the initial time.
FIGURE 9. Environmental variable values for different data sets used in the validation of the method of numerical correction for the final time of records.