Virtual MOS Sensor Array Design for Ammonia Monitoring in Pig Barns
Abstract
:1. Introduction
2. Previous Work
3. Materials and Methods
3.1. Sensors
3.1.1. Metal Oxide Semiconductor Gas Sensor
3.1.2. Electrochemical Reference Sensor
3.2. Experimental Setup
3.2.1. Pig Barn Scenarios
3.2.2. Measurement Setup
3.2.3. Sensor Data Acquisition, Processing, Training and Deployment Phase
3.3. Design of the Virtual MOS Sensor Array
3.3.1. Solid-State Sensor Model
- is the basic resistance at room temperature,
- is the energy barrier affected by chemisorption processes,
- is the thermal energy.
- at 40% RH
- at 50% RH.
3.3.2. Data-Driven Design
3.4. Methodology for the Ammonia Regression in Pig Barns
3.4.1. Interpolation of Reference Data
3.4.2. Regression Models
3.4.3. Metrics for Evaluation
3.4.4. Data Subset Division
- Influence of the Sensor-To-Sensor Deviation: First, the data from one measurement location that contributes a large amount of data and covers a wide ammonia concentration range is selected. This dataset contains data from n sensors Sn. The dataset is divided into DnF and DF, each containing data from sensors without or with filter membranes, respectively, Figure 8. DnF is split into the data originated from the i individual sensors and used to assess the influence of the sensor-to-sensor deviation on the ammonia regression performance. To achieve this, a trained model is first tested with a regular test dataset and then tested again with an additional test dataset TSD, coming from sensors which were not included in the training data. Considering the relatively small number of sensors, a k-fold cross validation is proposed to use here and is illustrated in Figure 9.The variable k defines the number of folds, in which DnF is divided and is selected to have two sensors in each TSD test set. For every fold, the RMSE of the two regression models is first calculated for the 25% holdout test data of sensors. Second, the RMSE for the additional test dataset TSD from sensors excluded from the training dataset is determined. The mean values and the standard deviations (Std. Dev.) of the RMSE values across all folds and for every model and test method are calculated. Using this methodology, the influence of the sensor-to-sensor deviation and the transferability of the models to other sensors of the same type are assessed.
- Impact of the Filter Membrane: To investigate the influence of the filter membrane, the models are separately trained with DnF or DF, respectively. For the test, 25% of DnF or DF, respectively, is used. The resulting RMSE values for the models trained and tested with data originating from sensors with or without filter membranes are compared, without consideration of individual sensor datasets.
- Transferability to Other Environments: Finally, the influence of different training environments, i.e., pig barns, is assessed. The whole dataset is split according to the locations A, B, C and D without consideration of the individual sensors or filter membranes. Then, four data splits with training and test datasets, wherein three locations are included in each training dataset Dwxy and the fourth location is exclusively present in the test dataset Tz are created. Every Dwxy is again divided into 75% training data and 25% test dataset. Although the effects of the sensor-to-sensor deviation and the filter membranes overlap with the influence of the environments at this point, the variability of the results can be used to provide a qualitative assessment of the influence a different training scenario has on the regression. This offers an insight into the capacity of the models to be transferred to a pig barn not included in the training process, if the training was performed in various environments.
4. Results
4.1. Results on the Design of the Virtual Sensor Array
- HP354: With a sampling time of 10.78 s, this profile features three distinct temperature levels, transitioning sharply from a high temperature of 320 °C to a low temperature of 100 °C.
- HP301: Sharing a similar structure with three levels but utilizing longer sampling times (18.34 s).
- HP411: With a sampling time of 24.64 s, this profile incorporates high-temperature spikes, allowing the evaluation of their effects on sensor performance.
- HP501: This profile spans five temperature levels over a sampling time of 26.88 s, characterized by smaller temperature drops between levels.
4.2. Results on Ammonia Monitoring in Pig Barns
4.2.1. Pig Barns Scenarios
4.2.2. Impact of the Sensor-to-Sensor Deviation
4.2.3. Impact of the Filter Membrane
4.2.4. Environmental Impact
5. Discussion
5.1. Virtual MOS Sensor Array Design
5.2. Pig Barns
5.3. Impact of Sensor-to-Sensor Deviation
5.4. Impact of the Filter Membrane
5.5. Environmental Impact
5.6. Implications
6. Conclusions
7. Future Aspects
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
AI | artificial intelligence |
ASIC | application-specific integrated circuit |
EC | electrochemical |
ePTFE | expanded polytetrafluoroethylene |
FTIR | Fourier transform infrared |
HP | heater profile |
LoRaWAN | long range wide area network |
MEMS | micro-electro-mechanical system |
MOS | metal oxide semiconductor |
NRMSE | normalized root mean squared error |
PM | particulate matter |
RH | relative humidity |
RMSE | root mean squared error |
Std. Dev. | standard deviation |
TCO | temperature-cycled operation |
VOC | volatile organic compound |
References
- European Environment Agency. Impacts of Air Pollution on Ecosystems. 2022. Available online: https://www.eea.europa.eu/publications/air-quality-in-europe-2022/impacts-of-air-pollution-on-ecosystems (accessed on 9 August 2024).
- World Health Organization. Regional Office for Europe. Health Effects of Particulate Matter: Policy Implications for Countries in Eastern Europe, Caucasus and Central Asia; World Health Organization. Regional Office for Europe: Copenhagen, Denmark, 2013; Available online: https://iris.who.int/handle/10665/344854 (accessed on 8 August 2024).
- European Environment Agency. European Union Emission Inventory Report 1990–2021—Under the UNECE Convention on Long-Range Transboundary Air Pollution (Air Convention); EEA Report 04/2023; European Environment Agency: Copenhagen, Denmark, 2023; p. 61. Available online: https://www.eea.europa.eu/publications/european-union-emissions-inventory-report-1990-2021 (accessed on 12 August 2024).
- Qin, W.; Shen, L.; Wang, Q.; Gao, Y.; She, M.; Li, X.; Tan, Z. Chronic exposure to ammonia induces oxidative stress and enhanced glycolysis in lung of piglets. Environ. Toxicol. 2021, 37, 179–191. [Google Scholar] [CrossRef] [PubMed]
- Conti, C.; Borgonovo, F.; Guarino, M. Ammonia concentration and recommended threshold values in pig farming: A review. In Proceedings of the 2021 IEEE International Workshop on Metrology for Agriculture and Forestry (MetroAgriFor), Trento-Bolzano, Italy, 3–5 November 2021; pp. 162–166. [Google Scholar] [CrossRef]
- Insausti, M.; Timmis, R.; Kinnersley, R.; Rufino, M.C. Advances in sensing ammonia from agricultural sources. Sci. Total Environ. 2020, 706, 135124. [Google Scholar] [CrossRef] [PubMed]
- Witt, J.; Krieter, J.; Schröder, K.; Büttner, K.; Hölzel, C.; Krugmann, K.; Czycholl, I. Comparison of three different measuring devices of ammonia and evaluation of their suitability to assess animal welfare in pigs. Livest. Sci. 2023, 279, 105372. [Google Scholar] [CrossRef]
- Janke, D.; Bornwin, M.; Coorevits, K.; Hempel, S.; Van Overbeke, P.; Demeyer, P.; Rawat, A.; Declerck, A.; Amon, T.; Amon, B. A Low-Cost Wireless Sensor Network for Barn Climate and Emission Monitoring—Intermediate Results. Atmosphere 2023, 14, 1643. [Google Scholar] [CrossRef]
- Janke, D.; Willink, D.; Ammon, C.; Hempel, S.; Schrade, S.; Demeyer, P.; Hartung, E.; Amon, B.; Ogink, N.; Amon, T. Calculation of ventilation rates and ammonia emissions: Comparison of sampling strategies for a naturally ventilated dairy barn. Biosyst. Eng. 2020, 198. [Google Scholar] [CrossRef]
- Korotcenkov, G. Metal Oxides for Solid-State Gas Sensors: What Determines Our Choice? Mater. Sci. Eng. B 2007, 139, 1–23. [Google Scholar] [CrossRef]
- Kwak, D.; Lei, Y.; Maric, R. Ammonia gas sensors: A comprehensive review. Talanta 2019, 204, 713–730. [Google Scholar] [CrossRef]
- Schütze, A.; Baur, T.; Leidinger, M.; Reimringer, W.; Jung, R.; Conrad, T.; Sauerwald, T. Highly Sensitive and Selective VOC Sensor Systems Based on Semiconductor Gas Sensors: How to? Environments 2017, 4, 20. [Google Scholar] [CrossRef]
- Leidinger, M. Methods for Increasing the Sensing Performance of Metal Oxide Semiconductor Gas Sensors at ppb Concentration Levels. Ph.D. Thesis, Saarland University, Saarbrücken, Germany, 2018. [Google Scholar]
- Leidinger, M.; Sauerwald, T.; Reimringer, W.; Ventura, G.; Schütze, A. Selective detection of hazardous VOCs for indoor air quality applications using a virtual gas sensor array. J. Sens. Sens. Syst. 2014, 3, 253–263. [Google Scholar] [CrossRef]
- Shooshtari, M.; Salehi, A. An electronic nose based on carbon nanotube -titanium dioxide hybrid nanostructures for detection and discrimination of volatile organic compounds. Sens. Actuators B Chem. 2022, 357, 131418. [Google Scholar] [CrossRef]
- Schultealbert, C.; Baur, T.; Schütze, A.; Sauerwald, T. Facile Quantification and Identification Techniques for Reducing Gases over a Wide Concentration Range Using a MOS Sensor in Temperature-Cycled Operation. Sensors 2018, 18, 744. [Google Scholar] [CrossRef]
- Bosch. BME AI-Studio Documentation, n.d. Version 2.2.7. Available online: https://www.bosch-sensortec.com/software/bme/docs/ (accessed on 18 October 2024).
- Parsiegel, R.; Budag Becker, M.; Siewert, J.; Feldmann, L.; Gebhard, M. Drones for Efficient Fertilization Monitoring—DEF. 2023. Available online: https://www.hackster.io/def/drones-for-efficient-fertilization-monitoring-def-c559bb (accessed on 15 October 2024).
- Bosch Sensortec. BME688. Development Kit, Version 1.2 ed., n.d. Available online: https://www.bosch-sensortec.com/media/boschsensortec/downloads/product_flyer/bst-bme688-fl001.pdf (accessed on 13 September 2024).
- Botticini, S.; Comini, E.; Iacono, S.; Gaioni, L.; Galliani, A.; Ghislotti, L.; Lazzaroni, P.; Re, V.; Sisinni, E.; Verzeroli, M.; et al. Index Air Quality Monitoring for Light and Active Mobility. Sensors 2024, 24, 3170. [Google Scholar] [CrossRef] [PubMed]
- Panteli, C.; Stylianou, M.; Anastasiou, A.; Andreou, C. Rapid Detection of Bacterial Infection Using Gas Phase Time Series Analysis. In Proceedings of the 2023 IEEE SENSORS, Vienna, Austria, 29 October–1 November 2023; pp. 1–4. [Google Scholar] [CrossRef]
- Tămâian, A.; Folea, S. Spoiled Food Detection Using a Matrix of Gas Sensors. In Proceedings of the 2024 IEEE International Conference on Automation, Quality and Testing, Robotics (AQTR), Cluj-Napoca, Romania, 16–18 May 2024; pp. 1–5. [Google Scholar] [CrossRef]
- Bosch Sensortec. BME688. Digital Low Power Gas Pressure, Temperature & Humidity Sensor with AI, Rev. 1.3 ed. 2024. Available online: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme688-ds000.pdf (accessed on 13 September 2024).
- Dräger. Technical Manual for Stationary Electrochemical DrägerSensor®, 3rd ed.; Dräger: Lübeck, Germany, 2022; pp. 81–82. [Google Scholar]
- Dräger. Dräger X-Node. Wireless Toxic Gas Monitoring System. 2024. Available online: https://www.draeger.com/Content/Documents/Products/X-node-en-US-107189-00-D2024-en-US.pdf (accessed on 23 February 2025).
- Bundesanstalt für Landwirtschaft und Ernährung. MuD-Demonstrationsbetrieb: Prignitzer Landschwein GmbH & Co. KG, n.d. Available online: https://www.mud-tierschutz.de/mud-tierschutz/netzwerke-demonstrationsbetriebe/netzwerke-schwein/netzwerke-14-15/prignitzer-landschwein-gmbh-co-kg (accessed on 10 November 2024).
- Yang, X.; Haleem, N.; Osabutey, A.; Cen, Z.; Albert, K.; Autenrieth, D. Particulate Matter in Swine Barns: A Comprehensive Review. Atmosphere 2022, 13, 490. [Google Scholar] [CrossRef]
- Ding, J.; McAvoy, T.J.; Cavicchi, R.E.; Semancik, S. Surface state trapping models for SnO2-based microhotplate sensors. Sens. Actuators B Chem. 2001, 77, 597–613. [Google Scholar] [CrossRef]
- Schultealbert, C.; Baur, T.; Schütze, A.; Böttcher, S.; Sauerwald, T. A novel approach towards calibrated measurement of trace gases using metal oxide semiconductor sensors. Sens. Actuators B Chem. 2017, 239, 390–396. [Google Scholar] [CrossRef]
- Wiegleb, G. Gas Measurement Technology in Theory and Practice. Measuring Instruments, Sensors, Applications; Springer Fachmedien Wiesbaden GmbH: Wiesbaden, Germany, 2023; ISBN 978-3-658-37232-3. [Google Scholar]
- Ballard, Z.; Brown, C.; Madni, A.; Ozcan, A. Machine learning and computation-enabled intelligent sensor design. Nat. Mach. Intell. 2021, 3, 556–565. [Google Scholar] [CrossRef]
- The MathWorks, Inc. Regression Learner App, n.d. Available online: https://de.mathworks.com/help/stats/regression-learner-app.html (accessed on 26 February 2025).
- Bosch Sensortec. BME688 Software, n.d. Available online: https://www.bosch-sensortec.com/software-tools/software/bme688-and-bme690-software/ (accessed on 2 January 2025).
- Tabase, R.; Millet, S.; Brusselman, E.; Ampe, B.; Cuyper, C.; Sonck, B.; Demeyer, P. Effect of ventilation control settings on ammonia and odour emissions from a pig rearing building. Biosyst. Eng. 2020, 192, 215–231. [Google Scholar] [CrossRef]
- Arendes, D.; Robin, Y.; Amann, J.; Petto, A.; Schütze, A.; Bur, C. Transfer Learning Between Two Different Datasets of MOS Gas Sensors. In Proceedings of the 2024 IEEE International Symposium on Olfaction and Electronic Nose (ISOEN), Grapevine, TX, USA, 12–15 May 2024; pp. 1–3. [Google Scholar] [CrossRef]
- Miquel-Ibarz, A.; Burgués, J.; Marco, S. Global calibration models for temperature-modulated metal oxide gas sensors: A strategy to reduce calibration costs. Sens. Actuators B Chem. 2022, 350, 130769. [Google Scholar] [CrossRef]
- Nie, E.; Zheng, G.; Ma, C. Characterization of odorous pollution and health risk assessment of volatile organic compound emissions in swine facilities. Atmos. Environ. 2020, 223, 117233. [Google Scholar] [CrossRef]
- Aurora, A. Algorithmic Correction of MOS Gas Sensor for Ambient Temperature and Relative Humidity Fluctuations. IEEE Sens. J. 2022, 22, 15054–15061. [Google Scholar] [CrossRef]
- Cai, M.; Xu, S.; Zhou, X.; Lu, H. Electronic Nose Humidity Compensation System Based on Rapid Detection. Sensors 2024, 24, 5881. [Google Scholar] [CrossRef] [PubMed]
Parameter | Type of Gas Sensor | ||
---|---|---|---|
MOS | Electrochemical | Infrared Absorption | |
Sensitivity | ++ | + | ++ |
Accuracy | + | + | ++ |
Selectivity | - | + | ++ |
Response time | ++ | - | - |
Stability | + | - - | + |
Durability | + | - | ++ |
Maintenance | ++ | + | - |
Cost | ++ | + | - |
Suitability to portable instruments | ++ | - | - - |
Location | Description |
---|---|
A | Pregnant sows |
B | 6-week-old piglets |
C | 270-day-old sows |
D | 8-week-old piglets |
Design Cycle | Temperature Cycle | Accuracy |
---|---|---|
Z1 | HP354 | % |
HP301 | % | |
HP411 | % | |
HP501 | % | |
Z2 | HP501 | % |
HP502 | % | |
HP503 | % | |
HP504 | % |
Mean Concentration in Location C: | 6.48 ppm | |||
---|---|---|---|---|
Sensor-to-Sensor Deviation | ||||
Test Data | TSD | |||
Model | Mean RMSE ± Std. Dev. [ppm] | Mean NRMSE ± norm. Std. Dev. [%] | Mean RMSE ± Std. Dev. [ppm] | Mean NRMSE ± Norm. Std. Dev. [%] |
Neural Network | 1.51 ± 0.04 | 23.3 ± 0.6 | 1.82 ± 0.24 | 28.1 ± 3.7 |
Bagged Trees | 1.13 ± 0.01 | 17.4 ± 0.2 | 2.00 ± 0.21 | 30.9 ± 3.2 |
Filter Membrane Impact | ||||
Training Dataset: | DnF | DF | ||
Model | RMSE [ppm] | NRMSE [%] | RMSE [ppm] | NRMSE [%] |
Neural Network | 1.63 | 25.2 | 1.25 | 19.3 |
Bagged Trees | 1.14 | 17.6 | 1.09 | 16.8 |
Mean Concentration: | 5.51 ppm | 10.45 ppm | ||
---|---|---|---|---|
Training Dataset: DBCD | Test Data | TA | ||
Model | RMSE [ppm] | NRMSE [%] | RMSE [ppm] | NRMSE [%] |
Neural Network | 1.49 | 27.0 | 3.61 | 34.5 |
Bagged Trees | 0.94 | 17.1 | 4.51 | 43.2 |
Mean concentration: | 7.44 ppm | 4.62 ppm | ||
Training dataset: DACD | Test data | TB | ||
Model | RMSE [ppm] | NRMSE [%] | RMSE [ppm] | NRMSE [%] |
Neural Network | 1.76 | 23.7 | 2.21 | 47.8 |
Bagged Trees | 1.21 | 16.3 | 2.09 | 45.2 |
Mean concentration: | 6.82 ppm | 6.48 ppm | ||
Training dataset: DABD | Test data | TC | ||
Model | RMSE [ppm] | NRMSE [%] | RMSE [ppm] | NRMSE [%] |
Neural Network | 1.65 | 24.2 | 2.74 | 42.3 |
Bagged Trees | 1.14 | 16.7 | 2.95 | 45.5 |
Mean concentration: | 7.18 ppm | 5.40 ppm | ||
Training dataset: DABC | Test data | TD | ||
Model | RMSE [ppm] | NRMSE [%] | RMSE [ppm] | NRMSE [%] |
Neural Network | 2.08 | 29.0 | 2.58 | 47.8 |
Bagged Trees | 1.41 | 19.6 | 2.42 | 44.8 |
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. |
© 2025 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
Parsiegel, R.; Budag Becker, M.; Try, P.; Gebhard, M. Virtual MOS Sensor Array Design for Ammonia Monitoring in Pig Barns. Sensors 2025, 25, 2617. https://doi.org/10.3390/s25082617
Parsiegel R, Budag Becker M, Try P, Gebhard M. Virtual MOS Sensor Array Design for Ammonia Monitoring in Pig Barns. Sensors. 2025; 25(8):2617. https://doi.org/10.3390/s25082617
Chicago/Turabian StyleParsiegel, Raphael, Miguel Budag Becker, Pieter Try, and Marion Gebhard. 2025. "Virtual MOS Sensor Array Design for Ammonia Monitoring in Pig Barns" Sensors 25, no. 8: 2617. https://doi.org/10.3390/s25082617
APA StyleParsiegel, R., Budag Becker, M., Try, P., & Gebhard, M. (2025). Virtual MOS Sensor Array Design for Ammonia Monitoring in Pig Barns. Sensors, 25(8), 2617. https://doi.org/10.3390/s25082617