PERFORMANCE OF FUZZY INFERENCE SYSTEMS TO PREDICT THE SURFACE TEMPERATURE OF BROILER CHICKENS

This study aimed to compare fuzzy systems with different configurations to predict the surface temperature (ts) of broiler chickens subjected to different intensities and durations of thermal challenges in the second week of life. Data on the ts of broiler chickens aged 8 to 11 days were acquired by infrared thermography and subjected to combinations of four dry-bulb temperatures (tdb) (24, 27, 30, and 33 oC) and four durations of thermal challenges (DTC) (1, 2, 3, or 4 days). The input variables of the fuzzy systems were tdb and DTC, and the output variable was ts. The Mamdani inference method involving five defuzzification methods [center of gravity (centroid), bisector of the area (bisector), largest of maximum (lom), middle of maximum (mom), and smallest of maximum (som)], and Sugeno inference with two defuzzification methods [weighted average (wtaver) and weighted sum (wtsum)] were evaluated. For both inference methods, triangular and Gaussian pertinence functions were tested for input and output variables, except for Sugeno inference, which used singletons functions as output variables. While developing fuzzy systems, different configurations must be compared, and the system with smaller simulation errors should be selected.


INTRODUCTION
The thermal environment affects poultry production in Brazil and is a challenge to the application of confinement techniques because of the large territorial extension of the country (Ferraz et al., 2014).In addition, the increased consumption of chicken meat demands the application of new techniques to better explore the genetic potential of poultry to meet internal and external consumption demands (Nascimento et al., 2011;Abreu et al. 2015).
The microclimatic conditions in the breeding environment have a strong effect on the thermal comfort of broiler chickens (Mirzaee-Ghaleh et al., 2015).Among the environmental factors, air temperature and relative humidity are the most relevant to poultry because they affect the control of body temperature and heat exchange for maintaining homeothermy (Costa et al., 2012;Ferreira et al. 2012).
Energy expenditure to maintain homeothermy leads to physiological changes in the surface temperature of birds and compromises animal performance (Oliveira et al., 2006).Surface temperature is a rapid response to discomfort caused by changes in ambient temperature (Dahlke et al., 2005).
Among the technologies available for measuring surface temperature, infrared thermography has been used in several studies to identify physiological peaks in birds, including broiler chickens (Nascimento et al., 2014), laying hens (Souza Junior et al., 2013a), quails (Souza Junior et al., 2013b), and turkeys (Mayes et al., 2014), because this technique is noninvasive and does not require contact with the animals, preventing stress.
To perform embedded control in systems and predict the productive responses of broiler chickens, fuzzy models have good efficiency in poultry husbandry (Ponciano et al., 2012;Schiassi et al., 2015) and other fields, including civil engineering (Wang et al., 2005), agriculture (Kisi, 2013), and medicine (Salgado et al., 2016), indicating the diversity of applications and efficiency in data representation.
The fuzzy logic is composed of three steps: fuzzification, inference, and defuzzification.The inference is also known as a controller and can be of the Mamdani type (1974), in which the antecedent and consequent are Engenharia Agrícola, Jaboticabal, v.38, n.6, p.813-823, nov./dec. 2018 fuzzy sets, or the Takagi & Sugeno type (1985), in which the consequent is formed by a constant value based on input data (Raj & Mohan, 2016).
This study focused on comparing fuzzy systems with different configurations to predict the surface temperature of broiler chickens subjected to different intensities and times of thermal treatment in the second week of life.

MATERIAL AND METHODS
The study was conducted using four climatecontrolled wind tunnels.Each wind tunnel contained a cage (0.24 m²) with three divisions, which corresponded to the repetitions in each cage.Twenty-five broiler chickens of the Cobb 500 breed were used, with 60 animals per stage (a total of four stages) and 15 animals per tunnel (five per division), respecting the housing density and avoiding adverse effects on animal welfare (Cobb, 2013, Castilho et al., 2015).One animal was withdrawn each week to keep the housing density at levels recommended by the Breed Guide, leaving three birds per cage division at the end of the third week.
Broiler chickens aged 8 to 11 days were housed in the climate-controlled wind tunnels and subjected to four dry-bulb temperatures (tdb) (24, 27, 30, and 33 ºC) and four durations of thermal challenge (DTC) (1, 2, 3, or 4 days), totaling 16 treatments.After exposure to thermal treatment, the tdb was maintained at 30 ºC, which is considered the comfort temperature in the second week of life of the animals.In the breeding period preceding the study, i.e., in the first week of bird life, tdb was maintained at 33 C to provide thermal comfort to birds (Cony & Zocche, 2004;Schiassi et al., 2015).
Relative humidity and air velocity were maintained at 60 ± 1% and 0.2 ± 0.1 m s -1 , respectively, which are considered comfort conditions for broiler chickens by providing good air quality and meet the oxygen demand of the animals without changing the temperature or decreasing thermal comfort (Medeiros et al., 2005;Carvalho et al., 2011).The light intensities of 25, 10, and 5 lux were used in the first, second, and third weeks of life, respectively (Cobb, 2013).Water and feed were available ad libitum.The climate-controlled wind tunnels and cages were cleaned daily to avoid the accumulation of gases and making the environment compatible with the physiological needs of the animals (Sousa et al., 2016).
The thermographic images of the study animals were measured using a thermographic camera (accuracy of 0.05 C) with an emissivity of 0.95 (Nääs et al., 2014).The equipment was positioned above the cages externally to each tunnel.A plastic film was placed over each tunnel near the cage to allow image acquisition.The thermographic images were analyzed using Fluke Smart View software, and the average surface temperature (ts) was obtained on the surface of the head, neck, back, and wings of three birds, one in each division of the cage.
After data collection, fuzzy modeling was started by establishing the membership functions for data input (tdb and DTC) and output (ts).The fuzzy logic toolbox of MATLAB R2009a has two types of controllers, Mamdani and Sugeno, and each controller allows performing defuzzification and membership functions for both input and output data.
Five defuzzification methods were used in Mamdani inference: center of gravity of the area (centroid), the bisector of the area (bisector), largest of maxima (lom), middle of maxima (mom), and smallest of maxima (som).In contrast, the Sugeno controller has only two types of defuzzification: weighted average (wtaver) and weighted sum (wtsum).
Triangular and Gaussian membership functions were used for the input variables in both inference methods (Figure 1).For the output variable, triangular and Gaussian membership functions were used for the Mamdani controller, and singletons functions were used for the Sugeno controller because these functions were representative of the input variables (Figure 2).
The rule system was developed on the basis of the combinations of inputs (total of 20), which were assigned a weight of 1 to establish relevant equality for each rule and reach associations able to optimized the parameters (Sargolzaei et al., 2008;Abreu et al., 2015).
The significance of the treatments for ts was analyzed using a completely randomized design with three replicates and a 4 × 4 factorial arrangement of tdb (24, 27, 30, and 33 ºC) and DTC (1, 2, 3, and 4 days).Statistical analyses were performed using the statistical software SISVAR version 5.3 (Ferreira, 2010), and data were subjected to the F test of the analysis of variance.

RESULTS AND DISCUSSION
In the first three weeks of life, the maintenance of thermal comfort conditions is essential in broiler chickens, and ts varies as a function of tdb (Abreu et al., 2012).The results of this study corroborate those of the above study, in which ts was increased or decreased when birds were subjected to high or low tdb values, respectively, and this variation was dependent on the age of the animals.
Since the interaction between tdb and DTC was significant (p<0.05,F test) for the mean ts values, 14 fuzzy systems were developed by applying different methods of inference and defuzzification and different types of pertinence functions for predicting ts.The statistical indices used to compare the systems and their respective configurations are shown in Table 1.Defuzzification methods: center of gravity of the area (centroid), the bisector of the area (bisector), largest of maximum (lom), middle of maximum (mom), smallest of maximum (som), weighted average (wtaver), and weighted sum (wtsum).
Through the Mamdani inference system, the indicators of Gaussian functions were pointed out as better compared to those of triangular functions, regardless of the defuzzification method applied.
The best results were obtained using Sugeno inference, which provided numerically equal results for both triangular and Gaussian functions, except in cases in which wtsum was applied with Gaussian functions.The calculated values of S, MPE, MAE, R 2 , and RMSE were 0.0420, 0.1838, 0.0594, 0.9978, and 0.0757, respectively.Kisi (2013) found that Sugeno inference produced better estimates than Mamdani inference, and the analysis of reference evapotranspiration indicated that MAE, RMSE, and R 2 values were 0.233, 0.345, and 0.978, respectively, using Mamdani inference, and 0.073, 0.102, and 0.998, respectively, using Sugeno inference.In addition, the accuracy of Sugeno inference was higher than that of artificial neural networks and empirical models.
The studies on animal husbandry using broiler chickens and fuzzy composition and performance are shown in Table 2.The analysis of different fuzzy system configurations allowed testing the combinations of pertinence functions, inference and defuzzification methods, and determine the accuracy of these methods (Table 1).
The type of function should be selected according to data characteristics to achieve high representativeness.Some data from triangular functions can be replaced with Gaussian functions.In addition, MATLAB provides a Gaussian membership function that can assume trapezoidal format, allowing the substitution without loss and errors of representativeness.
Engenharia Agrícola,Jaboticabal,v.38,n.6,novThe correlation graphs of ts values obtained experimentally and predicted by fuzzy systems and respective R 2 values are shown in Figures 3 and 4. The adjustment of the line with a slope of 45º that passes through the origin allows determining the accuracy and the values of equivalence, overestimation, or underestimation between the observed and predicted data using the fuzzy systems.The distributions of absolute errors indicate that the ts values simulated by fuzzy systems were accurate because the errors were below 0.6 °C (Figures 5 and 6).In the models that yielded the best estimates (Sugeno inference with either wtaver and wtsum defuzzification and triangular functions or wtaver defuzzification and Gaussian functions), 75% of errors occurred in the range of 0.0 to 0.1 °C (Figures 5f,5g,and 6f), resulting in an average absolute error of 0.0594 °C (Table 1).Ponciano et al. (2012) proposed a fuzzy system for predicting production parameters in broiler chickens (feed intake, feed conversion, and weight gain), and the average absolute error was 4.28 (Table 2).
Engenharia Agrícola, Jaboticabal, v.38, n.6, p.813-823, nov./dec. 2018 FIGURE 7. Response surfaces of the surface temperature of broiler chickens (ts) as a function of air dry-bulb temperature (tdb) and the duration of thermal challenge (DTC) in fuzzy systems using Sugeno inference with triangular pertinence functions of input variables, and (a) wtaver and (b) wtsum defuzzification; and Gaussian membership functions with (c) wtaver defuzzification.
The analysis of ts indicated that from the second day of heat treatment, the animals became adapted, retaining or dissipating heat at both low and high temperatures (< 26 ºC and > 30.5 ºC, respectively) (Figure 7).By contrast, near a tdb of 30 ºC, recommended as the comfort temperature for poultry in the second week of life (Schiassi et al., 2015), the average surface temperature remained constant, evidencing the thermal comfort of the animals and lower energy expenditure for temperature maintenance.
The fuzzy systems (triangular functions with wtaver and wtsum defuzzification and Gaussian functions with wtaver defuzzification) represented by the response surfaces (Figures 7a, b, and c) yielded the same statistical indices when compared with the experimental data (Table 1).However, Student's t-test for equality of means (α = 5%) was applied to compare the other ts values not evaluated experimentally as a function of tdb and DTC, i.e., the temperature difference between 90 points equally spaced on each surface.
The responses were similar using different defuzzification methods (Figures 7a and b).However, there was a significant difference (p<0.05) in two response surfaces using the same defuzzification method (wtaver) (Figures 7a and c).This difference is due to the membership functions of the input variables because Gaussian functions produced smaller overlaps when compared with triangular functions, consequently reducing the degree of the pertinence of one curve over the other in the process of wtaver for conversion of the output response, therefore producing distinct points of prediction.

CONCLUSIONS
The selection of the inference and defuzzification methods and pertinence functions that compose fuzzy systems may result in different levels of prediction errors, and these errors should be evaluated for each set of input and output variables using statistical indicators.
For the analyzed data, the simulation errors were comparatively smaller in the fuzzy systems using Sugeno inference and triangular pertinence functions of input variables independent of the defuzzification method (weighted average or weighted sum) and Gaussian pertinence functions with weighted average defuzzification.
Fuzzy systems with Mamdani inference, which included triangular pertinence functions of input and output variables and bisector defuzzification, generated smaller simulation errors.

FIGURE 1 .
FIGURE 1. Triangular membership functions (a and c) and Gaussian membership functions (b and d) applied to two input variables: dry-bulb temperature (tdb) and duration of thermal challenge (DTC).
FIGURE 2. (A) Triangular, (b) Gaussian, and (c) singletons membership functions applied to the surface temperature of broiler chickens (ts) (output variable).
calculated using data from the present study.

TABLE 1 .
Statistical analysis used to evaluate the configurations of different fuzzy inference systems.
* Indicates the best results for each fuzzy system in the column.Legend: S, mean standard deviation; MPE, mean percentage error; MAE, mean absolute error; R 2 , determination coefficient; RMSE, rootmean-square error.

TABLE 2 .
Fuzzy system configurations used in predictions in poultry and respective statistical indicators. ./dec.2018