Low-cost CO2 and NH3 sensors are widely used in smart livestock housing, but their slow dynamic response during ventilation-fan transitions can cause substantial measurement errors that steady-state monitoring approaches overlook. This study aimed to quantify these transient errors and compensate for them in real time. Chamber experiments reproducing pig-barn ventilation rates (2–20 ACH) were combined with field measurements in a commercial finishing-pig barn. A hybrid framework coupling a physics-based dual first-order lag model with a GRU residual-correction model was evaluated using event-level five-fold cross-validation, held-out week-2 field data from the same farm, and ablation analysis. Transient error reached up to 12.97 times the steady-state level and was associated with the ratio of the sensor time constant to the room dilution time constant. Hybrid compensation reduced transient MAE by 82.7% for CO2 and 66.9% for NH3 and shortened the equivalent CO2 t90 by 70.9%; improvements of 73.3% and 59.3% were maintained on the held-out field data. The hybrid model outperformed physics-only and deep-learning-only models. After 8-bit quantization, processing on a Raspberry Pi 4B(Raspberry Pi Ltd., Cambridge, UK) required 4.58 ms per gas and 9.54 ms for both gases. Dynamic compensation can therefore improve gas-data reliability during ventilation transients, although validation across seasons and farms remains necessary.
No takes yet. Share an insight, caveat, or question.
Jeong et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: