# Data-Driven Prediction of Ammonia and Methane Concentrations and Emissions in Dairy Barns Using Artificial Neural Networks

**Authors:** Luciano Manuel Santoro, Provvidenza Rita D’Urso, Claudia Arcidiacono, Salvatore Coco

PMC · DOI: 10.3390/ani16050824 · Animals : an Open Access Journal from MDPI · 2026-03-06

## TL;DR

This study uses artificial neural networks to accurately predict ammonia and methane emissions in dairy barns, helping farmers monitor and reduce environmental impact.

## Contribution

The novel use of artificial neural networks with climatic, dietary, and animal activity variables to predict ammonia and methane emissions in dairy barns.

## Key findings

- MLP models achieved high accuracy with R2 values of 0.93 for ammonia and 0.96 for methane.
- Incorporating climatic, dietary, and animal activity variables significantly improved prediction performance.
- ANN models offer a cost-effective solution for monitoring and reducing emissions in dairy farming.

## Abstract

Dairy farming contributes to the emission of gases such as ammonia (NH3) and methane (CH4), which negatively impact the environment. NH3 causes water and soil pollution, while CH4 is a powerful greenhouse gas driving climate change. Direct measurement of these gases on farms is expensive and requires specialised equipment, limiting routine monitoring. This study applies artificial intelligence (AI) techniques to predict gas emissions from a dairy barn. AI models can learn complex patterns within data, enabling accurate prediction and reducing the need for continuous measurements. Moreover, the study identifies the main influencing variables (such as animal activity, climatic conditions, and dietary data) that significantly improve the accuracy of gas emission prediction. This approach is a cost-effective tool to support farmers in monitoring, achieving improved management decisions, and reducing the environmental footprint of dairy farming, contributing to more sustainable and environmentally responsible farming practices.

Ammonia (NH3) and methane (CH4) emissions from dairy farming pose significant environmental and climatic concerns. Several factors influence these emissions, including housing systems, diet, environmental conditions, and animal activity. Previous studies have mostly applied classical statistical methods to analyse the effect of these variables on gas emissions. Recent applications of artificial neural networks (ANNs) have not yet incorporated animal activity and diet as input variables. This study assessed the influence of climatic variables, animal activity and dietary intake on NH3 and CH4 concentrations and emissions from a naturally ventilated dairy barn under a Mediterranean climate. Multilayer perceptron (MLP) models were applied using environmental, activity, and dietary inputs. Model performance was evaluated using R, R2, MAE, MSE, SD, and RMSE. The results demonstrate that MLP models achieved accurate predictions, with R2 values of 0.93 and 0.96 for NH3 and CH4, respectively. Predictions incorporating climatic, diet and activity variables achieved the best performance. These findings suggest that ANN models, integrating these variables, represent effective tools for emission prediction, contributing to improved environmental management in dairy farming.

## Linked entities

- **Chemicals:** ammonia (PubChem CID 222), methane (PubChem CID 297)

## Full-text entities

- **Chemicals:** CH4 (MESH:D008697), Ammonia (MESH:D000641)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12984692/full.md

## Figures

14 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12984692/full.md

## References

67 references — full list in the complete paper: https://tomesphere.com/paper/PMC12984692/full.md

---
Source: https://tomesphere.com/paper/PMC12984692