Source-linked AI summary
A Trans-Domain Digital Twin for Bio-Aware Control of Climate and Energy in Cattle Fattening Barns Using Single-Episode Optimizer Learning
Mansoorali Amiri
TL;DR
Closed cattle barns require control that accounts for interactions between climate, herd growth, feed, and energy. The paper proposes SE-TDDT, a multi-rate digital twin combining climate and growth simulation, MPC, lightweight learning, and structured memory. It demonstrates an executable trans-domain control cycle while identifying feed pressure and actuator smoothness as remaining weaknesses.
Problem
The paper addresses the lack of implementable feedback coupling among barn climate, livestock growth, feed, and energy.
Method
SE-TDDT combines mechanistic climate and growth simulators, five-minute MPC, daily biological guidance, lightweight learning, and structured knowledge memory.
Results
Climate, growth, energy, feed, biological guidance, and memory were linked within one executable control cycle while preserving thermal comfort.
Takeaways & Limitations
The framework supports memory-based online edge control, with offline experience compressed into a loadable package rather than learning from zero.
Takeaways & Limitations
Reported limitations include simulation-based single-episode validation, weaker feed-pressure management, and frequent actuator switching or reversal events.
Abstract
from arXiv · showhide
In closed cattle-fattening barns, the indoor climate and herd growth are mutually interdependent. Temperature, relative humidity, airflow, and ventilation affect thermal comfort, feed intake, metabolic heat production, daily growth, feed efficiency, and energy consumption, while body-weight gain alters the future heat and moisture loads of the barn and, consequently, its ventilation, heating, and energy requirements. This article proposes a trans-domain digital twin framework with single-episode learning capability, customized for bio-aware climate and energy control in a closed cattle-fattening barn. The framework integrates a mechanistic climate simulator, a livestock growth simulator, model predictive control, lightweight reinforcement learning, and structured knowledge memory within a multi-rate temporal-loop architecture. The fast temporal loop operates every five minutes to evaluate actuator decisions and maintain short-term thermal comfort, safety, and energy efficiency, whereas the slow temporal loop provides biological guidance based on daily climatic conditions, feed efficiency, heat production, and growth-limiting factors. The results show that climate, growth, energy, feed, biological guidance, and memory can be linked within a single executable control cycle. Remaining limitations include the need for field validation, improved management of feed pressure, and reduction of abrupt actuator-command variations.
1 Introduction
The paper addresses the weak coupling of climate, livestock biology, feed, and energy in agricultural digital twins. It proposes SE-TDDT, combining bio-aware control, mechanistic growth modeling, single-episode learning, and structured memory for closed-loop barn management.
- Climate decisions affect comfort, feed intake, heat production, feed efficiency, and growth, while herd growth changes future barn heat, moisture, ventilation, heating, and energy requirements.
- SE-TDDT couples a mechanistic climate simulator with a mechanistic livestock-growth simulator in a unified decision-making framework.
- The architecture uses a fast climate-control loop, a slower growth-guidance loop, MPC as final actuator decision-maker, and lightweight learning components that adjust guidance or decision biases.
- CCLL-SEL, SARG-SEL, SS-KStore, and SETD-KStore compress climate contexts, growth references, training traces, guidance, and policies into loadable knowledge for online edge control.
- Beef-LiGAPS supplies body weight, ADG, feed intake, feed efficiency, heat production, and growth-limiting outputs for biological interpretation.
- Existing agricultural digital twins often emphasize monitoring or prediction rather than executable feedback coupling among climate, growth, feed, and energy.
3 Proposed SE-TDDT Architecture
SE-TDDT is an executable trans-domain architecture that couples a fast climate loop with a slower biological loop. MPC evaluates predicted actuator consequences, while growth feedback and stored knowledge guide bio-aware decisions.
- SE-TDDT specializes TDDT for cattle barns by coupling indoor climate, livestock growth, feed response, metabolic heat, actuator operation, and energy use.
- Single-episode training links the fast climate loop with the slower growth loop and compresses experience into structured memory for online edge control.
- The architecture contains physical-barn, climate-simulation, and growth-simulation layers that provide observations, predictions, biological states, and limiting factors.
- The inner loop evaluates actuator candidates using short-term climate rollouts rather than applying commands immediately after measurement.
- QLPV can approximate mechanistic climate rollouts with context-dependent coefficients while retaining sensitivity to climatic and biological conditions.
- MPC scores candidates across comfort, energy, safety, conflict, and biological benefit, then selects the lowest-cost command as final decision-maker.
- The outer loop operates daily, interpreting accumulated climate conditions as effects on growth, feed response, heat production, and future barn load.
4 Formalism and Decision Logic
The formalism represents barn climate, daily biological updates, guidance, MPC costs, and knowledge storage as connected operations. Multi-rate aggregation links five-minute control with daily growth feedback.
- 4.1 Climate State and Transition Model: Climate state encodes indoor temperature, humidity, airflow, air quality, climate context, previous command, outdoor weather, and herd context for five-minute MPC control.
- 4.1 Climate State and Transition Model: The climate transition function predicts the next barn state from actuator decisions, outdoor conditions, and herd thermal load.
- 4.2 Daily Aggregation and Growth Update: Five-minute climate and actuator records are aggregated into daily vectors containing climate, comfort, and energy information for the growth simulator.
- 4.2 Daily Aggregation and Growth Update: The growth update uses daily climate input and diet status to produce body weight, ADG, feed intake, feed efficiency, heat production, and limiting factors.
- 4.3 Biological Guidance: Biological guidance converts growth state, heat production, feed intake, and limiting factors into priorities that correct MPC preferences.
- 4.4 MPC Objective Function: MPC assigns candidate costs using comfort, energy, safety, actuator conflict, and biological benefit, then minimizes the cost while treating biology as a soft correction.
- 4.5 Knowledge Components: The knowledge layer organizes climate memory, biological guidance, streaming memory, and policy packages for online control.
- 4.5 Knowledge Components: SETD-KStore compresses training experience into a loadable package so edge control starts from prior knowledge rather than zero.
5 Dataset, Simulation Setup, and Edge Deployment
The study constructs climate and biological datasets, simulates barn–herd interactions, and deploys single-episode learning for edge-based control. Climate memory is prepared from 11 years of local observations, while biological guidance is synchronized from daily growth data to five-minute MPC steps.
- Barn and herd case study: The case study models a 120-head closed Holstein fattening barn using building, weather, sensor, actuator, lighting, and herd-state inputs.The physical twin includes building geometry and equipment placement transferred through an IFC-based BIM representation.
- Climate dataset and CCLL construction: CCLL-SEL cleans, synchronizes, resamples, fills, and aggregates 11 years of local climate observations into contextual climate priors for MPC.The raw data include temperature, humidity, wind, radiation, pressure, rainfall, and related weather variables.
- SARG dataset and guidance construction: SARG-SEL cleans biological records, synchronizes them with daily climate contexts, maps guidance to five-minute MPC steps, and constructs stage-aware control features.Features include body weight, daily gain, feed intake, feed efficiency, heat production, limiting factors, diet reference, growth stage, and risk level.
- Growth-simulator inputs and outputs: The growth simulator maps daily climate, herd status, diet, and growth stage to body weight, daily gain, feed intake, feed efficiency, heat production, and limitations.These outputs are converted into biological guidance for the next climate-control cycle and alter future barn climate demand as the herd grows.
- Edge deployment: Single-episode training was executed on an Orange Pi 5 using at most two CPU cores and up to 4 GB temporary memory.The reported run required 505,986 seconds for 5,761 training steps; online control then used the compressed knowledge package locally without GPU or cloud computation.
6 Verification, Validation, and Experimental Design
The evaluation verifies traceable coupling among climate simulation, growth simulation, MPC, biological guidance, and structured memory. Closed-loop results show executable bio-aware control, while baseline and ablation scenarios separate contributions from prediction, growth feedback, and memory.
- Verification: Verification checks temporal-rate compatibility, data ordering, unit consistency, guidance return to MPC, and reconstruction of training records across climate, growth, decision, and memory artifacts.The evidence includes five-minute climate traces, daily growth outputs, MPC records, guidance records, contextual memories, and KStore artifacts.
- Validation: Closed-loop validation evaluates the integrated climate–growth–MPC–guidance cycle rather than disconnected simulator links.Five-minute climate data are aggregated into daily indicators, biological outputs become SARG guidance, and MPC uses that guidance in the next climate decision.
- Closed-loop results: 0% comfort-violation rate, about 917 kg final weight, 96.91% growth accuracy, and R2 ≈0.996 were reported for the single-episode closed loop.Energy accuracy was about 92.61%, while low feed-consumption accuracy remained about 51%.
- Baseline and ablation design: The baseline design compares simple HVAC, climate MPC, TDDT without memory, and full SE-TDDT to isolate prediction, growth feedback, and knowledge-memory contributions.The full-mode reference performance is Comfort = 100, Energy = 92.61, Growth = 96.91, Feed = 51.00.
7 Results
SE-TDDT linked climate comfort and safety, biological growth, energy use, actuator behavior, and knowledge transfer within an executable control cycle. Comfort and growth tracking were strong, while feed performance and actuator smoothness remained weaker dimensions.
- Climate Comfort and Safety: 100.00 thermal-comfort indicator and zero comfort violation showed that the inner loop preserved climate within animal comfort limits.The simulated indoor temperature remained within the comfort limits during the reported tracking period.
- Climate Comfort and Safety: Safety filtering prevented heating–ventilation conflict and kept actuator decisions executable.The interlock mechanism limited heating during intense ventilation.
- Growth and Biological Response: A 1000-day closed-loop trajectory reached about 917 kg final body weight with 96.91% growth accuracy and R2 ≈0.996.ADG, feed intake, feed efficiency, and heat production were used to evaluate biological response and return feedback to climate control.
- Growth and Biological Response: Low feed-consumption accuracy of about 51.00% identified feed-pressure management as a remaining biological limitation.Growth tracking was strong, but feed performance was weaker than the other reported dimensions.
- Energy and Actuator Behavior: Ventilation dominated actuator use while heating remained low, but the policy produced 2484 command changes, 695 sudden changes, and 246 reversal oscillations.The reported energy behavior was acceptable, whereas switching smoothness remained incomplete and requires stronger smoothing constraints.
- Knowledge Transfer and Online Readiness: Offline single-episode experience was compressed into loadable trans-domain knowledge that the edge controller used as prior guidance for lightweight online MPC adaptation.The memory layers stored training traces and extracted policy, climate, biological-guidance, reward, coverage, and uncertainty information.
8 Discussion
SE-TDDT reframes barn climate control as a bio-aware, trans-domain feedback problem. Its linked simulators, MPC, biological guidance, memory, and edge architecture keep climate, growth, energy, and feed-related decisions within one executable cycle.
- 8.1 Interpretation of Main Findings: SE-TDDT preserves climatic comfort while generating a coherent 1000-day growth trajectory within one executable control cycle.The cycle links climate, growth, feed, energy, biological guidance, memory, and MPC.
- 8.1 Interpretation of Main Findings: The growth loop converts daily climate aggregates into biological guidance that corrects MPC candidate evaluations using heat production, feed, growth, and limiting-factor priorities.MPC remains the final actuator decision-maker.
- 8.1 Interpretation of Main Findings: Single-episode memory transfers offline experience to online control through streaming traces and a compressed package of policies, contexts, guidance relationships, rewards, coverage, and uncertainty.The edge controller loads prior knowledge instead of learning from zero and fine-tunes decisions with real barn data.
- 8.2 Coverage-Based Comparison with Existing Approaches: SE-TDDT connects climate simulation, growth simulation, MPC, biological guidance, and structured memory within one executable feedback loop.This distinguishes it from approaches that address only selected climate, energy, or growth dimensions.
- 8.2 Coverage-Based Comparison with Existing Approaches: Unlike conventional climate-control methods, SE-TDDT evaluates actuator candidates using biological implications alongside comfort and energy cost.The growth loop returns heat production, feed intake, feed efficiency, growth status, and limiting factors to the controller.
- 8.2 Coverage-Based Comparison with Existing Approaches: Unlike standalone growth simulation, SE-TDDT returns climate-driven biological outputs to MPC as feedback guidance.Daily aggregated climate data are sent to the growth simulator before guidance is returned to control.
- 8.2 Coverage-Based Comparison with Existing Approaches: The architecture uses five-minute climate control, daily growth guidance, structured memory, and online edge deployment to coordinate multiple domains.The edge implementation provides a path toward local barn-level monitoring, decision support, and adaptation.
- 8.1 Interpretation of Main Findings: Climate decisions affect livestock response, while herd growth changes future thermal loads, ventilation demand, and energy requirements.This two-way coupling treats climate and growth as feedback-coupled processes rather than independent subsystems.
9 Limitations and Future Work
The framework demonstrates executable climate–growth–knowledge coupling but remains constrained by feed management, actuator smoothness, validation scope, climate-model resolution, and missing gas dynamics. Future work targets stronger biological weighting, smoother control, real-barn validation, higher-fidelity climate modeling, and a lightweight gas layer.
- 9.1 Observed Limitations: Feed performance remained weaker than other dimensions, requiring stronger phase–diet adaptation and more direct weighting of feed and growth factors.The limitation is reflected in low feed-consumption accuracy and feed–growth analysis.
- 9.1 Observed Limitations: Frequent command changes, abrupt changes, and reversal oscillations show that actuator behavior was not fully smooth.Proposed remedies include switching penalties, ramp constraints, minimum dwell time, hysteresis, and smoother weight adjustment.
- 9.1 Observed Limitations: Validation remains limited to single-episode, simulation-based execution and requires real barn data, numerical baselines, real ablations, and factorial season-by-growth scenarios.The limitation concerns evidence scope rather than the reported executable feasibility.
- 9.1 Observed Limitations: The lightweight 1-zone climate model cannot fully represent spatial heterogeneity in barn geometry, actuator placement, airflow, temperature, and humidity.Future versions should use an edge-executable FFD or three-dimensional low-order model.
- 9.1 Observed Limitations: The framework lacks a meso-scale gas layer for CO2, CH4, NH3, N2O, and water vapor.A lightweight reservoir-based layer is proposed to connect manure, nitrogen, moisture, and volatile solids to MPC decisions.
- 9.2 Future Work: Future SARG-SEL development should strengthen phase–diet adaptation and directly weight feed intake, feed efficiency, ADG, feed per kilogram of gain, and limiting factors.The proposed change addresses the identified weakness in feed performance.
- 9.2 Future Work: Future MPC versions should add softer actuator constraints, including switching penalties, ramp-rate limits, minimum dwell time, hysteresis, and smoother decision-weight adjustment.These changes target command smoothness.
- 9.2 Future Work: Broader online validation requires real farm measurements, numerical baseline execution, real ablation tests, and factorial season-by-growth scenarios.The current results establish simulation-based feasibility but not broad field validation.
10 Conclusion
The paper presents SE-TDDT as a unified, executable architecture for bio-aware climate and energy control in a closed cattle-fattening barn. Its central contributions are feedback coupling between climate and growth and single-episode knowledge transfer to edge control.
- 10 Conclusion: SE-TDDT keeps climate, growth, energy, feed, biological guidance, and knowledge memory within one executable decision-making cycle.The framework transforms barn climate control from a single-domain HVAC problem into a bio-aware trans-domain control problem.
- 10 Conclusion: Climate decisions affect growth, feed response, and heat production, while growth and heat production alter the barn’s future climatic load.The growth loop returns this biological guidance to MPC rather than serving only as a reporting component.
- 10 Conclusion: Single-episode training with SS-KStore and SETD-KStore transfers offline experience into a loadable knowledge package for online edge control.The edge controller loads prior trans-domain knowledge and fine-tunes decisions with real barn data.
- 10 Conclusion: SE-TDDT demonstrates a memory-supported and biologically guided path beyond conventional HVAC regulation for barn-level climate control.The conclusion emphasizes executable architecture as the overall outcome.
Code and Data Availability
The study’s source code, configurations, datasets, simulation paths, and plotting scripts are published in a public, versioned Zenodo archive.
- Code and Data Availability: A public, versioned Zenodo archive contains the SE-TDDT workflow, interfaces, control logic, KStore scripts, datasets, inputs, outputs, and plotting scripts.The archive provides a permanent record at the stated DOI.
Ethics Statement
The study is simulation-based and reports no new live-animal intervention or invasive animal experiment.
- The study uses simulation and does not report a new intervention on live animals or an invasive animal experiment.Future online validation with real barn data is expected to meet applicable animal-welfare, farm-operation, data-management, and institutional-approval requirements.
Funding
The research received no specific grant from public, commercial, or not-for-profit funding agencies.
- The research received no specific grant from public, commercial, or not-for-profit funding agencies.
CRediT Authorship Contribution Statement
Mansoorali Amiri contributed across the study’s conceptual, technical, analytical, validation, data, visualization, and writing activities.
- Mansoorali Amiri handled conceptualization, methodology, software, formal analysis, validation, data curation, visualization, and manuscript drafting and editing.