Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. Data Acquisition
2.2. Data Processing
2.2.1. Data Outlier Handing
2.2.2. Data Normalization
2.2.3. Data Noise Reduction
2.3. Predictive Modelling of Piggery Environments
2.3.1. Dung Beetle Optimization (DBO) Algorithm
2.3.2. TCN−GRU
2.4. Incorporating Multiple Strategies to Improve DBO
2.4.1. Fusion Osprey Optimization Algorithm (OTDBO)
2.4.2. Latin Hypercube Initialization Population
2.4.3. Adaptive t-Distribution Perturbation Strategy
2.5. Evaluation Indicators
3. Results
3.1. Pearson Correlation Analysis
3.2. OTDBO−TCN−GRU Model Optimization and Training
3.3. Comparison of Real and Predicted Values
3.4. Comparison of Model Performance
3.5. Influence of Outdoor Temperature on Predictions
4. Discussion
4.1. OTDBO−TCN−GRU Compared to Other Models
4.2. Deficiencies of the Model and Future Plans
5. Conclusions
- The Pearson correlation analysis experiments showed that all indoor gases are negatively correlated with temperature. Ammonia is most affected by humidity, and there is a small effect of outdoor temperature on ammonia prediction accuracy, and the removal of outdoor temperature improves prediction accuracy.
- The training loss in the OTDBO−TCN−GRU model training tends to stabilize at nearly 10 rounds of sub-clocks, almost close to 0, and the validation loss tends to stabilize at nearly 60 rounds of sub-clocks, which indicates that the model has a strong ability to generalize the data as well as stability.
- The improved OTDBO−TCN−GRU model compares with other algorithms to predict environmental gases with an error of less than 0.3 mg/m3, and has less impact on sudden environmental changes, which indicates that the model is robust and adaptable to environmental prediction.
- Compared with the traditional neural networks such as GRU, OOA, and LSTM, the MAE was reduced by 48.7%, 49.0%, and 51.6%, the MSE was reduced by 74.2%, 76.1%, and 81.2%, and the R2 was improved by 3.7%, 4.6%, and 5.5%, respectively, in the prediction. The model’s error with respect to the measured values was also investigated, and the OTDBO−TCN−GRU model achieved significant performance enhancement in predicting ammonia concentration, hydrogen sulfide concentration, and temperature and humidity compared to the GRU and LSTM models, reducing the percentage of MAE and MSE. It indicates that the OTDBO−TCN−GRU model performs more accurately and reliably in these prediction tasks.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Bull, K.; Sutton, M. Critical loads and the relevance of ammonia to an effects-based nitrogen protocol. Atmos. Environ. 1998, 32, 565–572. [Google Scholar] [CrossRef]
- Chantziaras, I.; De Meyer, D.; Vrielinck, L.; Van Limbergen, T.; Pineiro, C.; Dewulf, J.; Kyriazakis, I.; Maes, D. Environment-, health-, performance-and welfare-related parameters in pig barns with natural and mechanical ventilation. Prev. Vet. Med. 2020, 183, 105150. [Google Scholar] [CrossRef] [PubMed]
- Drummond, J.G.; Curtis, S.E.; Simon, J.; Norton, H.W. Effects of aerial ammonia on growth and health of young pigs. J. Anim. Sci. 1980, 50, 1085–1091. [Google Scholar] [CrossRef]
- Philippe, F.-X.; Cabaraux, J.-F.; Nicks, B. Ammonia emissions from pig houses: Influencing factors and mitigation techniques. Agric. Ecosyst. Environ. 2011, 141, 245–260. [Google Scholar] [CrossRef]
- Xie, Q.; Zheng, P.; Bao, J.; Su, Z. Thermal environment prediction and validation based on deep learning algorithm in closed pig house. Trans. Chin. Soc. Agric. Mach. 2020, 51, 353–361. [Google Scholar]
- Huynh, T.; Aarnink, A.; Verstegen, M.; Gerrits, W.; Heetkamp, M.; Kemp, B.; Canh, T. Effects of increasing temperatures on physiological changes in pigs at different relative humidities. J. Anim. Sci. 2005, 83, 1385–1396. [Google Scholar] [CrossRef] [PubMed]
- Ma, H.; Xie, Y.; Li, A.; Zhang, T.; Liu, Y.; Luo, X. A review on the effect of light–thermal–humidity environment in sow houses on sow reproduction and welfare. Reprod. Domest. Anim. 2023, 58, 1023–1045. [Google Scholar] [CrossRef]
- Xie, Q.; Ni, J.-Q.; Bao, J.; Su, Z. A thermal environmental model for indoor air temperature prediction and energy consumption in pig building. Build. Environ. 2019, 161, 106238. [Google Scholar] [CrossRef]
- Shen, M.; Chen, J.; Ding, Q.; Chen, J.; Liu, L.; Sun, Y. Current Situation and Development Trend of Pig Automated Farming Equipment Application. Nongye Jixie Xuebao/Trans. Chin. Soc. Agric. Mach. 2022, 53, 1–19. [Google Scholar]
- Arulmozhi, E.; Basak, J.K.; Sihalath, T.; Park, J.; Kim, H.T.; Moon, B.E. Machine learning-based microclimate model for indoor air temperature and relative humidity prediction in a swine building. Animals 2021, 11, 222. [Google Scholar] [CrossRef]
- Godyń, D.; Nowicki, J.; Herbut, P. Effects of environmental enrichment on pig welfare—A review. Animals 2019, 9, 383. [Google Scholar] [CrossRef] [PubMed]
- Peng, S.; Zhu, J.; Liu, Z.; Hu, B.; Wang, M.; Pu, S. Prediction of Ammonia Concentration in a Pig House Based on Machine Learning Models and Environmental Parameters. Animals 2022, 13, 165. [Google Scholar] [CrossRef] [PubMed]
- Seo, I.-h.; Lee, I.-b.; Moon, O.-k.; Hong, S.-w.; Hwang, H.-s.; Bitog, J.P.; Kwon, K.-S.; Ye, Z.; Lee, J.-W. Modelling of internal environmental conditions in a full-scale commercial pig house containing animals. Biosyst. Eng. 2012, 111, 91–106. [Google Scholar] [CrossRef]
- Zhang, L.; Zhang, M.; Yu, Q.; Su, S.; Wang, Y.; Fang, Y.; Dong, W. Optimizing Winter Air Quality in Pig-Fattening Houses: A Plasma Deodorization Approach. Sensors 2024, 24, 324. [Google Scholar] [CrossRef] [PubMed]
- Gu, M.; Hou, B.; Zhou, J.; Cao, K.; Chen, X.; Duan, C. An industrial internet platform for massive pig farming (IIP4MPF). J. Comput. Commun. 2020, 8, 181. [Google Scholar] [CrossRef]
- Tzanidakis, C.; Simitzis, P.; Arvanitis, K.; Panagakis, P. An overview of the current trends in precision pig farming technologies. Livest. Sci. 2021, 249, 104530. [Google Scholar] [CrossRef]
- Han, G.; Xie, Q.; Xu, Y.; Wang, L. Advances in environmental monitoring technology and methods for piggery. Chin. J. Anim. Sci. 2021, 57, 18–25. [Google Scholar]
- Xie, Q.; Ni, J.; Bao, J.; Liu, H. Simulation and verification of microclimate environment in closed swine piggery based on energy and mass balance. Trans. Chin. Soc. Agric. Eng. (Trans. CSAE) 2019, 35, 148–156. [Google Scholar]
- Xie, Q.; Ni, J.-q.; Su, Z. A prediction model of ammonia emission from a fattening pig room based on the indoor concentration using adaptive neuro fuzzy inference system. J. Hazard. Mater. 2017, 325, 301–309. [Google Scholar] [CrossRef]
- Xie, Q.; Ni, J.-Q.; Bao, J.; Su, Z. Correlations, variations, and modelling of indoor environment in a mechanically-ventilated pig building. J. Clean. Prod. 2021, 282, 124441. [Google Scholar] [CrossRef]
- Wang, W.; Wei, W.; Wei, D. Research and application of precipitation prediction model based on EMD-DBO-GRU. Gansu Water Resour. Hydropower Technol. 2023, 59, 9–13. [Google Scholar] [CrossRef]
- Zhu, F.; Li, G.; Tang, H.; Li, Y.; Lv, X.; Wang, X. Dung beetle optimization algorithm based on quantum computing and multi-strategy fusion for solving engineering problems. Expert Syst. Appl. 2024, 236, 121219. [Google Scholar] [CrossRef]
- Chen, H.; Li, W.; Yang, X. A whale optimization algorithm with chaos mechanism based on quasi-opposition for global optimization problems. Expert Syst. Appl. 2020, 158, 113612. [Google Scholar] [CrossRef]
- Ren, T.; Zhou, R.; Xia, J.; Dong, Z. Three-dimensional path planning of UAV based on an improved A algorithm. In Proceedings of the 2016 IEEE Chinese Guidance, Navigation and Control Conference (CGNCC), Nanjing, China, 12–14 August 2016; pp. 140–145. [Google Scholar]
- Li, Y.; Sun, K.; Yao, Q.; Wang, L. A dual-optimization wind speed forecasting model based on deep learning and improved dung beetle optimization algorithm. Energy 2024, 286, 129604. [Google Scholar] [CrossRef]
- Zu, L.; Liu, P.; Zhao, Y.; Li, T. Solar Greenhouse Environment Prediction Model Based on SSA-LSTM. Trans. Chin. Soc. Agric. Mach. 2023, 54, 351–358. [Google Scholar]
- Li, Z.; Zhu, D.L.; Lu, L.Q.; Han, Y.Q.; Tu, H.B.; Liu, Y.H.; Xu, T. Research on Greenhouse Environment Prediction and Film Rolling Decision Method Based on XGBoost Model. Water Sav. Irrig. 2023, 3, 67–74. [Google Scholar]
- Cheng, M.; Gao, S. Multi-Scale Stock Prediction Based on Deep Transfer Learning. Comput. Eng. Appl. 2022, 58, 249–259. [Google Scholar]
- Cheng, K.; Wang, R.; Fu, X. Time series prediction method of clean coal ash content in dense medium separation based on EMD—LSTM. Coal Eng. 2022, 54, 133–139. [Google Scholar]
- Qiao, Y.; Jia, X.; Guan, Y.; Hao, J. Air quality prediction method and its application of Elman neural network based on DE-WOA. Control Eng. China 2023, 1–8. [Google Scholar] [CrossRef]
- Wang, R.; Xie, N.; Yu, H.; Yu, J.; Jiang, L.; Yang, H. Short-term Load Forecasting Method Based on EMD-LSTM Model. Res. Explor. Lab. 2022, 41, 62–66+79. [Google Scholar] [CrossRef]
- Guo, J.; Li, D.; Du, B. A stacked ensemble method based on TCN and convolutional bi-directional GRU with multiple time windows for remaining useful life estimation. Appl. Soft Comput. 2024, 150, 111071. [Google Scholar] [CrossRef]
- Xu, Y.; Xiang, Y.; Ma, T. Short-term Power Load Forecasting Method Based on EMD-CNN-LSTM Hybrid Model. J. North China Electr. Power Univ. 2022, 49, 81–89. [Google Scholar]
- Ismaeel, A.A.; Houssein, E.H.; Khafaga, D.S.; Abdullah Aldakheel, E.; AbdElrazek, A.S.; Said, M. Performance of Osprey Optimization Algorithm for Solving Economic Load Dispatch Problem. Mathematics 2023, 11, 4107. [Google Scholar] [CrossRef]
- Aguinis, H.; Gottfredson, R.K.; Joo, H. Best-practice recommendations for defining, identifying, and handling outliers. Organ. Res. Methods 2013, 16, 270–301. [Google Scholar] [CrossRef]
- Singh, D.; Singh, B. Investigating the impact of data normalization on classification performance. Appl. Soft Comput. 2020, 97, 105524. [Google Scholar] [CrossRef]
- Liu, T.; Qi, S.; Qiao, X.; Liu, S. A hybrid short-term wind power point-interval prediction model based on combination of improved preprocessing methods and entropy weighted GRU quantile regression network. Energy 2024, 288, 129904. [Google Scholar] [CrossRef]
- Chen, Y.; Rich, D.Q.; Hopke, P.K. Long-term PM2.5 source analyses in New York City from the perspective of dispersion normalized PMF. Atmos. Environ. 2022, 272, 118949. [Google Scholar] [CrossRef]
- Cai, T.; Tang, H. A review of least squares fitting principles for Savitzky-Golay smoothing filters. Digit. Commun. 2011, 38, 63–68,82. [Google Scholar] [CrossRef]
- Van Rossum, G.; Drake, F.L. Python Reference Manual; Centrum voor Wiskunde en Informatica Amsterdam: Amsterdam, The Netherlands, 1995; Volume 111. [Google Scholar]
- Sweet, S.A.; Grace-Martin, K. Data Analysis with SPSS; Allyn & Bacon: Boston, MA, USA, 1999; Volume 1. [Google Scholar]
- Xue, J.; Shen, B. Dung beetle optimizer: A new meta-heuristic algorithm for global optimization. J. Supercomput. 2023, 79, 7305–7336. [Google Scholar] [CrossRef]
- Zhou, Z.; Liu, X.; Yang, H. PM2.5 Concentration Prediction Method Based on Temporal Attention Mechanism and CNN-LSTM. Acad. J. Sci. Technol. 2023, 5, 172–179. [Google Scholar] [CrossRef]
- Qiao, X.; Zheng, W.; Zhang, X.; Shan, F.; Wang, M.; Liang, D. Research on environmental prediction method of solar greenhouse based on LSTM-GRU. Jiangsu Agric. Sci. 2022, 50, 211–218. [Google Scholar] [CrossRef]
- Dehghani, M.; Trojovský, P. Osprey optimization algorithm: A new bio-inspired metaheuristic algorithm for solving engineering optimization problems. Front. Mech. Eng. 2023, 8, 1126450. [Google Scholar] [CrossRef]
- Willersrud, A.; Blanke, M.; Imsland, L.; Pavlov, A. Fault diagnosis of downhole drilling incidents using adaptive observers and statistical change detection. J. Process Control 2015, 30, 90–103. [Google Scholar] [CrossRef]
- Zheng, T.; Liu, S.; Ye, X. Arithmetic optimization algorithm based on adaptive t-distribution and improved dynamic boundary strategy. Appl. Res. Comput. 2022, 39, 1410–1414. [Google Scholar] [CrossRef]
- Yang, L.; Liu, C.; Guo, Y.; Deng, H.; Li, D.; Duan, Q. Prediction of Ammonia Concentra-tion in Fattening Piggery Based on EMD-LSTM. Trans. CSAM 2019, 50, 353–360. [Google Scholar]
- Wang, K.; Liu, C.; Duan, Q. Piggery Ammonia Concentration Prediction Method Based on CNN-GRU. J. Phys. Conf. Ser. 2020, 1624, 042055. [Google Scholar] [CrossRef]
Parametric | Model | Range | Resolution | Accurate | Protocols |
---|---|---|---|---|---|
Temperature | JDRK-DH | −40–80 °C | - | ±0.2 °C | Modbus-RTU |
Humidity | JDRK-DH | 0–100% | - | ±2% | Modbus-RTU |
CO2 | JDRK-CD | 0–5000 ppm | 1 ppm | 50 ppm | Modbus-RTU |
NH3 | JD-MQ-AM | 0–200 ppm | 0.2 ppm | 50 ppm | Modbus-RTU |
H2S | JD-MQ-HS | 0–200 ppm | 0.2 ppm | 50 ppm | Modbus-RTU |
Air velocity | JDRK-AV | 0–30 m/s | 0.1 m/s | ±0.2 + 0.03 V | Modbus-RTU |
Training Rounds | Optimal Fitness | ||||
---|---|---|---|---|---|
1 | 26 | 41 | 12 | 27 | 0.01183126 |
2 | 26 | 41 | 12 | 27 | 0.01183126 |
… | … | … | … | … | … |
7 | 32 | 127 | 22 | 128 | 0.00609744 |
8 | 32 | 127 | 23 | 128 | 0.00437462 |
9 | 32 | 127 | 23 | 128 | 0.00437462 |
Models | MSE | MAE | R2 |
---|---|---|---|
OTDBO−TCN−GRU | 0.0039 | 0.0474 | 0.9871 |
DBO−TCN−GRU | 0.0117 | 0.0755 | 0.9619 |
OOA | 0.0163 | 0.0929 | 0.9414 |
GRU | 0.0151 | 0.0924 | 0.9508 |
LSTM | 0.0207 | 0.0980 | 0.9326 |
XGBoost | 0.0376 | 0.1333 | 0.8773 |
Temperature | MSE | MAE | R2 |
---|---|---|---|
Existence outdoor temperature | 0.0039 | 0.0474 | 0.9871 |
No outdoor temperature | 0.0036 | 0.0463 | 0.9889 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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/).
Share and Cite
Guo, Z.; Yin, Z.; Lyu, Y.; Wang, Y.; Chen, S.; Li, Y.; Zhang, W.; Gao, P. Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm. Animals 2024, 14, 863. https://doi.org/10.3390/ani14060863
Guo Z, Yin Z, Lyu Y, Wang Y, Chen S, Li Y, Zhang W, Gao P. Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm. Animals. 2024; 14(6):863. https://doi.org/10.3390/ani14060863
Chicago/Turabian StyleGuo, Zhaodong, Zhe Yin, Yangcheng Lyu, Yuzhi Wang, Sen Chen, Yaoyu Li, Wuping Zhang, and Pengfei Gao. 2024. "Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm" Animals 14, no. 6: 863. https://doi.org/10.3390/ani14060863
APA StyleGuo, Z., Yin, Z., Lyu, Y., Wang, Y., Chen, S., Li, Y., Zhang, W., & Gao, P. (2024). Research on Indoor Environment Prediction of Pig House Based on OTDBO–TCN–GRU Algorithm. Animals, 14(6), 863. https://doi.org/10.3390/ani14060863