UNCERTAINTY ANALYSIS OF A WEB-BASED DATA ACQUISITION SYSTEM FOR POULTRY MANAGEMENT WITH SENSOR NETWORKS

1 National Research Center of Intelligent Equipment for Agriculture, Key Laboratory of Agricultural Intelligent Equipment Technology, Beijing, China. 2 Key Laboratory of Agricultural Engineering in Structure and Environment, Ministry of Agriculture, China Agricultural University, Beijing, China. 3 Texas A&M University/College Station, Texas, USA. 4 Beijing Engineering Research Center for Information Technology in Agriculture, P.R. China. Received in: 9-28-2017 Accepted in: 10-15-2018 Engenharia Agrícola, Jaboticabal, v.38, n.6, p.857-863, nov./dec. 2018 Doi: http://dx.doi.org/10.1590/1809-4430-Eng.Agric.v38n6p857-863/2018


INTRODUCTION
In recent years, the improvement of informative networks and sensor technologies has enabled the rapid growth of wireless and online management systems.These systems with sensor networks can remotely monitor and maintain communication with many unfavorable physical environments such as remote geographic regions, inaccessible dangerous locations, and commercial poultry farms (Georgiadis et al., 2009;So-In et al., 2014;Venkatraman et al., 2016;Zahedi et al., 2016).The management systems based on networks have many wide applications, ranging from earth observations (Datla et al., 2010) to agricultural production (Serodio et al., 2001;Brunner et al., 2012).Numerous sensor networks are used to measure the environment and directly guide production procedures.Thus, it is important to evaluate the measurement uncertainty and sensor network errors with a web-based data acquisition and remote management system so that the uncertainty of the system can be estimated correctly (Kessel et al., 2008;Pechlivanidis et al., 2011;Sarachi et al., 2015).Moreover, analyzing the sensor data will increase the confidence of the authorities in the results to make decisions.
The requirements for error evaluation led to the publication in 1993 of the first editions of the standards of the "Guide to the Expression of Uncertainty in Measurement (GUM)" by the International Organization for Standardization (ISO) in collaboration with the International Bureau of Weights and Measures (BIPM), International Electrotechnical Commission (IEC), International Laboratory Accreditation Conference (ILAC), and many other organizations.This formally established the general rules for evaluating and expressing the uncertainties in a broad spectrum of measurements (ISO, 1995;BIPM, 2015;Ellison & Williams, 2012).With reference to increased need for accurate measurements, a Joint Committee for Guides in Metrology Engenharia Agrícola, Jaboticabal, v.38, n.6, p.857-863, nov./dec. 2018(JCGM, 2015) was appointed to promote the use of GUM.Moreover, it had to give added referenced documents to GUM through guidance on the aspects of the evaluation and use of the measurement uncertainty, which are not explicitly treated in the 1997 GUM.For the application of this guide, a series of supplementary documents including JCGM 100 (2008), JCGM 101 (2008), JCGM 102 (2011), and JCGM 200 (2012) were released by the JCGM.Moreover, in China, a technical specification named "Evaluation and Expression of Uncertainty in Measurement (JJF 1059-1999)" was issued by the General Administration of Quality Supervision (GAQS, 1999), Inspection, and Quarantine of China in 1999, and a new revised guide for the measurement uncertainty (JJF1059.1-2012)was released and used for various industries (Huang et al., 2011;Chen et al., 2016).These guides and specifications provide detailed guidance for the evaluation and expression of the uncertainty in quantitative analysis based on the approach adopted in ISO (GUM) and the AQSIQ (JJF).
In principle, numerous model simulations and calculation procedures have been reported for the uncertainty evaluation in measurements.These include the Monte Carlo method (Yustres et al., 2012), Fuzzy sets theory, Grey system theory, and Bayesian theory (Reilly & Willenbockel, 2010;Broekhuizen et al., 2015).These evaluation models are primarily developed with the aim of successfully finding a single best set of parameter values.The focus is on the steps of deriving a corresponding measurement model, the assignment of the probability distribution functions (PDFs) to the input parameters in the model, and the propagation of the distributions through the model (Zakharov et al., 2013;Snow & Bajaj, 2015).Therefore, in numerous studies, the procedure for calculating the arithmetic mean of the initial quantities followed by conversion into an estimate of the measured quantity yields a shifted estimate because of their nonlinear relationship.From the comparison of these models, the methods of type A and B evaluation following the standards of GUM and JJF seem to be best suited for conducting the data evaluation and consistency checking of a data acquisition system with sensor networks.A sample study illustrated how the method can be implemented.
This article aimed to demonstrate a web-based data acquisition system and the entire process of the uncertainty analysis for sensor networks.The specific objectives of this work were: (1) to introduce a web-based data acquisition system using the LabVIEW software program to measure environmental parameters for poultry management, (2) to deliver an algorithm for the uncertainty analysis of various sensor data based on the methods of type A and B evaluation, and (3) to examine the system performances based on the uncertainty analysis of the sensor network.

Overview of the Hardware of the Data Acquisition System
The hardware of the data acquisition system (short for System 1) mainly consisted of various sensors, signal conversion modules, and a datalogger embedded, and its software was a data acquisition program, as presented in Fig. 1.The data acquisition module was designed to collect the environmental parameters including air temperature, relative humidity, and CO2 concentration of a compartment housing for laying hens.The power supply and digital output of the sensors were 24 V DC and 4-20 mA.Other sensors with the same signal output can also be feasible for this system.The features of the sensors used in this system are listed in Table 1.
The key component of this system is the signal conversion module (Model DAM-E3058F, Art Technology Development Ltd, Beijing, China) with the following specifications: 8 channels of analog output, 10 Hz sampling rate, and 16-bit resolution.The module interacts with the data server through web request based on the Modbus Communication Protocol.It allows the system to read out the values from the sensors and transfer the signal values to measured values using a linear interpolation method.
The key component of this system is the signal conversion module (Model DAM-E3058F, Art Technology Development Ltd, Beijing, China) with the following specifications: 8 channels of analog output, 10 Hz sampling rate, and 16-bit resolution.The module interacts with the data server through web request based on the Modbus Communication Protocol.It allows the system to read out the values from the sensors and transfer the signal values to measured values using a linear interpolation method.The Ethernet router (HT-3GW, HLWT-TECH Ltd, Beijing, China) is used to establish communications with remote sites based on Third-Generation Wireless Networks (3G), as shown in Fig. 1.The terminal users connect to the system for monitoring the environmental condition and determine the poultry performance remotely.

Program Demonstration of the Data Acquisition System
The data acquisition program was written in the LabVIEW graphical programming language (National Instruments, Austin, TX, USA).The program was installed on a data server (PowerEdge R710, Dell, Round Rock, TX, USA) with two Xeon quad-core processor E5520 (8 M Cache, 2.26 GHz) and 8 GB RAM (random access memory).The main user interface of the program includes four sections: program management panel, data acquisition setting panel, data preview panel, parameter configuration panel, as shown in Fig. 2. In the program management panel, the users can set the acquisition interval and manually stop the program.In the data acquisition setting panel, the users can add more channels for data acquisition, select data collection points, and modify the Internet Protocol (IP) address of the modules.The data preview panel is used to display real-time environmental parameters, acquisition information of date-time, house-identification, and collection-position.In addition to the above panels, most importantly, the program can use the parameter configuration panel to input the measurement range and output type (4-20 mA, 0-5 V, or any other types) of the various sensors.Measured values i x were calculated by: Where, i x is the ith measurement value, unit is defined by the measured parameter; i S is the ith analog output value received from the module, units in mA;

Animals and Housing
In this study, the experiment was conducted at the Shangzhuang Experimental Station (Haidian District, Beijing, China).A group of 90 laying hens (Hy-Line ® Variety Brown, U.S. standard) obtained from a commercial farm (De Qingyuan Agricultural Farm, Yanqing District, Beijing, China) were used.The birds were 32-weeks old when the experiment started on June 27, 2016 and were housed in a pen with the perch system, shown in Figs.3(a) and (b).The perch system is located in an individual compartment, measuring 4.5 m×1.5 m×3.0 m (l×w×h) and placed on an elevated plastic grid.It has two lines of drinking water, two stages of food platform, two laying nests, and six perches.The system has two feed lines and two nipple drinker lines, ensuring an even distribution of birds and sufficient activities within the system.Easy access to the nest box through the step perch and soft nest with the grass mat ensures high acceptance among the hens.The system has six perches with an average distance of 300 mm and a ground angle of 40°, and the birds can easily move between the perch levels owing to the step design.The manure can be cleaned by manure belts beneath the plastic grid to collect the droppings for healthy hens.During this experiment, the light period fell between 05:00 h and 21:00 h.Feed and water were available ad libitum.The normal management practice was performed, with one visit (less than 300 s) in the morning and another one (less than 300 s) in the afternoon.During the visits, the caretaker inspected the flock and pen and examined the feed and water.

Data Collection
Two datasets were collected.One was with the sensor data measured by the web-based data acquisition system (System 1) as the calculated values for the uncertainty analysis.The other one was with the reference data recorded by the measurement system (System 2) with standard instruments after calibration as the true values for the data evaluation.Both data were collected simultaneously in the same pen with the same birds under the same configuration.The sources of data collection were the main environmental parameters of the laying hen houses including the air temperature, relative humidity, and carbon dioxide concentration.For the evaluation of the measurement errors, the same data were recorded continuously for 7 days with an acquisition interval of 5 min when the laying hens were between 32 and 33-weeks old.

Methods of Uncertainty Analysis for Sensors Data
The usefulness of this data acquisition system for poultry production depends on the performances of the sensors.Therefore, the calibration of the sensors and uncertainty analysis of the sensor data must be conducted completely to maximize the reliability of this system.The traditional procedures of the statistical approaches are strongly dependent on specific assumptions.A complete uncertainty budget has to be calculated for each sensor and any other effects of the instability sources fulfilling the standards of GUM.The measured values in this system depend on the calibration task of the instruments, signal sampling process of the module, data processing with the data server, and any other influences for each sensor.The relevant uncertainty sources are shown in the cause and effect diagram in Fig. 4.

Calibration Procedure and Calculation Algorithm
A solution is to digitalize the uncertainty sources using mathematical modeling.The general model for the evaluation of the system performances depending on input n quantities of each sensor can be given in the following form: Where, i X are the measured values obtained from each sensor used in the web-based data acquisition system over the measurement period, and s X are the true values derived from the measurement system with standard instruments after calibration.
Typically, the arithmetic mean, standard deviation, and measurement error are used to combine the results of the test.The Bessel formula to estimate the sample is Where, i x  is the measurement error; i x  is the arithmetic mean of the measurement error; n is the sampling quantity, i x s is the standard deviation of the measurement error.
Following the standards of GUM, term i x s represents the uncertainty of the method of type A evaluation.Value uA was determined by the measurement error between System 1 and 2, which can be calculated by [eq.( 4)].
In this uncertainty analysis, the method of type B evaluation is related to the accuracy of the sensors, precision of the measuring instruments, data processing approaches, and any other effects, as shown in Fig. 4. The value (uB) of the evaluation method can be expressed as Engenharia Agrícola,Jaboticabal,v.38,n.6,novFrom the cause and effect with uncertainty sources of this system (Figure 4), it is concluded that the sensitivity and uncertainty of environmental sensors could be used to examine the system performance and stability.Adding the relative uncertainties of the three environmental parameters, the total uncertainty of this system in accordance with the standards of GUM is given in [eq.( 9)]: As listed in Table 2, the measurement uncertainties of this data acquisition system mainly originate from the sensors of relative humidity and CO2 concentration having a higher relative uncertainty (ur).Relative humidity sensors employing a moisture sensitive device (MSD) are commonly used for monitoring a wide range of application sectors.However, the long-term stability of this sensing device is still a major challenge owing to environmental pollution and static electricity (Chen & Lu, 2005;Tripathy et al., 2014).In addition, based on the multi-point air sampling and analyzing system (Ni et al., 2010) and wide applications of electrochemical-based sensors for CO2 sensing methods (Behera et al., 2015), the CO2 concentration measurement can be easily disturbed by airflow fluctuation and human operation.Hence, very precise measurements and error evaluation were needed and adopted to elicit the disturbances and provide excellent stability.
During the process of data evaluation and uncertainty analysis, Monte Carlo methods have shown to be a reasonable tool for uncertainty analysis and delivering realistic results when the model is highly complex (Kraan, 2015).From the comparisons, it is obvious that the methods of type A and B evaluation following the standards of GUM are appropriate for the evaluation using the data acquisition system.The corresponding probability distribution functions (PDFs) could not be retrieved between the data acquisition system and various sensors.Such a model is invalid for uncertainty analysis and sensor network evaluation because the relationships between the data acquisition system and sensors are unknown (Behrens, 2010;Ljungblad et al, 2011;Renault & Scheeres, 2015).Thus, the algorithm following GUM for the uncertainty analysis proves to be efficient for evaluating the performances of the sensor networks and data acquisition system.From the case study in this research, it is concluded that calibration of the sensors and reduplicated measurements are essential and indispensable to eliminate the systematic errors and standard deviation during the data acquisition process.Every effort must be taken to ensure that this system is appropriate for environment monitoring and poultry management by decision makers while simultaneously considering the multiple sources of uncertainty (Calvet et al., 2013;Leinonen et al., 2016).

CONCLUSIONS
In this research, a web-based data acquisition system using the LabVIEW software program for poultry management was developed and an uncertainty analysis of various sensor data was proposed for error correction.The results indicated that most of the instabilities sources were related to the measurement activities of the relative humidity and CO2 concentration.The total uncertainty of this system was estimated as 15.9%, fulfilling the standards of GUM for current performances.To improve the system accuracy, the standards of GUM were used to provide the calculated mobility with the measured data.The precision control of this system was achieved by obtaining accurate data from the sensors.To improve animal management, high-level algorithms of uncertainty analysis are being tested at the supervisory level.Through repeated calibration and practical application in commercial farms, this system could be an excellent management tool for poultry production, which will increase the profitability and quality.

FIGURE 1 .
FIGURE 1. Framework of a web-based data acquisition system.

HR
is the sensor measurement range at the high end, unit defined by the measured parameters, and L R is the sensor measurement range at the low end, for each sensor.

FIGURE 2 .
FIGURE 2. Main graphical user interface of the program.
FIGURE 3. Photos of the perch system for laying hens.

FIGURE 4 .
FIGURE 4. Cause and effect diagram with the uncertainty sources of the data acquisition system.

TABLE 1 .
Features of the sensors used in this system.

TABLE 2 .
./dec.2018 Uncertainty analysis of the various sensor data following the standards of GUM.