An Improved Intelligent Control System for Temperature and Humidity in a Pig House
Abstract
:1. Introduction
1.1. Effects of Temperature on the Growth of Commercial Pigs in Large-Scale Breeding Houses
1.2. Limitations of Threshold-Based Controllers
1.3. Related Work
1.4. Contribution of This Paper
- (1)
- We recommend using the GRU network to model the indoor temperature. We train the GRU model with more than 40,000 historical data, each of which includes indoor temperature, outdoor temperature, outdoor humidity, outdoor wind direction, outdoor wind speed, and outdoor air pressure.
- (2)
- According to the prediction results of the GRU model, the controller can start the relevant control equipment in advance before the temperature becomes abnormal so that the indoor temperature can always be kept within a normal range.
- (3)
- In the process of temperature control, due to the influence of many factors, such as the heat exchange of indoor and outdoor air and the heat exchange between the walls of the piggery and the outside world, there may be a large gap between the predicted results of the GRU model and the actual temperature values, resulting in the final control effect not being ideal. In view of this, we use a fuzzy control algorithm to flexibly adjust the output power of the equipment according to the gap between the predicted results and the actual value so as to achieve an ideal control effect.
- (4)
- We have designed and implemented a complete temperature regulation system, which can accurately adjust the temperature in the pigsty and effectively avoid abnormal temperatures.
2. Methodology
- (1)
- Training GRU model: in order to improve the training efficiency and accuracy of the model, the data set is preprocessed, and the important parameters of the model are adjusted.
- (2)
- Formulate macro-regulation strategy: calculate the output power of related equipment according to the predicted results of the GRU model and the relevant parameters of the equipment.
- (3)
- Making micro-regulation strategy: the prediction results of the GRU model will be affected by the heat exchange of indoor and outdoor air, the heat exchange between the walls of the piggery and the outside world, as well as the heat and moisture produced by the pigs, which leads to the deviation between the predicted results of GRU model and the actual value. At this point, if the temperature and humidity are adjusted according to the calculation results of the second step, the temperature and humidity may not be restored to the target value within a specified period of time. Therefore, we introduce the fuzzy control algorithm. The fuzzy controller will adjust the indoor temperature and humidity according to the values collected by the sensor in real time, so as to achieve the purpose of accurate adjustment.
- (4)
- The balance controller: after formulating the temperature and humidity regulation strategy, the balance controller will adjust the temperature and humidity, respectively, according to the strategy.
- (5)
- After the temperature and humidity are restored to the target value, go back to step (1) and start the next round of temperature and humidity adjustment.
2.1. Data Preprocessing
2.1.1. Abnormal Data Detection
2.1.2. Exceptional Data Handling
2.1.3. Data Normalization
2.1.4. Processing of Prediction Results of GRU Model
2.2. Parameter Adjustment of GRU
2.3. Macro-Adjustment Strategy
2.3.1. Formulate the Macroscopic Regulation Strategies of Temperature
- (1)
- First of all, the GRU model will predict the temperature change curve T(t) in the next 24 h.
- (2)
- Compare T(t) with the high-temperature threshold Thigh and the low-temperature threshold Tlow. If Tlow < T(t) < Thigh, it shows that the temperature is not abnormal and directly enters the micro-regulation mode of temperature; if T(t) ≤ Tlow, the controller begins to formulate a heating strategy; if T(t) ≥ Thigh, the controller begins to formulate a cooling strategy.
- (3)
- If an exception occurs, the controller will run the device in accordance with the policy.
- (4)
- After macro-adjustment, the indoor temperature will not necessarily return to the target temperature, and then it will enter the micro-adjustment mode.
- (5)
- After the micro-adjustment mode, the indoor temperature returns to the target temperature, and the controller enters the next round of regulation.
2.3.2. Formulate the Macroscopic Regulation Strategies of Humidity
2.4. Micro-Adjustment Strategy
- (1)
- First, compare whether the absolute value of the difference between the actual value A(t) (temperature/humidity) measured by the sensor and the target value Target is less than the threshold H. If |A(t)-Target| < H, the room temperature/humidity has been restored to near the target value, and the current adjustment process is over; otherwise, continue to the next step.
- (2)
- If A(t)-Target > 0, it is necessary to formulate the cooling/dehumidification strategy; otherwise, the heating/humidification strategy should be established.
- (3)
- The controller operates the equipment according to the policy, and the running time is Duration.
- (4)
- Go back to step (1) and repeat the above steps.
2.5. Temperature and Humidity Balance Mechanism
3. Experimental Setup
3.1. System Framework
3.2. Experimental Equipment
3.3. Experimental Site Setting
3.4. Explanation of Relevant Experimental Data
4. Analysis of Experimental Results
4.1. Detection of Abnormal Data
4.2. Prediction Results of the GRU Model
4.3. Comparison with Threshold-Based Controller
4.3.1. Evaluation Indicators
4.3.2. Evaluation of the Adjustment Effect
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Albright, J.L. History and future of animal welfare science. J. Appl. Anim. Welf. Sci. 1998, 1, 145–166. [Google Scholar] [CrossRef] [PubMed]
- Neethirajan, S. The role of sensors, big data and machine learning in modern animal farming. Sens. Bio-Sens. Res. 2020, 29, 100367. [Google Scholar] [CrossRef]
- Johnson, J.S.; Abuajamieh, M.; Fernandez, S.; Seibert, J.T.; Stoakes, S.K.; Nteeba, J.; Baumgard, L. Thermal stress alters postabsorptive metabolism during pre-and postnatal development. In Climate Change Impact on Livestock: Adaptation and Mitigation; Springer: New Delhi, India, 2015; pp. 61–79. [Google Scholar]
- Quiniou, N.; Dubois, S.; Noblet, J. Voluntary feed intake and feeding behaviour of group-housed growing pigs are affected by ambient temperature and body weight. Livest. Prod. Sci. 2000, 63, 245–253. [Google Scholar] [CrossRef]
- Myer, R.; Bucklin, R. Influence of Hot-Humid Environment on Growth Performance and Reproduction of Swine. 2001. Available online: http://edis.ifas.ufl.edu/AN107 (accessed on 30 May 2007).
- Du, Q.; Miao, Y.; Zhang, Y. Design of intelligent monitoring system of chicken house environment based on single-chip microcomputer. In MATEC Web of Conferences; EDP Sciences: Les Ulis, France, 2018; Volume 227, p. 02008. [Google Scholar]
- Zhao, Y.; Nan, X.; Tang, X.; Yang, L.; Xiong, B. Development and application of animal building environmental control system. In Proceedings of the 10th International Livestock Environment Symposium (ILES X), Omaha, NE, USA, 25–27 September 2018; American Society of Agricultural and Biological Engineers: St. Joseph, MI, USA, 2018; p. 1. [Google Scholar]
- Svetozarevic, B.; Baumann, C.; Muntwiler, S.; Di Natale, L.; Zeilinger, M.N.; Heer, P. Data-driven control of room temperature and bidirectional EV charging using deep reinforcement learning: Simulations and experiments. Appl. Energy 2022, 307, 118127. [Google Scholar] [CrossRef]
- Gao, L.; Er, M.; Li, L.; Wen, P.; Jia, Y.; Huo, L. Microclimate environment model construction and control strategy of enclosed laying brooder house. Poult. Sci. 2022, 101, 101843. [Google Scholar] [CrossRef]
- Enriko, I.K.A.; Putra, R.A. Automatic Temperature Control System on Smart Poultry Farm Using PID Method. Green Intell. Syst. Appl. 2021, 1, 37–43. [Google Scholar] [CrossRef]
- Aggarwal, C.C. Proximity-Based Outlier Detection. In Outlier Analysis; Springer: Cham, Switzerland, 2017; pp. 111–147. [Google Scholar]
- Tang, B.; He, H. A local density-based approach for outlier detection. Neurocomputing 2017, 241, 171–180. [Google Scholar] [CrossRef] [Green Version]
- Jayanthi, N.; Hasnabade, M.; Reddy, S.; Deepthi, Y.; Krishna Rao, N.V. Outlier Detection for Data Using Density-Based Technique. In Energy Systems, Drives and Automations; Springer: Singapore, 2020; pp. 713–721. [Google Scholar]
- Saxena, S.; Rajpoot, D.S. Density-Based Approach for Outlier Detection and Removal. In Advances in Signal Processing and Communication; Springer: Singapore, 2019; pp. 281–291. [Google Scholar]
- Mahajan, M.; Kumar, S.; Pant, B. A Novel Cluster Based Algorithm for Outlier Detection. In Computing, Communication and Signal Processing; Springer: Singapore, 2019; pp. 449–456. [Google Scholar]
- Mishra, G.; Agarwal, S.; Jain, P.K.; Pamula, R. Outlier detection using subset formation of clustering based method. In International Conference on Advanced Computing Networking and Informatics; Springer: Singapore, 2019; pp. 521–528. [Google Scholar]
- Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation forest. In Proceedings of the 2008 eighth IEEE international conference on data mining, Pisa, Italy, 15–19 December 2008; pp. 413–422. [Google Scholar]
- Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation-based anomaly detection. ACM Trans. Knowl. Discov. Data (TKDD) 2012, 6, 1–39. [Google Scholar] [CrossRef]
- Swari, M.H.P.; Qusyairi, M.; Mandyartha, E.P.; Wahanani, H.E. Business Intelligence System using Simple Moving Average Method (Case Study: Sales Medical Equipment at PT. Semangat Sejahtera Bersama). In Journal of Physics: Conference Series; IOP Publishing: Bristol, UK, 2021; Volume 1899, p. 012121. [Google Scholar]
- Li, H.; Rong, L.; Zhang, G. Numerical study on the convective heat transfer of fattening pig in groups in a mechanical ventilated pig house. Comput. Electron. Agric. 2018, 149, 90–100. [Google Scholar] [CrossRef]
Condition | Fuzzy Set |
---|---|
e < −H | Positive |
−H ≤ e ≤ H | Zero |
e > H | Negative |
The Proportion of Outliers | Temperature Accuracy | Humidity Accuracy |
---|---|---|
0%~1% | 99.93% | 99.91% |
1%~5% | 97.56% | 95.44% |
5%~10% | 88.36% | 81.46% |
Date | Temperature Max Error (°C) | Humidity Max Error (%) |
---|---|---|
Day 1 | 0.4 | 3 |
Day 1–Day 5 | 0.7 | 3 |
Day 5–Day 10 | 0.7 | 5 |
Day 10–Day 15 | 0.9 | 8 |
Day 15–Day 30 | 1.3 | 12 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 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/).
Share and Cite
Jin, H.; Meng, G.; Pan, Y.; Zhang, X.; Wang, C. An Improved Intelligent Control System for Temperature and Humidity in a Pig House. Agriculture 2022, 12, 1987. https://doi.org/10.3390/agriculture12121987
Jin H, Meng G, Pan Y, Zhang X, Wang C. An Improved Intelligent Control System for Temperature and Humidity in a Pig House. Agriculture. 2022; 12(12):1987. https://doi.org/10.3390/agriculture12121987
Chicago/Turabian StyleJin, Hua, Gang Meng, Yuanzhi Pan, Xing Zhang, and Changda Wang. 2022. "An Improved Intelligent Control System for Temperature and Humidity in a Pig House" Agriculture 12, no. 12: 1987. https://doi.org/10.3390/agriculture12121987
APA StyleJin, H., Meng, G., Pan, Y., Zhang, X., & Wang, C. (2022). An Improved Intelligent Control System for Temperature and Humidity in a Pig House. Agriculture, 12(12), 1987. https://doi.org/10.3390/agriculture12121987