scieee AI-readable full text Open interactive document viewer

Evolution and neural network prediction of CO2 emissions in weaned piglet farms

Rodríguez Rodríguez, Manuel Ramiro; Besteiro, Roberto; Ortega Martínez, Juan Antonio; Fernández Rodríguez, María Dolores; Arango López, Tamara

Abstract

This paper aims to study the evolution of CO2 concentrations and emissions on a conventional farm with weaned piglets between 6.9 and 17.0 kg live weight based on setpoint temperature, outdoor temperature, and ventilation flow. The experimental trial was conducted during one transition cycle. Generally, the ventilation flow increased with the reduction in setpoint temperature throughout the cycle, which caused a reduction in CO2 concentration and an increase in emissions. The mean CO2 concentration was 3.12 g m–3. Emissions of CO2 had a mean value of 2.21 mg s−1 per animal, which is equivalent to 0.195 mg s−1 kg−1. A potential function was used to describe the interaction between 10 min values of ventilation flow and CO2 concentrations, whereas a linear function was used to describe the interaction between 10 min values of ventilation flow and CO2 emissions, with r values of 0.82 and 0.85, respectively. Using such equations allowed for simple and direct quantification of emissions. Furthermore, two prediction models for CO2 emissions were developed using two neural networks (for 10 min and 60 min predictions), which reached r values of 0.63 and 0.56. These results are limited mainly by the size of the training period, as well as by the differences between the behavior of the series in the training stage and the testing stage

Full text

  Citation: Rodriguez, M.R.; Besteiro, R.; Ortega, J.A.; Fernandez, M.D.; Arango, T. Evolution and Neural Network Prediction of CO2 Emissions in Weaned Piglet Farms. Sensors 2022,22, 2910. https:// doi.org/10.3390/s22082910 Academic Editor: Manuel Aleixandre Received: 30 March 2022 Accepted: 6 April 2022 Published: 11 April 2022 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. Copyright: © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). sensors Article Evolution and Neural Network Prediction of CO2Emissions in Weaned Piglet Farms Manuel R. Rodriguez 1,* , Roberto Besteiro 2, Juan A. Ortega 3, Maria D. Fernandez 1and Tamara Arango 1 1Department of Agroforestry Engineering, Higher Polytechnic Engineering School, University of Santiago de Compostela, 27002 Lugo, Spain; [email protected] (M.D.F.); [email protected] (T.A.) 2Centro de Investigaciones Agrarias de Mabegondo, Xunta de Galicia, 15318 A Coruña, Spain; roberto.besteir[email protected] 3Consellería do Medio Rural, Xunta de Galicia, 36500 Lalin, Spain; [email protected] *Correspondence: manuelramiro.r[email protected] Abstract: This paper aims to study the evolution of CO 2 concentrations and emissions on a conventional farm with weaned piglets between 6.9 and 17.0 kg live weight based on setpoint temperature, outdoor temperature, and ventilation flow. The experimental trial was conducted during one transition cycle. Generally, the ventilation flow increased with the reduction in setpoint temperature throughout the cycle, which caused a reduction in CO 2 concentration and an increase in emissions. The mean CO 2 concentration was 3.12 g m –3 . Emissions of CO 2 had a mean value of 2.21 mg s −1 per animal, which is equivalent to 0.195 mg s −1 kg −1 . A potential function was used to describe the interaction between 10 min values of ventilation flow and CO 2 concentrations, whereas a linear function was used to describe the interaction between 10 min values of ventilation flow and CO 2 emissions, with rvalues of 0.82 and 0.85, respectively. Using such equations allowed for simple and direct quantification of emissions. Furthermore, two prediction models for CO 2 emissions were developed using two neural networks (for 10 min and 60 min predictions), which reached rvalues of 0.63 and 0.56. These results are limited mainly by the size of the training period, as well as by the differences between the behavior of the series in the training stage and the testing stage. Keywords: CO2concentration; CO2emission; neural network; weaned piglets; post weaning cycle 1. Introduction Animal production is a fundamental activity for meeting the increasing global demand for food. However, this activity is a key contributor to global GHG emissions [ 1 , 2 ] and to the global problem of climate change [ 3 ]. Pig production accounts for a significant portion of these emissions [ 4 ], with a contribution of between 9 and 13% [ 2 , 3 ]. Considering the GHG produced by pigs and manure at pig house level, the gas that contributes the most to the greenhouse effect is CO 2 , with approximately 81% of emissions [ 5 ]. However, direct CO 2 emissions, arising from the animals and manure, are generally excluded from GHG evaluation, because they are supposed to be compensated by CO 2 consumption through photosynthesis, performed by the plants used as feed. For this reason, CO 2 production is rarely addressed in the literature [5]. CO 2 emissions from farms depend on two factors, CO 2 production and ventilation rate. Here, the main source of CO 2 is animal metabolism, followed by manure [ 6 ], although other sources may exist, such as heaters using propane or natural gas [ 7 ]. More specifically, the carbon dioxide produced by animals depends on animal weight and daily gain, while CO 2 emissions are also strongly affected by variations in animal activity [ 8 – 12 ]. Carbon dioxide emissions have also been reported to be affected by other factors, such as diet composition [ 13 , 14 ] and conversion efficiency, droppings management, or environmental conditions [ 15 ], following a sinusoidal pattern of daily emission [ 8 , 9 ]. Nevertheless, there are some discrepancies between the results that have been reported so far, probably due to Sensors 2022,22, 2910. https://doi.org/10.3390/s22082910 https://www.mdpi.com/journal/sensors Sensors 2022,22, 2910 2 of 14 variations in animal species, feeding level, farm practices, control strategy, manure management systems, animal density, geography, climate, season, and other factors [7,10] . In relation to pig production, variations have been found between physiological stages [ 5 , 16 ], which could be attributed to the conditions of the building, ventilation system, management, diet, or even gas measurement method. Thus, while different authors [ 17 , 18 ] have reported fairly similar CO 2 emissions during the fattening period, larger variations have been found during the other physiological stages [ 19 – 21 ], especially during weaning [ 5 ]. In fact, CO 2 production per unit of total heat production is much lower for weaning pigs than for growing finishing pigs [ 12 ]. In addition, large variations have been found in GHG emissions per unit of product across EU countries, mainly because of the differences observed in the production systems [5], feed type, and efficiency of nutrient use [22]. Farm buildings for piglets in transition, where weaned piglets are housed from weaning up to fattening, as well as delivery rooms, are the facilities with the highest levels of CO 2 concentration. This is because ventilation rates are kept reduced at this stage owing to the fact that animals require high temperatures and are very sensitive to air currents [ 23 ]. Consequently, although CO2emissions are affected considerably more by ventilation rate than by indoor air concentration [ 24 ], these farms present high levels of CO 2 emissions into the atmosphere due to the relationship between concentration and emission through the ventilation rate [ 24 , 25 ]. Moreover, the ventilation system and the control strategy can significantly affect the airflow inside livestock rooms, which can further affect the emission of gaseous contaminants from animal buildings [6]. Intelligent livestock farming, with a continuous improvement in the production efficiency of management systems, can contribute to decreasing GHG emissions [ 26 , 27 ]. In recent years, technological progress has contributed to obtaining positive results in the reduction of GHG emissions from pig production [ 28 ], although other studies have shown that these efforts may not be enough to achieve a sustainable level [ 29 , 30 ]. Therefore, there is a need to find housing systems that minimize ammonia and GHG emissions, and improve animal welfare [ 31 ]. In this respect, most existing studies focus on GHG emissions for ruminants, partly because of their high emission per unit of production. In contrast, fewer studies focus on monogastric animals, like pigs [32,33]. New research is thus necessary in order to obtain accurate emission factors [ 4 , 10 , 15 ], mainly under farm conditions [ 34 ], that cover the full production seasons [14]. A number of studies have been performed to evaluate emissions from farms with weaned piglets, both in field conditions [ 14 ] and in experimental rooms, during part of the transition period [ 3 , 13 ]. Two of those studies focused on determining the influence of different diets on GHG emissions and found that including dried distillers grains with solubles in the diet of piglets did not cause significant differences in CO 2 emissions [ 3 ]. In addition, using five different isoenergetic diets (control, low protein, inclusion of sugar beet pulp, addition of benzoic acid, and a combination of previous diets) only caused a 15% decrease in CO 2 emissions for the combined diet [ 13 ]. Different floor systems (strawbased deep litter, sawdust-based deep litter, and fully slatted floors) were also analyzed, but no significant differences in CO 2 emissions were found between systems [ 3 ]. There is a lack of studies aimed at quantifying CO 2 emissions on farms raising weaned piglets based on continuous measurements performed under field conditions. In contrast to the above studies, in this paper, we analyze the data for a complete production cycle, from weaning to fattening, from a conventional farm. Continuous measurements of environmental parameters and ventilation flow have been used, which results in quality data for a largely unexplored production stage. In addition to quantifying emissions, generating models that are capable of predicting the emission of gases from farms is necessary to achieve emission control through intelligent livestock farming. One of the emerging technologies for modelling and predicting farm emissions is artificial intelligence (AI), which has already been used for developing many applications and papers in the field of smart farming. The most common AI models used for the modelling, prediction, and management of variables related to livestock farming are Sensors 2022,22, 2910 3 of 14 artificial neural networks (ANN), convolutional neural networks, deep learning, adaptive neural fuzzy inference system (ANFIS), machine learning, and pattern recognition [ 35 ]. Specifically, ANFIS models have been used for modelling ammonia emissions in pig farms [ 36 ], and ANN and ANFIS (artificial neural network and adaptive neuro-fuzzy inference systems, respectively) have been used for modelling and predicting energy output and greenhouse gas emissions from calf fattening farms [37]. This paper aims to quantify and study the evolution of CO 2 concentration and emissions on a pig farm with weaned piglets from 6.9 to 17 kg LW during a complete transition cycle under field conditions. Our aim is to find the relationship between CO 2 concentration and emissions, and some control parameters of the air conditioning system, such as setpoint temperature, outdoor temperature, or ventilation flow, during one transition cycle. In addition, we present a neural network-based model for the prediction of 10 min and 60 min CO2emissions that can be incorporated into the environmental control system. 2. Materials and Methods Research was conducted in a conventional farm for the production of piglets located in NW Spain. Measurements were performed in a transition room, where piglets entered with an average weight of 6.9 kg at day 28 after birth and exited with 17.0 kg LW at day 65 after birth, covering a complete transition cycle, from 27 February to 4 April. An intermediate room was chosen in order to avoid the boundary effect of lateral positions in the building. The inner dimensions of the room, with polypropylene slats on the floor, were 11.82 m long by 5.86 m wide, and between 2.25 and 2.50 m high. The mean depth of the pit was 0.45 m. At the end of each cycle, the room was completely cleaned and manure was completely removed from the pit. The room had six pens on both sides of a central corridor and housed a maximum of 300 weaned piglets, with 50 piglets per pen, with 0.20 m 2 per piglet (Figure 1). Sensors 2022, 22, x FOR PEER REVIEW 3 of 14 veloping many applications and papers in the field of smart farming. The most common AI models used for the modelling, prediction, and management of variables related to livestock farming are artificial neural networks (ANN), convolutional neural networks, deep learning, adaptive neural fuzzy inference system (ANFIS), machine learning, and pattern recognition [35]. Specifically, ANFIS models have been used for modelling ammonia emissions in pig farms [36], and ANN and ANFIS (artificial neural network and adaptive neuro-fuzzy inference systems, respectively) have been used for modelling and predicting energy output and greenhouse gas emissions from calf fattening farms [37]. This paper aims to quantify and study the evolution of CO 2 concentration and emissions on a pig farm with weaned piglets from 6.9 to 17 kg LW during a complete transition cycle under field conditions. Our aim is to find the relationship between CO 2 concentration and emissions, and some control parameters of the air conditioning system, such as setpoint temperature, outdoor temperature, or ventilation flow, during one transition cycle. In addition, we present a neural network-based model for the prediction of 10 min and 60 min CO 2 emissions that can be incorporated into the environmental control system. 2. Materials and Methods Research was conducted in a conventional farm for the production of piglets located in NW Spain. Measurements were performed in a transition room, where piglets entered with an average weight of 6.9 kg at day 28 after birth and exited with 17.0 kg LW at day 65 after birth, covering a complete transition cycle, from 27 February to 4 April. An intermediate room was chosen in order to avoid the boundary effect of lateral positions in the building. The inner dimensions of the room, with polypropylene slats on the floor, were 11.82 m long by 5.86 m wide, and between 2.25 and 2.50 m high. The mean depth of the pit was 0.45 m. At the end of each cycle, the room was completely cleaned and manure was completely removed from the pit. The room had six pens on both sides of a central corridor and housed a maximum of 300 weaned piglets, with 50 piglets per pen, with 0.20 m 2 per piglet (Figure 1). Figure 1. Overview of the room and location of the sensors: extractor fan (A), internal corridor (B), drinker (C), feed distributor (D), air inlet (E), slat (F), feeder (G), indoor sensor structure (H), and heating plate (I). The sensors for the speed of the air extracted through the ventilation system (V m ) and CO 2 concentration at the ventilation air outlet (C OUTLET ) were located at (A) and the sensor for CO 2 concentration in the exterior corridor of air inlet (C INLET ) was located at (E). Figure 1. Overview of the room and location of the sensors: extractor fan ( A ), internal corridor ( B ), drinker ( C ), feed distributor ( D ), air inlet ( E ), slat ( F ), feeder ( G ), indoor sensor structure ( H ), and heating plate ( I ). The sensors for the speed of the air extracted through the ventilation system (V m ) and CO 2 concentration at the ventilation air outlet (C OUTLET ) were located at ( A ) and the sensor for CO2concentration in the exterior corridor of air inlet (CINLET) was located at (E). The air conditioning system comprised ventilation and warm water underfloor heating facilities. Environmental control was performed in the building through a temperature probe, without altering the usual conditions of the farm. The setpoint temperatures (T S ) defined for environmental control were between 26 and 23 ◦ C with a bandwidth of ± 1.5 ◦ C, and decreased gradually with the increase in the age and weight of the animals (Table 1). Sensors 2022,22, 2910 4 of 14 Clean air entered the room through two windows with air deflectors on the wall opposite to the fan (Figure 1E). The animals were provided feed ad libitum through a screw conveyor system with a feeder shared by two pens. Water was supplied through two drinking cups in each pen. Table 1. Setpoint temperature (T S ), day of the cycle on which T S was set, piglet age, mean weight of piglets, and number of data. TS (◦C) Setting of TS (Day of the Cycle) Piglet Age (Days) Mean Weight of Piglets (kg) Number of Data 26 1 28 7.46 994 25 8 36 8.90 1152 24 16 44 12.12 1872 23 29 57 15.58 1297 CYCLE 11.39 5315 The number of animals was registered daily. Animals were weighed at the beginning of the cycle, on day 28 after birth, on day 38 when the feed type was changed, and at the end of the cycle on day 65 after birth. In order to obtain the value for emissions per kg throughout the cycle, a linear interpolation was performed between the weighed values. Table 1shows the mean weight of the piglets for each setpoint temperature. Table 2shows the environmental variables measured and the sensors used to measure them. Variables were measured every second, and the averages for every 10 min interval were stored in a HOBO®data logger (Bourne, MA, USA). Table 2. Variables measured and sensors used in the experimental trial. Variable Name Sensor Measurement Range Accuracy CO2concentration at the ventilation air outlet COUTLET Transmitter (Delta Ohm HD37BTV.1, Delta Ohm, Caselle di Selvazzano, Italy) 0–5000 ppm 50 ppm ±4% CO2concentration in the exterior corridor of air inlet CINLET Outdoor temperature on the farm plot TOUT S-THB-M002 sensor installed in an EIC Control U-30 weather station (Onset Computer Corp., Bourne, MA, USA) −40–75 ◦C±0.2 ◦C from 0◦C to 50 ◦C Indoor temperature TIN Speed of the air extracted through the ventilation system Vm Active air speed transmitter (Delta Ohm HD2903TTC310, Delta Ohm, Caselle di Selvazzano, Italy) 0.20–20 m s−1±0.4 m s−1+ 3% of measurement Based on the speed of the air extracted, the flow extracted through the fan (Q) was calculated using the following expression: Q= 1.143 Vm·S(1) where: Q= flow extracted through the fan (m3s−1); Vm= mean speed (m s−1); 1.143 = relation between V m at every measured point and speed measured at the location of the sensor, in m s−1; S= duct section (0.303 m2). The emission of CO 2 peranimal,E CO2 , was calculated according to the following expression: ECO2 = (COUTLET −CINLET)Q/n(2) Sensors 2022,22, 2910 5 of 14 where: ECO2 =emission of CO2per animal (mg s−1); C OUTLET = concentration of CO 2 at the ventilation air outlet (mg m −3 ), measured at a height of 2.30 m; C INLET = concentration of CO 2 in the exterior corridor of air inlet (mg m −3 ), obtained as a mean of the measurements performed at four positions at an average temperature of 17.75 ◦C; n= number of animals in the room. 2.1. Prediction of CO2Emissions Neural networks were trained to predict CO 2 emissions at 10 min and 60 min intervals. An artificial neural network (ANN) is a method used for modelling non-linear relationships between input and output variables [ 38 ]. An ANN does not require previous knowledge about how to handle the system, which turns it into a very efficient and versatile technique in complex processes. Since the 2000s, ANNs have been the most recurring artificial intelligence models in the field of research on animal farming, mainly for detecting illnesses, estimating growth performance, or monitoring and controlling environmental conditions [ 35 ]. Since then, different training algorithms have been used, such as back propagation, radial basis function, or feed forward [ 37 , 39 ]. In this paper, a multilayer perceptron neural network was used. A resilient backpropagation method with weight backtracking, available in the “neuralnet” pack of R [ 40 ], was used to train the ANN. This algorithm is a first-rate optimization method similar to the backpropagation algorithm, but is generally faster, without the requirement of specifying free parameter values [41]. The number of neurons in the input and output layers is determined by the input and output variables of the model. In this case, three inputs were used, namely the values of Q,T IN , and C CO2 measured during the previous 10 min or 60 min periods, to obtain the output, E CO2 . On the contrary, there is no specific procedure to determine the number of neurons, M, of the hidden layer. This value is defined through a procedure of trial and error. After having checked the performance of different neural network structures, and having evaluated the average degree of fit of up to 40 training iterations with each structure, we chose a network with an input layer of three neurons and one output layer of one neuron, with two hidden layers, and a total of 3-4-4-1 neurons per layer. This structure was the most efficient at predicting emissions for both the 10 min and 60 min periods. Moreover, the initial weights of the network were allocated randomly. A logistic activation function was used because of the common use of these functions in the field of agriculture [ 37 ]. The stopping criterion was set to 0.01, with a maximum number of steps for the training of 1 ×105. 2.2. Evaluation of the Performance of the Model In order to evaluate the performance of the model, three statistical measures were used: root mean square error (RMSE), Pearson correlation coefficient (r), and mean absolute relative error (MARE). RMSE was used to measure the difference between the predictions of the model and the observed values. The values of RMSE are expressed in units, while MARE indicates the size of the error in relative terms. The Pearson correlation coefficient indicates the strength and direction of a linear relationship between the predicted and observed values. RMSE =s∑n i=1(y−y0)2 n(3) MARE =1 n n ∑ i=1 y0−y y (4) r=∑n i=1(y−y)(y0−y0) q∑n i=1(y−y)2q∑n i=1(y0−y0)2(5) Sensors 2022,22, 2910 6 of 14 where yis the observed value; y0is the predicted value; yand y0are the average values of yand y0, respectively; and nis the number of values. 3. Results and Discussion The mean CO 2 concentration at the air outlet of the building where piglets between 6.9 kg and 17.0 kg were housed was 1852 ± 711 ppm, which is equivalent to 3.12 ±1.20 g m–3 (Table 3). These values were near the lowest mean value of 1981–3253 ppm found in different trials for pigs between 5.5 and 118 kg, with highly extreme temperatures and very restricted ventilation over a prolonged period in the cycle [ 14 ], and slightly higher than the mean of 2.89 g m –3 found for pigs between 13 and 32 kg in environmental chambers [ 13 ]. All of these CO 2 concentrations were far below the 5.30 mg m −3 obtained for animals between 17 and 20 kg [20]. Table 3. Main statistics for CO2concentration in the building for different setpoint temperatures. TSMaximum Minimum Mean SDE (◦C) (g m3) 26 9.50 1.05 4.59 1.22 25 8.07 1.69 3.34 0.89 24 7.19 1.31 2.97 0.74 23 5.69 1.02 2.02 0.56 CYCLE 9.50 1.02 3.12 1.20 The mean CO 2 emission was 2.21 ± 1.09 mg s −1 pig −1 (Table 4), which is below the emissions reported by other authors in buildings with fully slatted floors [ 3 ] for pigs in the same growth stage, with very similar weights of 7 and 23 kg and emission values of 3.51 and 3.95 mg s −1 pig −1 . By transforming the unit based on animal weight, the emission obtained was 0.195 ± 0.074 mg s −1 kg −1 . This value was only above the 0 .139 mg s−1kg−1 found for pigs of 7 to 35 kg [ 19 ], and well below the values reported in other studies that analyzed different diets, with mean values of 0.293 mg s −1 kg −1 for piglets between 13 and 32 kg [ 13 ], and values of 0.423 mg s −1 kg −1 and 0.549 mg s −1 kg −1 for pigs between 5.5 and 118 kg [ 14 ]. Even though both studies focused on pigs with weights within the range analyzed in our study, the study in [ 13 ] started at much heavier weights than the weights studied in our paper and ended much later, while the study in [ 14 ] started at a slightly lower weight, but included the finishing stage, so that the animals ended up being much older. The weaned piglet stage is the one with the largest variations in CO 2 emissions, whereas other stages produce more homogenous emissions [ 5 ]. Despite this, the studies devoted to the effect of different diets on weaned piglets have not found significant differences on CO 2 emissions [ 13 , 14 ]. Likewise, using a fully slatted floor as opposed to straw-based deep litter or sawdust-based deep litter did not cause significant differences in CO2emissions [3]. Table 4. Main statistics for CO 2 emissions from the building per animal and per weight for different setpoint temperatures. TS (◦C) Emission Maximum Minimum Mean SDE 26 per animal (mg s−1)4.262 0.103 1.842 0.600 per weight (mg s−1kg−1)0.602 0.015 0.249 0.088 25 per animal (mg s−1)3.554 0.774 1.548 0.341 per weight (mg s−1kg−1)0.443 0.086 0.175 0.041 24 per animal (mg s−1)3.926 0.699 1.875 0.578 per weight (mg s−1kg−1)0.321 0.066 0.155 0.047 Sensors 2022,22, 2910 7 of 14 Table 4. Cont. TS (◦C) Emission Maximum Minimum Mean SDE 23 per animal (mg s−1)12.343 0.565 3.566 1.242 per weight (mg s−1kg−1)0.751 0.033 0.229 0.078 CYCLE per animal (mg s−1)12.343 0.103 2.210 1.093 per weight (mg s−1kg−1)0.751 0.015 0.195 0.074 3.1. Variation of CO2Concentration and Emissions with Setpoint Temperature The CO 2 concentration in the building reached its peak with the highest setpoint temperature, 26 ◦ C, set at the start of the cycle, and decreased as animals grew and the setpoint temperature was reduced (Table 3, Figure 2A). The mean CO 2 concentrations for every setpoint temperature were lower than the measurements reported by [ 42 ], although concentrations were always in the range reported by a number of authors for pig farms [43–45]. In summary, the CO 2 concentration declined as the animals grew. In contrast, another study reported increasing concentrations [ 13 ], which may be caused by the different ages of the animals (28 days vs. 37 days). As a result of age difference, higher temperatures and lower ventilation rates were required in our study to ensure animal welfare conditions. Actually, a trend of increasing concentrations was observed in the final stage of the cycle analyzed in our study (Figure 2A). Sensors 2022, 22, x FOR PEER REVIEW 7 of 14 Table 4. Main statistics for CO2 emissions from the building per animal and per weight for different setpoint temperatures. TS (°C) Emission Maximum Minimum Mean SDE 26 per animal (mg s−1) 4.262 0.103 1.842 0.600 per weight (mg s−1 kg−1) 0.602 0.015 0.249 0.088 25 per animal (mg s−1) 3.554 0.774 1.548 0.341 per weight (mg s−1 kg−1) 0.443 0.086 0.175 0.041 24 per animal (mg s−1) 3.926 0.699 1.875 0.578 per weight (mg s−1 kg−1) 0.321 0.066 0.155 0.047 23 per animal (mg s−1) 12.343 0.565 3.566 1.242 per weight (mg s−1 kg−1) 0.751 0.033 0.229 0.078 CYCLE per animal (mg s−1) 12.343 0.103 2.210 1.093 per weight (mg s−1 kg−1) 0.751 0.015 0.195 0.074 3.1. Variation of CO2 Concentration and Emissions with Setpoint Temperature The CO2 concentration in the building reached its peak with the highest setpoint temperature, 26 °C, set at the start of the cycle, and decreased as animals grew and the setpoint temperature was reduced (Table 3, Figure 2A). The mean CO2 concentrations for every setpoint temperature were lower than the measurements reported by [42], although concentrations were always in the range reported by a number of authors for pig farms [43–45]. In summary, the CO2 concentration declined as the animals grew. In contrast, another study reported increasing concentrations [13], which may be caused by the different ages of the animals (28 days vs. 37 days). As a result of age difference, higher temperatures and lower ventilation rates were required in our study to ensure animal welfare conditions. Actually, a trend of increasing concentrations was observed in the final stage of the cycle analyzed in our study (Figure 2A). CO2 emissions decreased at the beginning of the cycle because of the limitation of ventilation flows and the weight of piglets (Table 4 and Figure 2B). Emissions during the first five days (TS = 26 °C) were higher than on the following days (change to TS = 25 °C) because the piglets showed more activity as a consequence of post-weaning stress. From that moment, emissions increased with the age of the animals, which was particularly noticeable at the end of the cycle (from day 28), as stated by [2]. The regular increase in CO2 emissions over the cycle suggests the influence of animal weight [3], which results from an increase in the metabolic rate and in CO2 production due to breathing [14]. (A) (B) Figure 2. Evolution during the cycle of (A) CO2 concentration, – CCO2 (g m−3), and (B) CO2 emissions per animal, – ECO2 (mg s−1), with setpoint temperature, – TS (°C). 0 2 4 6 8 10 22 23 24 25 26 27 0 5 10 15 20 25 30 35 g m−3 oC Time (days) 0 3 6 9 12 15 22 23 24 25 26 27 0 5 10 15 20 25 30 35 mg s−1 oC Time (days) Figure 2. Evolution during the cycle of ( A ) CO 2 concentration, –C CO2 (g m −3 ), and ( B ) CO 2 emissions per animal, –ECO2 (mg s−1), with setpoint temperature, –TS(◦C). CO 2 emissions decreased at the beginning of the cycle because of the limitation of ventilation flows and the weight of piglets (Table 4and Figure 2B). Emissions during the first five days (T S = 26 ◦ C) were higher than on the following days (change to T S = 25 ◦ C) because the piglets showed more activity as a consequence of post-weaning stress. From that moment, emissions increased with the age of the animals, which was particularly noticeable at the end of the cycle (from day 28), as stated by [ 2 ]. The regular increase in CO 2 emissions over the cycle suggests the influence of animal weight [ 3 ], which results from an increase in the metabolic rate and in CO2production due to breathing [14]. 3.2. Variation of CO2Concentrations and Emission with Outdoor Temperature The daily behavior of the CO 2 concentration was inverse to the evolution of the outdoor temperature (Figure 3A), with the highest concentrations occurring at night. This resulted in a negative correlation, with a value of r= − 0.695 for the cycle, which was above the value obtained by Ni et al. [46] for two manure-belt layer hen houses. Sensors 2022,22, 2910 8 of 14 Sensors 2022, 22, x FOR PEER REVIEW 8 of 14 3.2. Variation of CO2 Concentrations and Emission with Outdoor Temperature The daily behavior of the CO2 concentration was inverse to the evolution of the outdoor temperature (Figure 3A), with the highest concentrations occurring at night. This resulted in a negative correlation, with a value of r = −0.695 for the cycle, which was above the value obtained by Ni et al. [46] for two manure-belt layer hen houses. As shown in Figure 3B, during the first three days of the cycle, with TS = 26 °C, the outdoor temperature and CO2 emissions followed a similar pattern because of the effects of outdoor temperature on the ventilation system. On the following days, CO2 emissions decreased steadily until day 25, when outdoor temperature started to increase. During this interval, both variables showed a weak, inverse correlation (r = −0.475), which was in agreement with the correlation found by Ni et al. [46] for laying hens. This means that minimum emissions occurred at maximum outdoor temperatures. From that day until the end of the cycle, emissions followed a daily oscillation that was parallel to that of outdoor temperatures. (A) (B) Figure 3. Evolution throughout the cycle of outdoor temperature, – TOUT (°C) and setpoint temperature – TS (°C) with (A) CO2 concentration, – CCO2 (g m−3), and (B) CO2 emissions per animal, – ECO2 (mg s−1). 3.3. Variation of CO2 Concentrations and Emissions with Ventilation Flow The ventilation flow was highly reduced during the first days of the cycle, until day 25, with a mean of 0.17 m3 s−1 and a maximum of 0.50 m3 s−1 (Figure 4). After that, a transition stage began for three days with a mean of 0.33 m3 s−1 and a maximum of 0.82 m3 s−1. From day 28, ventilation flow was significantly increased, with a mean of 0.74 m3 s−1 and a peak of 2.02 m3 s−1. Consequently, CO2 concentrations varied depending on the ventilation flow, such that, as the flow increased, concentration decreased both throughout the cycle [13] and on a daily basis [6]. Maximum CO2 concentrations (Figure 4A) of 9.50 g m−3 were measured during the first 25 days, when the highest mean value of 3.63 g m−3 was reached. This means that, as stated by [23] and contrary to what is usually anticipated, maximum CO2 concentrations occurred when the animals were younger. Furthermore, as the ventilation flow increased, the CO2 concentration decreased near the fan, and, therefore, in the building [24,25,47]. Thus, higher ventilation rates involved lower CO2 concentrations inside the facilities, albeit with higher emission rates [6]. The relationship between CO2 concentration (CCO2 in g m−3) and the flow of air extracted through the fan (Q in m3 s−1) during the cycle (Figure 5A) is given by the following equation: CCO2 = 1.5316 Q−0.442 (6) The correlation coefficient between the CO2 concentration and ventilation flow is r = 0.82. 0 2 4 6 8 10 0 5 10 15 20 25 0 5 10 15 20 25 30 35 g m−3 oC Time (days) 0 3 5 8 10 13 15 0 5 10 15 20 25 30 0 5 10 15 20 25 30 35 mg s−1 oC Time (days) Figure 3. Evolution throughout the cycle of outdoor temperature, –T OUT ( ◦ C) and setpoint temperature –TS(◦C) with ( A ) CO 2 concentration, –C CO2 (g m −3 ), and ( B ) CO 2 emissions per animal, –E CO2 (mg s −1 ). As shown in Figure 3B, during the first three days of the cycle, with T S = 26 ◦ C, the outdoor temperature and CO 2 emissions followed a similar pattern because of the effects of outdoor temperature on the ventilation system. On the following days, CO 2 emissions decreased steadily until day 25, when outdoor temperature started to increase. During this interval, both variables showed a weak, inverse correlation (r= − 0.475), which was in agreement with the correlation found by Ni et al. [ 46 ] for laying hens. This means that minimum emissions occurred at maximum outdoor temperatures. From that day until the end of the cycle, emissions followed a daily oscillation that was parallel to that of outdoor temperatures. 3.3. Variation of CO2Concentrations and Emissions with Ventilation Flow The ventilation flow was highly reduced during the first days of the cycle, until day 25, with a mean of 0.17 m 3 s −1 and a maximum of 0.50 m 3 s −1 (Figure 4). After that, a transition stage began for three days with a mean of 0.33 m 3 s −1 and a maximum of 0.82 m3s−1 . From day 28, ventilation flow was significantly increased, with a mean of 0.74 m3s−1 and a peak of 2.02 m 3 s −1 . Consequently, CO 2 concentrations varied depending on the ventilation flow, such that, as the flow increased, concentration decreased both throughout the cycle [ 13 ] and on a daily basis [ 6 ]. Maximum CO 2 concentrations (Figure 4A) of 9.50 g m−3 were measured during the first 25 days, when the highest mean value of 3.63 g m−3 was reached. This means that, as stated by [ 23 ] and contrary to what is usually anticipated, maximum CO 2 concentrations occurred when the animals were younger. Furthermore, as the ventilation flow increased, the CO 2 concentration decreased near the fan, and, therefore, in the building [ 24 , 25 , 47 ]. Thus, higher ventilation rates involved lower CO2concentrations inside the facilities, albeit with higher emission rates [6]. Sensors 2022, 22, x FOR PEER REVIEW 9 of 14 CO2 emissions (Figure 4B) increased with the age of the piglets, in agreement with Stin et al. [16]. Mean CO2 emissions of 2.21 mg s−1 per animal were found for piglets with a mean weight of 11.39 kg during the cycle, although there was a sharp increase from day 28, with a peak of 12.34 mg s−1. Throughout the cycle, increasing the ventilation flow caused a rise in emissions, as observed for the fattening pigs [6,7]. As a consequence, CO2 emissions (ECO2 in mg s−1) and the flow of air extracted through the fan (Q in m3 s−1) showed a linear relationship (Figure 5B), which is given by the following equation: ECO2 = 2.8624 Q + 1.2919 (7) The correlation coefficient between CO2 emissions and ventilation flow is r = 0.85. (A) (B) Figure 4. Evolution of ventilation flow, – Q (m3 s−1) during the cycle, with (A) concentration of CO2, – CCO2 (g m−3), and (B) emission of CO2 per animal, – ECO2 (mg s−1). (A) (B) Figure 5. Correlation between (A) CO2 concentration, CCO2 (g m−3), – potential approximation, and (B) CO2 emission per animal, ECO2 (mg s−1), – linear relationship, and ventilation flow, Q (m3 s−1) ◦ measured values throughout the cycle 3.4. Neural Networks for the Prediction of CO2 Emissions Table 5 shows the mean performance of the 10 min and 60 min prediction models after 40 iterations. 0 2 4 6 8 10 0.0 0.5 1.0 1.5 2.0 2.5 0 5 10 15 20 25 30 35 g m−3 m3s-1 Time (days) 0.0 3.0 6.0 9.0 12.0 15.0 0.0 0.5 1.0 1.5 2.0 2.5 0 5 10 15 20 25 30 35 mg s−1 m3s-1 Time (days) 0.0 2.0 4.0 6.0 8.0 10.0 0.0 0.5 1.0 1.5 2.0 CCO2 (g m−3) Q (m3s−1) 0.0 2.0 4.0 6.0 8.0 10.0 0.0 0.5 1.0 1.5 2.0 E(mg s−1) Q (m3s−1) Figure 4. Evolution of ventilation flow, –Q(m 3 s −1 ) during the cycle, with ( A ) concentration of CO 2 , –CCO2 (g m−3), and (B) emission of CO2per animal, –ECO2 (mg s−1). Sensors 2022,22, 2910 9 of 14 The relationship between CO 2 concentration (C CO2 in g m −3 ) and the flow of air extracted through the fan (Qin m 3 s −1 ) during the cycle (Figure 5A) is given by the following equation: CCO2 = 1.5316 Q−0.442 (6) The correlation coefficient between the CO2concentration and ventilation flow is r= 0.82. Sensors 2022, 22, x FOR PEER REVIEW 9 of 14 CO2 emissions (Figure 4B) increased with the age of the piglets, in agreement with Stin et al. [16]. Mean CO2 emissions of 2.21 mg s−1 per animal were found for piglets with a mean weight of 11.39 kg during the cycle, although there was a sharp increase from day 28, with a peak of 12.34 mg s−1. Throughout the cycle, increasing the ventilation flow caused a rise in emissions, as observed for the fattening pigs [6,7]. As a consequence, CO2 emissions (ECO2 in mg s−1) and the flow of air extracted through the fan (Q in m3 s−1) showed a linear relationship (Figure 5B), which is given by the following equation: ECO2 = 2.8624 Q + 1.2919 (7) The correlation coefficient between CO2 emissions and ventilation flow is r = 0.85. (A) (B) Figure 4. Evolution of ventilation flow, – Q (m3 s−1) during the cycle, with (A) concentration of CO2, – CCO2 (g m−3), and (B) emission of CO2 per animal, – ECO2 (mg s−1). (A) (B) Figure 5. Correlation between (A) CO2 concentration, CCO2 (g m−3), – potential approximation, and (B) CO2 emission per animal, ECO2 (mg s−1), – linear relationship, and ventilation flow, Q (m3 s−1) ◦ measured values throughout the cycle 3.4. Neural Networks for the Prediction of CO2 Emissions Table 5 shows the mean performance of the 10 min and 60 min prediction models after 40 iterations. 0 2 4 6 8 10 0.0 0.5 1.0 1.5 2.0 2.5 0 5 10 15 20 25 30 35 g m−3 m3s-1 Time (days) 0.0 3.0 6.0 9.0 12.0 15.0 0.0 0.5 1.0 1.5 2.0 2.5 0 5 10 15 20 25 30 35 mg s−1 m3s-1 Time (days) 0.0 2.0 4.0 6.0 8.0 10.0 0.0 0.5 1.0 1.5 2.0 CCO2 (g m−3) Q (m3s−1) 0.0 2.0 4.0 6.0 8.0 10.0 0.0 0.5 1.0 1.5 2.0 E(mg s−1) Q (m3s−1) Figure 5. Correlation between ( A ) CO 2 concentration, C CO2 (g m −3 ), – potential approximation, and ( B ) CO 2 emission per animal, E CO2 (mg s −1 ), – linear relationship, and ventilation flow, Q(m 3 s −1 ) ◦measured values throughout the cycle. CO 2 emissions (Figure 4B) increased with the age of the piglets, in agreement with Stin et al. [ 16 ]. Mean CO 2 emissions of 2.21 mg s −1 per animal were found for piglets with a mean weight of 11.39 kg during the cycle, although there was a sharp increase from day 28, with a peak of 12.34 mg s −1 . Throughout the cycle, increasing the ventilation flow caused a rise in emissions, as observed for the fattening pigs [ 6 , 7 ]. As a consequence, CO 2 emissions (E CO2 in mg s −1 ) and the flow of air extracted through the fan (Qin m 3 s −1 ) showed a linear relationship (Figure 5B), which is given by the following equation: ECO2 = 2.8624 Q+ 1.2919 (7) The correlation coefficient between CO2emissions and ventilation flow is r= 0.85. 3.4. Neural Networks for the Prediction of CO2Emissions Table 5shows the mean performance of the 10 min and 60 min prediction models after 40 iterations. Table 5. Statistics for the evaluation of the performance of the models: root mean square error (RMSE), correlation coefficient (r), and mean absolute relative error (MARE). Prediction Period RMSE MARE r 60 min 1.21 0.23 0.63 10 min 1.27 0.25 0.56 Expectedly, the 10 min prediction was more accurate than the hourly prediction, although statistical differences were minimal. In particular, rvalues of 0.63 and 0.56 were obtained with the 10 min and 60 min prediction models, respectively, whereas the RMSE values were 1.21 and 1.27 mg s −1 , respectively. The prediction error of the models with regard to measured data in absolute terms (RMSE) was associated with very similar relative values (MARE), namely 0.23 for the 60 min prediction and 0.25 for the 10 min prediction. Figure 6shows these differences. Furthermore, the hourly prediction model showed greater difficulty in predicting the peaks of CO2emission.