RiuNet. Repositorio Institucional de la Universitat Politécnica de Valéncia
Publicación
Artículo científico (JournalArticle)
Machine learning-based multivariate time-series forecasting for environmental monitoring in pig houses under high stochasticity
[EN] Ammonia gas concentration in intensive swine production pose serious environmental and health challenges, particularly in naturally ventilated systems. This study presents an application-oriented comparative evaluation of eight state-of-the-art forecasting models to predict NH3 concentrations in a commercial pig house. First a factorial design assessed the impact of covariates, resolution time, window lengths, and pre-processing. Results identified data preprocessing as the primary driver of model accuracy, where causal non-centered smoothing significantly outperformed aggressive outlier removal, and the exclusion of non-essential covariates for predictions. Among the architectures, TiDE and D-Linear excelled in short-term forecasting. Targeted optimization of the TiDE model using only past covariates achieved an R2 of 0.895 f 0.005 and a Mean Absolute Error of 0.150 f 0.012 for a 30-minute horizon, representing an improvement in variance explanation over the unoptimized baseline. For longer 60-minute horizons, models relying solely on past covariates showed diminishing returns; the optimized linear model (D-Linear) improved its R2 to 0.507 f 0.005, while the deep TiDE architecture plateaued at an R2 of 0.583 f 0.062. However, integrating future weather covariates proved essential for the Temporal Fusion Transformer (TFT), which utilized these inputs to stabilize multi-horizon forecasts, achieving a highly stable R2 of 0.88 f 0 at 30 min and maintaining a robust R2 of 0.665 f 0.015 at the challenging 60-minute horizon. These findings suggest a hybrid Precision Livestock Farming framework: employing optimized lightweight models like TiDE for immediate, real-time ventilation control, while reserving attention-based architectures enriched with meteorological forecasts for extended operational planning., Daniel Alexander Mendez was supported by the grant JDC2023-
050534-I funded by MICIU/AEI/10.13039/501100011033/ and by
FSE+. This publication is part of the R+D+i project PorcNFree
CPP2021-008476, funded by MCIN/AEI/10.13039/501100011033/
and by the European Union NextGenerationEU/PRTR .