Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm

Temperature and humidity, along with concentrations of ammonia and hydrogen sulfide, are critical environmental factors that significantly influence the growth and health of pigs within porcine habitats. The ability to accurately predict these environmental variables in pig houses is pivotal, as it...

Full description

Bibliographic Details
Main Authors: Zhaodong Guo, Zhe Yin, Yangcheng Lyu, Yuzhi Wang, Sen Chen, Yaoyu Li, Wuping Zhang, Pengfei Gao
Format: Article
Language:English
Published: MDPI AG 2024-03-01
Series:Animals
Subjects:
Online Access:https://www.mdpi.com/2076-2615/14/6/863
_version_ 1797242338277326848
author Zhaodong Guo
Zhe Yin
Yangcheng Lyu
Yuzhi Wang
Sen Chen
Yaoyu Li
Wuping Zhang
Pengfei Gao
author_facet Zhaodong Guo
Zhe Yin
Yangcheng Lyu
Yuzhi Wang
Sen Chen
Yaoyu Li
Wuping Zhang
Pengfei Gao
author_sort Zhaodong Guo
collection DOAJ
description Temperature and humidity, along with concentrations of ammonia and hydrogen sulfide, are critical environmental factors that significantly influence the growth and health of pigs within porcine habitats. The ability to accurately predict these environmental variables in pig houses is pivotal, as it provides crucial decision-making support for the precise and targeted regulation of the internal environmental conditions. This approach ensures an optimal living environment, essential for the well-being and healthy development of the pigs. The existing methodologies for forecasting environmental factors in pig houses are currently hampered by issues of low predictive accuracy and significant fluctuations in environmental conditions. To address these challenges in this study, a hybrid model incorporating the improved dung beetle algorithm (DBO), temporal convolutional networks (TCNs), and gated recurrent units (GRUs) is proposed for the prediction and optimization of environmental factors in pig barns. The model enhances the global search capability of DBO by introducing the Osprey Eagle optimization algorithm (OOA). The hybrid model uses the optimization capability of DBO to initially fit the time-series data of environmental factors, and subsequently combines the long-term dependence capture capability of TCNs and the non-linear sequence processing capability of GRUs to accurately predict the residuals of the DBO fit. In the prediction of ammonia concentration, the OTDBO–TCN–GRU model shows excellent performance with mean absolute error (MAE), mean square error (MSE), and coefficient of determination (<i>R</i><sup>2</sup>) of 0.0474, 0.0039, and 0.9871, respectively. Compared with the DBO–TCN–GRU model, OTDBO–TCN–GRU achieves significant reductions of 37.2% and 66.7% in MAE and MSE, respectively, while the <i>R</i><sup>2</sup> value is improved by 2.5%. Compared with the OOA model, the OTDBO–TCN–GRU achieved 48.7% and 74.2% reductions in the MAE and MSE metrics, respectively, while the <i>R</i><sup>2</sup> value improved by 3.6%. In addition, the improved OTDBO–TCN–GRU model has a prediction error of less than 0.3 mg/m<sup>3</sup> for environmental gases compared with other algorithms, and has less influence on sudden environmental changes, which shows the robustness and adaptability of the model for environmental prediction. Therefore, the OTDBO–TCN–GRU model, as proposed in this study, optimizes the predictive performance of environmental factor time series and offers substantial decision support for environmental control in pig houses.
first_indexed 2024-04-24T18:37:38Z
format Article
id doaj.art-571013c2ca12453bbd5fa89fa0a7e83c
institution Directory Open Access Journal
issn 2076-2615
language English
last_indexed 2024-04-24T18:37:38Z
publishDate 2024-03-01
publisher MDPI AG
record_format Article
series Animals
spelling doaj.art-571013c2ca12453bbd5fa89fa0a7e83c2024-03-27T13:17:41ZengMDPI AGAnimals2076-26152024-03-0114686310.3390/ani14060863Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU AlgorithmZhaodong Guo0Zhe Yin1Yangcheng Lyu2Yuzhi Wang3Sen Chen4Yaoyu Li5Wuping Zhang6Pengfei Gao7College of Software, Shanxi Agricultural University, Jinzhong 030801, ChinaCollege of Software, Shanxi Agricultural University, Jinzhong 030801, ChinaCollege of Software, Shanxi Agricultural University, Jinzhong 030801, ChinaCollege of Software, Shanxi Agricultural University, Jinzhong 030801, ChinaCollege of Software, Shanxi Agricultural University, Jinzhong 030801, ChinaCollege of Agricultural Engineering, Shanxi Agricultural University, Jinzhong 030801, ChinaCollege of Software, Shanxi Agricultural University, Jinzhong 030801, ChinaCollege of Animal Science, Shanxi Agricultural University, Jinzhong 030801, ChinaTemperature and humidity, along with concentrations of ammonia and hydrogen sulfide, are critical environmental factors that significantly influence the growth and health of pigs within porcine habitats. The ability to accurately predict these environmental variables in pig houses is pivotal, as it provides crucial decision-making support for the precise and targeted regulation of the internal environmental conditions. This approach ensures an optimal living environment, essential for the well-being and healthy development of the pigs. The existing methodologies for forecasting environmental factors in pig houses are currently hampered by issues of low predictive accuracy and significant fluctuations in environmental conditions. To address these challenges in this study, a hybrid model incorporating the improved dung beetle algorithm (DBO), temporal convolutional networks (TCNs), and gated recurrent units (GRUs) is proposed for the prediction and optimization of environmental factors in pig barns. The model enhances the global search capability of DBO by introducing the Osprey Eagle optimization algorithm (OOA). The hybrid model uses the optimization capability of DBO to initially fit the time-series data of environmental factors, and subsequently combines the long-term dependence capture capability of TCNs and the non-linear sequence processing capability of GRUs to accurately predict the residuals of the DBO fit. In the prediction of ammonia concentration, the OTDBO–TCN–GRU model shows excellent performance with mean absolute error (MAE), mean square error (MSE), and coefficient of determination (<i>R</i><sup>2</sup>) of 0.0474, 0.0039, and 0.9871, respectively. Compared with the DBO–TCN–GRU model, OTDBO–TCN–GRU achieves significant reductions of 37.2% and 66.7% in MAE and MSE, respectively, while the <i>R</i><sup>2</sup> value is improved by 2.5%. Compared with the OOA model, the OTDBO–TCN–GRU achieved 48.7% and 74.2% reductions in the MAE and MSE metrics, respectively, while the <i>R</i><sup>2</sup> value improved by 3.6%. In addition, the improved OTDBO–TCN–GRU model has a prediction error of less than 0.3 mg/m<sup>3</sup> for environmental gases compared with other algorithms, and has less influence on sudden environmental changes, which shows the robustness and adaptability of the model for environmental prediction. Therefore, the OTDBO–TCN–GRU model, as proposed in this study, optimizes the predictive performance of environmental factor time series and offers substantial decision support for environmental control in pig houses.https://www.mdpi.com/2076-2615/14/6/863pig barndung beetle optimization algorithmTCNGRUenvironmental prediction modelssensor
spellingShingle Zhaodong Guo
Zhe Yin
Yangcheng Lyu
Yuzhi Wang
Sen Chen
Yaoyu Li
Wuping Zhang
Pengfei Gao
Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm
Animals
pig barn
dung beetle optimization algorithm
TCN
GRU
environmental prediction models
sensor
title Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm
title_full Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm
title_fullStr Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm
title_full_unstemmed Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm
title_short Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm
title_sort research on indoor environment prediction of pig house based on otdbo tcn gru algorithm
topic pig barn
dung beetle optimization algorithm
TCN
GRU
environmental prediction models
sensor
url https://www.mdpi.com/2076-2615/14/6/863
work_keys_str_mv AT zhaodongguo researchonindoorenvironmentpredictionofpighousebasedonotdbotcngrualgorithm
AT zheyin researchonindoorenvironmentpredictionofpighousebasedonotdbotcngrualgorithm
AT yangchenglyu researchonindoorenvironmentpredictionofpighousebasedonotdbotcngrualgorithm
AT yuzhiwang researchonindoorenvironmentpredictionofpighousebasedonotdbotcngrualgorithm
AT senchen researchonindoorenvironmentpredictionofpighousebasedonotdbotcngrualgorithm
AT yaoyuli researchonindoorenvironmentpredictionofpighousebasedonotdbotcngrualgorithm
AT wupingzhang researchonindoorenvironmentpredictionofpighousebasedonotdbotcngrualgorithm
AT pengfeigao researchonindoorenvironmentpredictionofpighousebasedonotdbotcngrualgorithm