Adaptive Environmental Control System for Large-Scale Poultry Houses Based on Multif-LSTM
Abstract:
The environmental conditions in large-scale, intensive poultry farming systems require high precision, and accurate prediction of environmental factors is critical for effective control. Existing control methods generally focus on the prediction and control of individual environmental factors without considering the interdependencies among these factors, leading to low prediction and control accuracy. To address the complex nature of the environmental system in poultry houses, characterised by multi-factor dependencies, an adaptive environmental control system based on Multi-feature Long Short-Term Memory (Multif-LSTM) was proposed. The Multif-LSTM model within the system calculates the dependencies between environmental factors using correlation coefficients and establishes a multi-input, multi-output neural network architecture. External climate factors are also incorporated during the input phase. Experimental comparisons conducted in a duck house environment, with Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) models, show that the Multif-LSTM model outperforms others in terms of prediction accuracy. For NH3 concentration, the Root Mean Square Error (RMSE), the Mean Absolute Percentage Error (MAPE), and Coefficient of Determination (R2) values are 1.34, 8.3, and 0.55, respectively; for temperature, they are 0.29, 2.83, and 0.98; and for relative humidity, they are 1.73, 2.46, and 0.95, respectively. Compared to the average performance of the RNN and LSTM models, the RMSE is reduced by 2.5, MAPE by 4.6, and R2 increased by 0.32. The results demonstrate that the Multif-LSTM model achieves higher prediction accuracy and is suitable for high-precision adaptive environmental control in poultry houses.
1. Introduction
With the continuous growth in demand for poultry consumption and the increasing environmental standards in the livestock industry, large-scale modern poultry farming has become an essential development pathway for the industry. Medium- and large-scale poultry farming enterprises are transitioning from traditional farming methods to large-scale, intensive, and facility-based systems [1]. Environmental control systems have become a critical component of modern poultry farming operations. In recent years, with the rapid development of new-generation information technologies such as artificial intelligence, the Internet of Things (IoT), and big data, the goals of improving productivity, preventing disease, and reducing environmental impact have become central to smart poultry farming. The farming environment serves as the primary space for poultry activities, where various environmental factors interact and merge to form a complex system. Achieving precise control over this farming environment is one of the key tasks in realizing the intelligent farming process [2], [3], [4].
Traditionally, poultry house environments have relied on manual experience for monitoring and management, which results in delayed and inefficient adjustments. In recent years, intelligent monitoring equipment and systems for farming environments have gradually been applied in practical production [5]. However, the dynamic changes in environmental parameters are closely linked to the physiological responses, behavioral characteristics, and growth rates of the animals. Effective management of summer ventilation and heat dissipation, winter insulation and dehumidification, as well as control of harmful gases such as ammonia, hydrogen sulfide, and methane, are critical for creating a healthy and comfortable poultry house environment. This is essential for improving production yield, reducing the incidence of diseases, and minimizing environmental impact. Currently, IoT-based environmental monitoring devices are highly reliable and can accurately sense environmental information within poultry houses. The key technology for the intelligent regulation of poultry house environments lies in the precise prediction of environmental factors through further data fusion [6], [7], [8].
The environmental factor prediction models of poultry houses can generally be classified into two categories: statistical methods and machine learning algorithms. Statistical methods rely on extensive experimental data, which is subsequently analyzed to identify patterns. These methods require high precision in experimental data, and their application often involves significant human and time costs. Moreover, the predictive models derived from these methods typically exhibit poor robustness and transferability, making them difficult to generalize. The second category involves machine learning-based models for predicting poultry house environmental factors, which include regression models, grey system theory, Adaptive Neuro-Fuzzy Inference System (ANFIS) models, and neural network models, among others [9], [10], [11]. Among these, the RNN is particularly effective in learning time series data, capturing the nonlinear relationships and temporal dynamics within the data. However, the RNN struggles with long-term dependencies within the data. To address this limitation, LSTM networks were developed. The LSTM enhances the RNN by replacing the hidden layer neurons with cell states and three gate structures, allowing for the control of memory and forgetting mechanisms and improving the dynamic prediction of environmental factors within poultry houses [12], [13], [14], [15], [16].
Among these models, in order to reduce model input variables, simplify model complexity, and enhance prediction accuracy of the model, scholars have proposed models such as the fusion of the random forest and LSTM for optimizing ammonia concentration prediction in pigsties, as well as LSTM models integrated with attention mechanisms. These models are capable of better capturing the dependencies between poultry house environmental variables and the temporal dependencies within the environmental data sequences [1], [6], [8], [10]. Additionally, models combining Empirical Mode Decomposition (EMD) with LSTM enable the transformation of non-stationary ammonia sequences into stationary ones, fully leveraging the data processing advantages of LSTM neural networks. The combination of the one-dimensional Convolutional Neural Network (CNN) with LSTM into CNN-LSTM models has been found to effectively extract sequential features from time-series data [17], [18], [19], [20]. To avoid local optima, optimization algorithms such as the Sparrow Search Algorithm (SSA), Particle Swarm Optimization (PSO), and Genetic Algorithm (GA) have been used to optimize the hyperparameters of neural networks, thereby improving the predictive accuracy of these models [21], [22], [23], [24].
In recent years, machine learning, particularly neural network models, has been widely used by researchers for predicting poultry house environmental factors [25], [26], [27], [28]. Most of these studies focus on the prediction of individual environmental factors, which limits their application to single-factor control in poultry houses. The poultry house environment is a complex system with multi-factor dependencies, and these methods cannot meet the practical demands of large-scale, intensive farming, leaving a considerable gap from fully intelligent farming systems [29], [30], [31]. To address the limitations of existing poultry house environmental control systems, such as the single control model, fixed control parameters, delayed control effects, and poor adaptability, an adaptive environmental control system for poultry farming was developed in this study. This system adopts a multi-environmental factor linkage control approach, which enables precise control based on the dynamic changes in factors such as poultry house temperature, humidity, lighting, ammonia, carbon dioxide, hydrogen sulfide, methane, particulate matter, and external climate conditions. The main contributions of this study are as follows:
a) Development of the Multif-LSTM model for poultry house environmental factor prediction. This model addresses the time-series data characteristics of poultry house environments. Building on the advantages of LSTM in capturing long-term dependencies, it employs a multi-input and multi-output configuration, overcoming the limitations of existing models that can only predict single environmental factors. The proposed model enables the prediction of multiple environmental factors, improving the effectiveness of poultry house environmental control systems.
b) Consideration of the interdependencies between internal and external environmental factors. Special attention is given to incorporating external climate conditions, and correlation coefficients are used to analyze the relationships between each environmental factor and its related factors. As a result, the feature selection for environmental factors is more scientifically efficient, and the prediction accuracy is significantly improved.
2. Model and System
The precise control of poultry house environmental factors is a key technology for achieving intelligent farming. Traditional poultry house environmental control systems suffer from several limitations, including single control modes, fixed control parameters, delayed control responses, and poor adaptability. The time-series data of poultry house environmental factors consists of both linear and nonlinear sequences. Most existing research focuses on the prediction of single environmental factors, often neglecting the interactions between multiple environmental factors, especially the influence of external climate conditions. The proposed Multif-LSTM model incorporates outdoor climate factors as subsequent inputs dependent on the system and employs multi-environmental factor inputs. This model is capable of predicting multiple environmental factors simultaneously, providing enhanced adaptability. The poultry house environmental control system based on the Multif-LSTM model is characterized by multi-factor integration, dynamic regulation, and fine-grained control, enabling more accurate environmental management within poultry houses.
The adaptive environmental control system for poultry farming consists of five main components: the perception module, transmission module, computational analysis module, control module, and application module. The overall framework is shown in Figure 1.
a) Sensor layer
The perception module is responsible for sensing data related to the environmental indicators of the poultry house, primarily focusing on thermal conditions and air quality. The former includes factors such as temperature, relative humidity, lighting, and wind speed, all of which influence the heat and moisture balance within the poultry house and the metabolic heat production of the animals. The latter includes harmful gases, such as carbon dioxide, ammonia, methane, and hydrogen sulfide, which are produced by animal metabolism, manure, bedding, and feed decomposition, as well as dust particles, such as $\mathrm{PM}_{2.5}$, $\mathrm{PM}_{10}$, and total suspended particulates (TSP), which are generated by animal activity and management within the poultry house. These particles can carry bacteria and pathogens and adsorb harmful gases. When the levels of these environmental factors exceed the physiological limits of livestock, cold or heat stress can occur, which typically leads to physiological diseases and adversely affects the health and growth of the animals. Currently, IoT sensor technology is relatively mature and can provide reliable sensors for monitoring these indicators, enabling real-time data collection. Additionally, outdoor climate data can be obtained from local public weather forecasting services or by establishing small weather stations outside the poultry house.
b) Network layer
Scholars, both domestically and internationally, have integrated various types of sensors based on the environmental monitoring requirements of livestock houses and users. Multiple wireless networking approaches have been employed to develop intelligent environmental monitoring devices with different sensor combinations, enabling information sensing and remote control under complex farming conditions [31]. Common data transmission technologies include ZigBee, WiFi, and LoRa. Indoor poultry houses, depending on factors such as area, level of centralization, and transmission distance, may use WiFi, Programmable Logic Controller (PLC), Distributed Control Systems (DCS), or other automation transmission technologies to achieve effective control [4].
c) Data and application layer
The data and application server layer in the IoT system for poultry houses is primarily responsible for the reception, storage, processing, analysis, and application of data. This can be summarized in three key functions:
$\bullet$ Data storage and management: Responsible for storing and managing the vast amounts of data generated within the IoT system. This data includes environmental information collected by sensors and device status, which must be stored efficiently and securely for subsequent analysis and application.
$\bullet$ Data processing and analysis: Involves deep analysis and mining of the stored data to extract valuable insights and information. This includes the use of cloud computing, big data, and artificial intelligence technologies to clean, transform, and aggregate the data in order to support decision-making, predictive analysis, and other functionalities.
$\bullet$ Management and application services: Supports various IoT applications. These applications can include services for specific functions, such as sensor management, data visualization dashboards, on-site health monitoring, and control programs. These services are presented to the end user through user-friendly interfaces in the form of web pages, forms, or mobile applications.
d) Control layer
The control layer is positioned within the data processing and analysis module. It integrates cloud computing, big data, artificial intelligence, and other technologies to conduct deep analysis and modeling of the perceived environmental data, and formulates control commands. The system adapts to the characteristics of the farming environment to achieve precise control over the poultry house environment. This layer plays a command-level role within the overall system. An adaptive poultry farming environment control system was developed in this study, which employs multi-environmental factor interlinked control. It enables precise control based on dynamic changes in poultry house temperature, humidity, light, ammonia, carbon dioxide, hydrogen sulfide, methane, particulate matter, and external climatic factors. The core of the system utilizes the Multif-LSTM model to process environmental data with time-series characteristics.
e) Equipment layer
In the current era of rapidly advancing information technology, the IoT has been effectively applied in intelligent farming, significantly enhancing farming efficiency. Common equipment in poultry houses includes humidification and cooling systems, supplementary light and heating systems, ventilation systems, and spraying systems, among others. These devices are typically controlled by the system, which issues control commands to initiate operations. Advanced poultry house environmental monitoring equipment continues to evolve towards greater intelligence and integration. These devices not only collect various types of environmental data but also possess the capabilities for data storage management, remote transmission, and intelligent control. This enables distributed monitoring and centralized management of systems such as ventilation, heat dissipation, and supplementary lighting.
a) Data processing
In the model, consideration was given to various environmental factors within the poultry house, including temperature, humidity, light, ammonia, carbon dioxide, hydrogen sulfide, methane, particulate matter, and external climate factors. Since the environmental factors collected by sensors are measured in different dimensions and units, normalization is first required. Moreover, not all environmental factors interact with one another. Typically, only a subset of environmental factors are influenced by others. Therefore, the correlation between factors was analyzed using the correlation coefficient. After constructing the correlation coefficient matrix, the top k factors with the highest correlations were selected as input variables for prediction in the model. The correlation coefficient matrix is as follows:
The correlation coefficient, also known as the Pearson correlation coefficient, is used to measure the degree of correlation between two poultry house environmental factors, $X$ and $Y$. This is denoted as $\rho_{XY}$ and can be calculated as follows:
where, $\operatorname{Cov}(X, Y)$ represents the covariance between $X$ and $Y$, which is used to measure the degree of similarity between the two environmental factors. Specifically, $\operatorname{Cov}(X, Y)$ is defined as $E[(X-E X)$.$(Y-$ $E Y)], E$ denotes the mathematical expectation, and $D$ represents the variance.
b) Prediction model
The time series of poultry house environmental factors consists of both linear and nonlinear sequences. Traditional time series forecasting models typically employ single models, such as the Gated Recurrent Unit (GRU) model, CNN model, and Autoregressive Integrated Moving Average (ARIMA) model [18]. These models generally predict only a single environmental factor, with predictions based on the historical data of that specific factor. This approach overlooks the interdependencies and interactions between environmental factors, leading to lower prediction accuracy. Additionally, separate models are required to predict different environmental factors, which results in low computational efficiency.
To address the limitations of traditional poultry farming environment control systems, such as the use of a single control mode, fixed control parameters, delayed control effects, and poor adaptability, particularly the failure to consider the relationships between multiple factors, the Multif-LSTM model with multi-factor inputs and multi-outputs was designed in this study. This model not only accounts for indoor environmental factors but also incorporates the dependency of indoor conditions on external climate factors, thereby enhancing the adaptability of the prediction model.
The Multif-LSTM is a type of RNN. Compared to a conventional LSTM [14], the internal structure of the neural network is similar, with both models featuring a gating mechanism to capture dependencies. The main difference is that the Multif-LSTM adds a multi-feature selection module at the input layer, which selects the relevant dependencies for the environmental factor currently being predicted. Additionally, the overall structure of the Multif-LSTM contains independent processing units for each of the n environmental factors, allowing parallel predictions for different factors. Since the environmental factors at the next time step depend on the values of multiple previous time steps, the model processes the sequence from the past to the present, utilising effective information from later time steps. At each time step in the sequence, the input is passed to n LSTM modules for processing. The predicted values for each environmental factor are then output individually. The structure of the LSTM neural network layer and the Multif-LSTM structure are shown in Figure 2 and Figure 3, respectively.
In the Multif-LSTM structure, $x_{n t}$ represents the input values of the $n$ environmental factors at time $t$. These environmental factor values are processed through the multiple feature selection module, where the correlation coefficients are computed to select the next model input values. After selection, $X_{n t}$ represents the dependent environmental factors of $x_{n t}$, where $X_{n t}=\left\{x_{i t}, i \in\{0, \mathrm{n}\}\right\}$. In addition, $y_{n t}+1$ refers to the predicted output value of the $n$-th environmental factor for the next time step in the Multif-LSTM model. Within the neural network layer of the Multif-LSTM structure, the forget gate determines which information should be discarded or retained. The information from the previous hidden state and the current input are simultaneously passed through the Sigmoid function. The output value ranges between 0 and 1 , with values closer to 0 indicating that the information should be forgotten, and values closer to 1 indicating that it should be retained. The $f$ function controls which data is discarded or retained.
The input gate is used to update the cell state. The information from the previous hidden state and the current input are passed through the Sigmoid function to adjust the output values between 0 and 1, determining which information should be updated. A value of 0 indicates unimportant information, while 1 indicates important information. Additionally, the hidden state and current input are passed through the Tanh function, which compresses the values between -1 and 1 to regulate the network. The Tanh output and the Sigmoid output are then multiplied together, with the Sigmoid output determining which information in the Tanh output is important and should be retained.
Once the current state has been determined, the output gate, denoted as $O_t$, controls the output of $C_t$. The output gate decides the value of the next hidden state, which contains relevant information from the previous inputs. The hidden state is also used for prediction purposes. Initially, the previous hidden state and the current input are passed through the Sigmoid function. Next, the newly obtained cell state is passed through the Tanh function. The output of the Tanh function and the Sigmoid function are then multiplied to determine which information should be carried by the hidden state. Finally, the hidden state is output as the current cell output, and both the new cell state and new hidden state are passed on to the next time step. Specifically, the equations for the input gate, the forget gate, the cell state update, the cell state, the output gate, and the hidden state in the LSTM module are as follows:
where, $x_t$ represents the input sequence at time step $t$, $h_t$ is the hidden state at time step $t$ in the forward LSTM module; $C_t$ is the cell state at time step $t ; W$ and $b$ are the model parameters; $\sigma$ is the Sigmoid function; and $\odot$ denotes element-wise multiplication.
3. Experiment and Analysis
The data used in this study was obtained from a large-scale duck farming facility in a city in Jiangsu Province, China. The duck house has an area of approximately 2,000 m$^2$ and employs an indoor networked floor farming system. The breed used in the facility is the sheldrake, a species of terrestrial duck. The duck house is of a rectangular frame structure, with ventilation windows on both sides, a wet curtain at the front, and a fan at the rear. The facility was also equipped with heating and supplementary lighting systems, with around 40 sensor points installed throughout the house. In addition, a small weather station was located outside the duck house to gather outdoor environmental data. The data sampling interval was set at 30 minutes. A dataset spanning six months of historical data was selected for the experiment, with 90% of the data used for training and 10% reserved for testing. The environmental factors monitored in the duck house and their corresponding data points are outlined in Table 1.
Location | Factor |
Indoor | Temperature, humidity, atmospheric pressure, wind speed, wind direction, PM2.5, light intensity, ammonia, carbon dioxide, hydrogen sulfide, and methane |
Outdoor | Temperature, humidity, atmospheric pressure, wind speed, wind direction, and PM2.5 |
To further validate the prediction performance of the model, comparisons were made between the proposed Multif-LSTM model and both RNN and LSTM models [14]. The hardware environment for the model experiments included an Intel Core i7 14700k processor, an NVIDIA GeForce RTX 4090 graphics card, and a 64-bit Windows 11 operating system. The model algorithms were developed using Python 3.8. The main parameter settings for training the three models were as follows: input_size=17, hidden_size=128, num_layers=2, output_size =11, learning_rate=0.001, batch_size=32, epochs=10, and dropout=0.5. The models' performance was comprehensively evaluated using RMSE, R², and MAPE. The corresponding formulas are given in Eqs. (9)-(11).
where, $y$ represents the actual value, $y^{\prime}$ represents the predicted value, $m$ is the number of samples, and $\bar{y}$ is the average value.
To provide a more intuitive assessment of the model's effectiveness, the average error between the predicted results for all environmental factors and the actual values was used to visually reflect the prediction accuracy of the model. This is represented by the following Eq. (12):
where, $\eta$ represents the evaluation error, $y_i$ denotes the predicted value for the $i$-th factor, and $\bar{y}$ is the average value of the actual values.
Furthermore, due to the different dimensions of the environmental factors, they cannot be directly input into the model for training. Therefore, normalization is required for preprocessing the data before the experiment. In this study, the Z-score normalization method was adopted. Z-score normalization, also known as zero-mean normalization or standardization, transforms the data into a distribution with a mean of 0 and a standard deviation of 1. The Z-score formula is given by: $y_{norm}=(y-\mu) / \delta$, where $y$ represents the original data, $\mu$ is the mean of the original data, $\delta$ is the standard deviation of the data, and $y_{\text {norm }}$ is the normalized data. This method is particularly suitable for data distributions that approximate a normal distribution.
The typical environmental factors of ammonia (NH$_3$), temperature, and humidity were selected from Duck House No. 3 at the research facility for the 10$^{\text{th}}$ of December 2023. These factors were predicted using three models: RNN, LSTM, and Multif-LSTM. The predicted values were then compared with the actual measurements, and the results were plotted to observe the prediction performance of the four models, as shown in Figure 4.
From the experimental results shown in Figure 4, it can be observed that the predictions of NH$_3$ concentration by the three models fluctuate between 10 and 20 ppm, while the actual NH$_3$ concentration ranges from a minimum of 12 ppm to a maximum of 20 ppm. Over the course of the day, the actual NH$_3$ concentration exhibits considerable fluctuations, with the Multif-LSTM model (represented by the red curve) showing the closest match to the actual values (represented by the black curve). The LSTM model also yields relatively good predictions during certain periods, although there are instances where the predicted values deviate significantly. In contrast, the RNN model exhibits large fluctuations, reflecting poorer predictive performance. Additionally, the NH$_3$ concentration in the duck house is influenced by factors such as ventilation, temperature, and duck activity, leading to substantial variations in NH$_3$ levels.
From the temperature prediction results shown in Figure 5, it can be observed that the three models predict the temperature in the duck house to fluctuate between 4${ }^{\circ} \mathrm{C}$ and 15${ }^{\circ} \mathrm{C}$, with the temperature during the night being significantly lower than during the day. All three models demonstrate good prediction accuracy, with values fluctuating closely around the actual measurements. The RNN model exhibits larger fluctuations, reflecting poorer prediction performance. The red curve for Multif-LSTM is the closest to the actual values, represented by the black curve. The LSTM model also closely approximates the actual temperature values, suggesting that the temperature in the duck house is primarily influenced by external climatic factors, resulting in relatively stable temperature values.
From the experimental results shown in Figure 6, it can be seen that the three models predict the relative humidity in the duck house to range between 40% and 80%, while the actual values vary between 50% and 75%. The fluctuations in the actual values over the course of the day are relatively small, indicating that the relative humidity in the duck house remains stable. This is primarily due to seasonal factors. During winter, when temperatures are lower, the use of wet curtains for cooling in the duck house is minimal, and therefore, the relative humidity is mainly influenced by external climatic conditions. Among the three models, the red curve for Multif-LSTM is the closest to the actual values, represented by the black curve. The predictions from the other two models deviate from the actual values during certain periods, with the fluctuations being approximately 10%. The RNN model shows the largest deviation from the actual values compared to the other models, while the LSTM model exhibits varying degrees of phase-specific deviations.
As shown in Table 2, the Multif-LSTM model provides the best prediction results. For NH$_3$ concentration in the duck house, the RMSE, MAPE, and $\mathrm{R}^2$ are 1.34, 8.3, and 0.55, respectively. For temperature predictions, the RMSE, MAPE, and $\mathrm{R}^2$ are 0.29, 2.83, and 0.98, respectively. For relative humidity, the RMSE, MAPE, and $\mathrm{R}^2$ are 1.73, 2.46, and 0.95, respectively. In contrast, the RNN model has the poorest prediction accuracy, with RMSE, MAPE, and $\mathrm{R}^2$ for NH$_3$ concentration being 3.59, 20.3, and 0.23, respectively. The temperature predictions yield RMSE, MAPE, and $\mathrm{R}^2$ of 1.31, 14.04, and 0.72, while for relative humidity, these values are 7.66, 11.5, and 0.16, respectively. Compared to the traditional RNN model, the Multif-LSTM model demonstrates an average decrease in RMSE and MAPE of 73% and 70%, respectively, across the three environmental factors. Additionally, the $\mathrm{R}^2$ increases by 55%. The poor performance of the RNN model can be attributed to the structural and functional differences in the model. The RNN only processes information from the previous node, neglecting longer-range dependencies.
Models | NH3 (ppm) | Temperature (°C) | Humidity (%) | ||||||
RMSE | MAPE | R2 | RMSE | MAPE | R2 | RMSE | MAPE | R2 | |
RNN | 3.59 | 20.3 | 0.23 | 1.31 | 14.04 | 0.72 | 7.66 | 11.5 | 0.16 |
LSTM | 3.00 | 17.83 | 0.35 | 0.85 | 10.02 | 0.88 | 7.91 | 11.7 | 0.10 |
Multif-LSTM | 1.34 | 8.30 | 0.55 | 0.29 | 2.83 | 0.98 | 1.73 | 2.46 | 0.95 |
Compared to the LSTM model, the Multif-LSTM model demonstrates superior performance in predicting NH$_3$, temperature, and relative humidity. Specifically, for NH$_3$, the RMSE and MAPE are reduced by 55% and 59%, respectively, while $\mathrm{R}^2$ improves by 59%. For temperature, the RMSE and MAPE decrease by 40% and 47%, respectively, and $\mathrm{R}^2$ increases by 2%. For relative humidity, the RMSE and MAPE are reduced by 79% and 79%, respectively, while $\mathrm{R}^2$ rises by 89%. These experimental results show that the Multif-LSTM model outperforms the LSTM model in all three environmental factors. The Multif-LSTM model, built upon the LSTM framework, incorporates a multi-feature neural network structure, which enables more comprehensive information extraction. Furthermore, it integrates additional environmental factors and external climatic data, leading to improved prediction accuracy.
The Multif-LSTM and LSTM models share a similar core architecture, both being feedforward neural network variants, with Multif-LSTM representing an extension of the LSTM model. In the experiment, LSTM did not account for relevant environmental factors and did not incorporate external environmental data from the duck house, which resulted in a lower prediction performance compared to Multif-LSTM. Additionally, due to experimental constraints, the dataset used in this study covered only one month, which may have limited the model’s performance. Moreover, seasonal variations had a significant impact on the results. It is anticipated that with the accumulation of long-term, multi-year data, both Multif-LSTM and LSTM will exhibit better performance, with Multif-LSTM outperforming LSTM.
To further validate the model's effectiveness, the average error percentage between the predicted and actual values of all environmental factors over six months of experimental data was also used to visually reflect the performance of the three models, as shown in Figure 7.
It can be observed from Figure 7 that the RNN model exhibits the highest evaluation error rate at 12.6%, which is approximately 5% higher than that of the LSTM model, making it the model with the highest error rate among the three. The RNN model, which employs self-feedback neurons, is capable of processing time series data of arbitrary length. Its basic structure is relatively simple, storing the network output in a memory unit, which is then combined with the next input to enter the neural network. However, the RNN is a type of RNN that only has short-term memory, retaining information from the previous time step. In the poultry house, environmental factor changes are influenced by preceding time intervals and are not limited to the most recent moment. Additionally, the extent to which current environmental factor values are influenced by historical data varies across different factors. As a result, the short-term memory capacity of the RNN leads to the poorest prediction performance. The LSTM model produces an evaluation error rate of 7.61%, which is approximately 2% higher than that of the proposed Multif-LSTM model. LSTM has long-term memory capabilities and shares a similar core architecture with the Multif-LSTM model. The Multif-LSTM model, however, achieves the lowest evaluation error rate at 5.57%, outperforming the other two models. Compared to LSTM, Multif-LSTM not only retains the advantage of long-term memory but also incorporates multi-feature information, particularly considering the impact of external climatic conditions on indoor environmental factors. This integration results in the lowest prediction error rate.
4. Conclusion
Large-scale, intensive poultry farming systems require high-precision environmental control systems. The use of machine learning methods to predict environmental factors for preemptive control has become a new research focus. Most of the methods proposed in current studies address the control of individual environmental factors, without considering the interdependencies between multiple environmental factors in poultry houses. As a result, the accuracy of these predictions remains limited, and there is still a significant gap to achieving fully intelligent farming systems. In this study, an adaptive poultry farming environment control system was developed. This system employs multi-factor interactive control, enabling precise management based on dynamic changes in factors such as temperature, humidity, light, ammonia, carbon dioxide, hydrogen sulfide, methane, particulate matter, and external climatic conditions. The system is based on the Multif-LSTM model, which uses correlation analysis to assess the relationships between environmental factors. A neural network structure was constructed to capture the dependencies in time-series data. During the input phase, external climatic factors were also incorporated into the model. The predictive results obtained from experimental data outperform those from the RNN and LSTM models, exhibiting multi-factor integration, dynamic adjustment, fine-tuning, and adaptability. This model provides an effective approach for achieving intelligent control of poultry farming environments.
The Multif-LSTM model proposed in this study serves as the core of the intelligent poultry farming environment control system. While it demonstrates strong predictive performance, this research did not conduct an in-depth analysis of the model's hyperparameters, nor was the model's time efficiency scientifically validated. These areas will be the focus of future work.
The data used to support the research findings are available from the corresponding author upon request.
The authors declare no conflict of interest.