Facility poultry breeding environment digital twin regulation method based on spatiotemporal data deep fusion

By employing a digital twin control method based on deep fusion of spatiotemporal data, and utilizing VMD-Attention-BiLSTM and nonlinear model predictive control, precise control of the poultry farming environment in facilities was achieved. This resolved the contradiction between ventilation and ammonia removal and heat preservation and energy saving, thereby improving poultry welfare and energy efficiency.

CN121934400BActive Publication Date: 2026-07-10SHANDONG AGRICULTURAL UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG AGRICULTURAL UNIVERSITY
Filing Date
2026-03-31
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional environmental control technologies for facility-based poultry farming cannot adapt to complex operating conditions, making it difficult to resolve the contradiction between ventilation and ammonia removal and heat preservation and energy saving, thus hindering dynamic and precise control and affecting poultry growth performance and energy utilization efficiency.

Method used

A digital twin control method based on deep fusion of spatiotemporal data is adopted. The VMD-Attention-BiLSTM prediction model is used to predict future environmental parameters. Combined with nonlinear model predictive control and adaptive sliding mode control, coordinated commands are generated for precise control, including real-time compensation for ventilation volume and heat loss.

Benefits of technology

It enables precise environmental control under complex operating conditions, improves poultry welfare and energy efficiency, resolves the contradiction between ventilation and ammonia removal and heat preservation and energy saving, and enhances the system's resistance to disturbances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121934400B_ABST
    Figure CN121934400B_ABST
Patent Text Reader

Abstract

This application discloses a digital twin control method for facility poultry farming environments based on deep spatiotemporal data fusion, relating to the field of poultry farming technology. It proposes a spatiotemporal sequence prediction model for environmental parameters using a bidirectional long short-term memory network (VMD-Attention-BiLSTM) that integrates variational mode decomposition and attention mechanisms, effectively overcoming the system's large time lag. A digital twin decision engine based on nonlinear model predictive control is constructed, and the optimal control sequence for energy consumption and environmental quality is solved under multiple constraints by establishing a joint state equation for thermodynamics and gas diffusion. Specifically, for complex winter conditions, a ventilation-heating collaborative game strategy based on real-time heat loss compensation is designed. Adaptive sliding mode control with radial basis function neural network compensation is introduced into the underlying execution unit, significantly enhancing the system's anti-disturbance capability. This achieves precise environmental control under complex conditions, improving poultry welfare and energy efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of poultry farming technology, specifically to a digital twin control method for facility poultry farming environment based on deep fusion of spatiotemporal data. Background Technology

[0002] As the livestock industry transforms towards large-scale, intelligent, and refined operations, facility-based poultry (broilers, laying hens, etc.) farming has become a core pillar for ensuring global protein supply. Poultry growth and development are highly sensitive to microenvironmental factors such as temperature, humidity, ammonia concentration, and light within the poultry house. Even minor fluctuations in these factors can induce severe stress responses in poultry, leading to decreased immunity and reduced growth performance. Therefore, precise control of the farming microenvironment has become a crucial aspect of facility-based poultry farming.

[0003] The poultry house environment is a typical multiple-input multiple-output (MIMO) system, exhibiting complex dynamic characteristics of strong coupling, nonlinearity, and large time delays, with close intrinsic relationships between various environmental factors. Traditional control technologies, such as PID control based on a single threshold and simple logic switching control, generally suffer from the drawback of severing the correlation between factors, failing to adapt to the complex operating conditions of the system, and struggling to achieve dynamic and precise control of the poultry microenvironment. These technologies are increasingly failing to meet the development needs of modern smart poultry farming. In cold winter conditions, facility poultry farming faces a particularly prominent technical contradiction: there is a significant "zero-sum game" between ventilation for ammonia removal and heat preservation for energy conservation. Increasing the frequency and duration of ventilation can effectively reduce the concentration of harmful gases in the house and improve air quality, but it also causes a large amount of heat loss, significantly increasing heat preservation energy consumption; reducing ventilation, while reducing energy consumption and maintaining stable indoor temperature, easily leads to the accumulation of harmful gases such as ammonia, deteriorating the farming environment.

[0004] Against this backdrop, the development of a digital twin control system with full-element perception, advanced time-series prediction, multi-objective intelligent decision-making, and precise execution capabilities is of great theoretical and engineering value for promoting the high-quality development of modern smart animal husbandry. Summary of the Invention

[0005] In order to solve the above-mentioned technical problems, this application proposes the following technical solution:

[0006] In a first aspect, embodiments of this application provide a digital twin control method for facility poultry farming environments based on deep spatiotemporal data fusion, including:

[0007] Collect and preprocess information on temperature, humidity, gas concentration, and light intensity in the breeding shed;

[0008] The preprocessed data is input into the constructed VMD-Attention-BiLSTM prediction model to predict environmental parameter information for future time moments.

[0009] The compensation ventilation volume and heat loss are calculated based on the environmental parameter information of the VMD-Attention-BiLSTM prediction model at future time points.

[0010] Based on the calculated compensation ventilation volume and heat loss, coordinated commands are generated and the equipment is driven to form a dynamic and adaptive closed-loop control, which enables precise coordinated regulation of the aquaculture environment.

[0011] In one possible implementation, the collection and preprocessing of information on temperature, humidity, gas concentration, and light intensity within the breeding shed includes:

[0012] A sensor array is used to collect real-time information on temperature, humidity, gas concentration, and light intensity inside the breeding shed;

[0013] The collected information is then subjected to preliminary Kalman filtering and data fusion.

[0014] The fused data is encapsulated in a formatted manner and then uploaded to the cloud-based decision management platform in real time using the MQTT protocol. The VMD-Attention-BiLSTM prediction model is set within the cloud-based decision management platform.

[0015] In one possible implementation, the VMD-Attention-BiLSTM prediction model includes: an input layer, a data denoising layer, a temporal feature extraction layer, and a feature weighting layer;

[0016] The input layer is used to receive a time-environment sequence composed of preprocessed data;

[0017] The received time environment sequence is input into the data denoising layer, which simultaneously captures the past information features and future trend features of the time series.

[0018] The temporal feature extraction layer captures the past information features and future trend features, and concatenates them to obtain a future environmental state prediction vector.

[0019] The feature weighting layer introduces an attention mechanism to dynamically assign weights to the vector features in the future environmental state prediction vector, and then performs weighted fusion of the future environmental state prediction vector to obtain the environmental state prediction value.

[0020] In one possible implementation, the received time-environment sequence input to the data processing layer simultaneously captures both past information features and future trend features of the time series, including:

[0021] Assuming the original environmental sequence is Variational Mode Decomposition (VMD) is used to transform the... Decomposed into One intrinsic mode component Each intrinsic mode component revolves around its respective center frequency. oscillation:

[0022]

[0023] The intrinsic modal components Composed of a set representing past information features and future trend features The Includes from The separated high-frequency noise term and low-frequency trend term:

[0024]

[0025] Introducing a secondary penalty factor and Lagrange multipliers The above constrained variation is transformed into an unconstrained variation, and the augmented Lagrangian function is constructed. :

[0026]

[0027] The frequency domain is continuously iterated and updated using the alternating direction multiplier method. , and Continue until the convergence condition is met;

[0028] After removing modes containing high-frequency random noise, select the remaining modes. Each effective modal component is given at time [time]. The numerical values ​​are reconstructed into a high-dimensional feature vector. :

[0029]

[0030] For length of Within the time window, the VMD module ultimately outputs a sequence of feature vectors. As subsequent input:

[0031]

[0032] in: Describes a minimization optimization operator for a multivariable set. For decomposition One modal component, for The center frequency corresponding to each modal component To represent taking the partial derivative with respect to time, For the Dirac function, Denotes the square of the L2 norm. This represents the equality constraints that must be satisfied. This indicates the inner product operation.

[0033] In one possible implementation, the temporal feature extraction layer captures past information features and future trend features, and concatenates them to obtain a future environmental state prediction vector, including:

[0034] The feature vector sequence The input is a BiLSTM network, which consists of two LSTM layers, forward and backward, to capture the forward inertia and backward dependence of environmental parameters as they evolve over time, respectively.

[0035] For each time step Feeding input to the forward LSTM layer And combine the previous forward hidden state Calculate the forward hidden state at the current time. :

[0036]

[0037] Inverse LSTM layer reads input And combine the backward hidden state of the next time step Calculate the backward hidden state at the current time. :

[0038]

[0039] At the same time The forward and backward hidden states are concatenated and fused with past and future contextual information to obtain the final integrated hidden state vector at that moment. :

[0040]

[0041] By analyzing each time step of the input sequence The above calculations ultimately output a hidden state matrix containing complete temporal features. :

[0042]

[0043] in: For the forward operator of LSTM, For the inverse operator of LSTM, This indicates a vector concatenation operation.

[0044] In one possible implementation, the feature weighting layer introduces an attention mechanism to dynamically assign weights to the vector features in the future environment state prediction vector, and then weights and fuses the future environment state prediction vectors to obtain the environment state prediction value, including:

[0045] First, each is computed through a fully connected layer. Energy score :

[0046]

[0047] Then, the attention weights are normalized to a probability distribution using the Softmax function. :

[0048]

[0049] Then, the calculated weights were used For BiLSTM Perform a weighted summation to obtain the final context vector. :

[0050]

[0051] Finally The input is linearly mapped to a fully connected layer, and the output is the future. Predicted environmental state values ​​at time 1 :

[0052]

[0053] in: , and For learnable network parameters, Represents an exponential function. Represents the hyperbolic tangent function. For fully connected layer functions, This is the output layer weight matrix. This is the output layer bias vector.

[0054] In one possible implementation, the calculation of compensated ventilation volume and heat loss based on environmental parameter information at future moments from the VMD-Attention-BiLSTM prediction model includes:

[0055] A mathematical model is established to describe the thermodynamics and gas diffusion processes in the livestock house, wherein:

[0056] The thermodynamic equation is:

[0057]

[0058] The gas diffusion equation is:

[0059]

[0060] The light environment equation is:

[0061]

[0062] in: air density, The specific heat capacity of air, For the volume of the breeding shed, For heating power, Poultry biological heat production rate For the ventilation volume of the fan, Indoor temperature, Outdoor temperature The heat transfer coefficient of the building envelope. Surface area of ​​the enclosure structure of the livestock shed. This refers to the indoor ammonia concentration. For poultry biogas production rate, Other gas diffusion terms, Indoor light intensity, For building light transmittance, For the predicted sequence Outdoor natural light intensity provides feedforward information. This refers to the brightness conversion factor of the supplementary light. This refers to the control value corresponding to the brightness of the supplementary light;

[0063] To minimize energy consumption and maintain environmental stability while satisfying the physiological constraints of poultry, a cost function is constructed. :

[0064]

[0065] in: Set the temperature for the target. The ammonia concentration penalty term is designed as a logarithmic barrier function: When the ammonia concentration approaches the upper limit At that time, the penalty value increases sharply, forcing the system to prioritize ventilation; As a penalty weight for temperature deviation, Weighting of penalties for excessive ammonia levels. Weighting for illumination deviation penalty As a weight for suppressing the energy consumption of wind turbines, As the energy consumption suppression weight of the heater, To suppress the energy consumption of the supplementary lighting, For the target illumination rhythm curve. This is the ventilation control amount for the fan. For heating control quantity, The square of the Euclidean norm;

[0066] Constraints:

[0067]

[0068] in: The minimum indoor temperature for poultry comfort. The highest indoor temperature for poultry comfort. This is the maximum ventilation control volume for the fan. This is the maximum heating control amount. This is the maximum fill light control value;

[0069] If the current status indicates that ammonia levels are too high and the temperature is too low, forced compensation will be initiated.

[0070] In one possible implementation, the step of initiating forced compensation when the current state is determined to be excessive ammonia and low temperature includes:

[0071] Set the expected trajectory of ammonia concentration decrease :

[0072]

[0073] in: The target ammonia concentration to be achieved at the next moment. This represents the ammonia concentration value measured by the sensor at the current moment. This represents the safe threshold for ammonia concentration, which is the ultimate steady-state target of the control system. The exponential decay rate coefficient has a range of values. This value determines the urgency of ammonia discharge; the larger the value, the faster the ammonia needs to decrease.

[0074] Discretization is performed using the forward Eulerian method, and the concentration at the next time step is set to equal the concentration of the target trajectory. The minimum control quantity required to achieve the target, i.e., the minimum necessary ventilation volume, is then solved. :

[0075]

[0076] in: To achieve the ammonia removal target, the minimum ventilation volume that the fan must provide at the current moment is: The ammonia production rate of poultry at the current moment. For the sampling and execution cycle of the control system,

[0077] This represents the expected change in ammonia concentration within a control period.

[0078] according to Calculate the instantaneous sensible heat loss power caused by the introduction of cold outdoor air through forced ventilation:

[0079]

[0080] in: This refers to the power loss due to the implementation of minimum ventilation. This is the actual measured temperature inside the building at the current moment. The outdoor temperature at the current moment;

[0081] In order to offset the heat loss from ventilation and maintain a stable temperature, i.e. Solve according to the thermodynamic energy balance equation

[0082] Determine the required heating compensation power To offset heat loss from ventilation and maintain temperature stability:

[0083]

[0084] in: The heater compensation power required to maintain thermal balance : Non-negativity constraint function, ensuring that the calculated heating power is not negative; To dissipate the foundation's heat load through the walls; The current biothermal production rate of poultry;

[0085] The final generated cooperative instruction vector This enables precise regulation.

[0086] In one possible implementation, the step of generating coordinated commands based on calculated compensated ventilation volume and heat loss, and driving equipment actions to form a dynamic, adaptive closed-loop control, for precise coordinated regulation of the aquaculture environment, includes:

[0087] For the speed control of ventilation equipment, the aforementioned Converted to target fan speed The tracking error is ,in It is the actual fan speed fed back by sensors;

[0088] Design sliding surface ,in For sliding surface parameters, The derivative of the tracking error;

[0089] The dynamic model of the ventilation equipment is simplified as follows:

[0090]

[0091] in: Represents the unknown nonlinear dynamics of the system. Indicates control gain. To control the input, Indicates external disturbance. The rate of change of acceleration, representing the actual fan speed fed back by the sensor, is the total output response of the system. This represents the rate of change of the actual fan speed;

[0092] Design a sliding mode control law:

[0093]

[0094] in: and For unknown items and The estimate, for, It is a switch item;

[0095] Introducing RBF neural networks to approximate unknown nonlinear terms online :

[0096] .

[0097] In one possible implementation, the introduction of an RBF neural network to approximate the unknown nonlinear term online is described. ,include:

[0098] The RBF neural network is designed with a three-layer structure: an input layer, a hidden layer, and an output layer.

[0099] Input vector The hidden layer uses the Gaussian function:

[0100]

[0101] in: For the first The center vector of each node For the base width parameter, This represents the number of hidden layer nodes.

[0102] The network output is an estimate of unknown dynamics. ,in This represents the adaptive weight vector of the network.

[0103] Substituting the output of the RBF neural network into the sliding mode control law, the final composite control strategy is obtained:

[0104]

[0105] in: Responsible for counteracting the main nonlinear interference, For the estimation of the known part of the system, This is a robust gain used to handle residual terms that RBF neural networks cannot fully approximate. It is the nominal model of the wind turbine system. This is an estimate of the control gain function;

[0106] Design an adaptive online weight vector update to ensure the stability of the closed-loop system:

[0107]

[0108] in: For the adaptive update rate of the weights, For learning rate, Forgetting factor, The value of the sliding surface function. It is the Gaussian function output vector of the hidden layer of the RBF neural network.

[0109] In this application, a spatiotemporal sequence prediction model for environmental parameters based on a bidirectional long short-term memory network (VMD-Attention-BiLSTM) integrating variational mode decomposition and attention mechanisms is proposed, effectively overcoming the large lag of the system. A digital twin decision engine based on nonlinear model predictive control is constructed, and the optimal control sequence for energy consumption and environmental quality is solved under multiple constraints by establishing a joint state equation for thermodynamics and gas diffusion. In particular, for complex winter conditions, a ventilation-heating collaborative game strategy based on real-time heat loss compensation is designed. Adaptive sliding mode control with radial basis function neural network compensation is introduced into the underlying execution unit, significantly enhancing the system's anti-disturbance capability. Precise environmental control under complex conditions is achieved, significantly improving poultry welfare and energy utilization efficiency. Attached Figure Description

[0110] Figure 1 A flowchart illustrating a digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion, provided for an embodiment of this application;

[0111] Figure 2 A schematic diagram of a closed-loop ecosystem for real-time interaction between physical entities and virtual models, provided in an embodiment of this application;

[0112] Figure 3 A schematic diagram of the multi-source environment perception and edge control subsystem provided in the embodiments of this application;

[0113] Figure 4This is a schematic diagram of the VMD-Attention-BiLSTM prediction model structure provided in the embodiments of this application;

[0114] Figure 5 A schematic diagram of a multi-objective game strategy based on nonlinear model predictive control provided in an embodiment of this application;

[0115] Figure 6 A schematic diagram of the adaptive control flow based on RBF-SMC provided for embodiments of this application;

[0116] Figure 7 A schematic diagram illustrating the prediction and tracking performance of different models provided in the embodiments of this application for ammonia concentration sudden change conditions;

[0117] Figure 8 The system response curves for a typical daytime ammonia concentration change during winter provided in the embodiments of this application. Detailed Implementation

[0118] The present solution will now be described in conjunction with the accompanying drawings and specific embodiments.

[0119] See Figure 1 The digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion provided in this embodiment includes:

[0120] S101 collects and preprocesses information on temperature, humidity, gas concentration, and light intensity in the breeding shed.

[0121] This embodiment aims to achieve digital twin control of the poultry farming environment. It employs a classic "device-edge-cloud" three-layer architecture and deeply integrates the digital twin concept to construct a closed-loop ecosystem where physical entities and virtual models interact in real time. Figure 2 As shown.

[0122] like Figure 2 The closed-loop ecosystem comprises a physical twin, a digital thread, and a virtual twin, primarily consisting of a multi-source environmental sensing and edge control subsystem 1. As a physical mapping entity of the digital twin, its core comprises a microcontroller 2, a sensor group 3, and an execution device group 6. This layer is responsible for real-time sensing of the multi-dimensional state of the aquaculture environment and precise execution of control commands from the digital space.

[0123] The multi-source environmental perception and edge control subsystem 1 is the foundation of the physical twin, and its hardware design strictly adheres to... Figure 3 The microcontroller and peripheral connection principle is shown. For example... Figure 3 As shown, the multi-source environmental perception and edge control subsystem 1 includes a microcontroller, a sensor group, and a multi-channel actuator drive matrix.

[0124] The microcontroller is the core of the lower-level subsystem, and as an edge computing unit, it performs the following functions:

[0125] 1. Data Acquisition and Preprocessing: Real-time acquisition of sensor data, followed by primary fusion and noise reduction processing such as Kalman filtering.

[0126] 2. Communication Management: It interfaces with the 5G communication module via the UART interface, and is responsible for data packaging and uploading, as well as command reception and parsing.

[0127] 3. Underlying control logic: Based on cloud instructions and combined with the local RBF-SMC algorithm, PWM, Relay and other signals are generated to directly drive the execution device, ensuring fast response and anti-interference.

[0128] The sensor array acts as the "eyes" of the physical twin, responsible for comprehensive and multi-dimensional perception of the aquaculture environment:

[0129] 1. Temperature and humidity sensor: A digital sensor (such as SHT35) is used, which connects to the microcontroller via the I2C bus. The I2C interface supports multiple slave devices, enabling high-precision, low-power digital signal transmission and avoiding the attenuation and noise interference of analog signals during long-distance transmission.

[0130] 2. Gas Sensors: These include electrochemical ammonia (NH3) sensors and infrared carbon dioxide (CO2) sensors. These sensors typically output analog voltage signals and are therefore connected via the microcontroller's ADC (analog-to-digital converter) interface. The microcontroller utilizes its high-precision ADC unit to differentially sample and convert the sensor's weak analog signal at high resolution, and incorporates a built-in calibration algorithm.

[0131] 3. Light sensor: Used to monitor the light intensity inside the enclosure. Based on... Figure 2 The sensor connects to the microcontroller via a GPIO (General Purpose Input / Output) interface. Real-time illuminance data is obtained by reading the I / O port level or calculating the pulse frequency.

[0132] The multi-actuator drive matrix constitutes the full-dimensional sensing network of the physical twin, directly responding to control commands and adjusting environmental parameters, mainly including:

[0133] 1. Ventilation equipment: including negative pressure fans and evaporative cooling pad pumps. The fans use variable frequency speed control, with a microcontroller outputting a PWM signal, which is then used by an external drive circuit (such as a frequency converter) to adjust the fan speed, achieving stepless adjustment of the ventilation volume.

[0134] 2. Heating equipment: mainly electric heaters or gas-fired fan heaters. The microcontroller controls its on / off state through a relay interface, combined with software-level time proportional control (TPC) to achieve fine-tuning of heating power.

[0135] 3. Supplemental lighting equipment: Dimmable LED light groups are used. The microcontroller outputs a PWM signal, which adjusts the LED drive current by changing the duty cycle, thereby achieving stepless brightness adjustment and simulating the natural solar radiation rhythm.

[0136] The digital thread consists of 5G communication module 4. As the "digital nerve" connecting the physical twin and the virtual twin, this layer utilizes the high bandwidth (eMBB) and ultra-reliable low latency (URLLC) characteristics of the 5G network to ensure the real-time uploading of massive amounts of sensing data and the millisecond-level issuance of high-priority control commands, thereby achieving data synchronization and command penetration between the virtual and physical worlds.

[0137] The 5G communication module is the core of the digital thread. It connects to the microcontroller via a serial communication interface (UART). This module integrates a TCP / IP protocol stack and encapsulates the following protocols:

[0138] 1. MQTT protocol: used for the publish / subscribe mode transmission of periodic environmental monitoring data (such as temperature, humidity, gas concentration, light intensity), ensuring lightweight data and high-concurrency uploading.

[0139] 2. CoAP Protocol: For sudden alarm information and real-time control commands, it adopts a request / response mode for transmission. Utilizing its UDP-based characteristics, it achieves low latency and high reliability, and is especially suitable for millisecond-level control commands issued by NMPC.

[0140] The virtual twin is primarily composed of a cloud-based decision management platform. This is the system's "brain," carrying a virtual mirror image of the physical entity. The platform deploys a high-precision spatiotemporal data prediction model (VMD-Attention-BiLSTM), a nonlinear model predictive control (NMPC) decision engine, and a low-level control law parameter library. Through in-depth mining and simulation of the entire dataset, a globally optimal control strategy is generated, enabling intelligent reverse control of the physical twin.

[0141] The cloud-based decision management platform is the intelligent decision-making center of the entire digital twin system, i.e., the virtual twin. It includes:

[0142] 1. Data Receiving Service Module: Responsible for receiving real-time data uploaded by the 5G module and storing it in the database module.

[0143] 2. Digital Twin Model Layer: Deploy physical mechanism models of poultry houses, physiological growth models of poultry, and spatiotemporal data prediction models (VMD-Attention-BiLSTM).

[0144] 3. Hierarchical Linkage Control Module: This is the core decision engine, internally running the NMPC algorithm and RBF-SMC parameter adaptive logic. Based on the real-time and predicted states of the physical twin, it calculates and generates optimal control commands. In particular, it features a pre-set "winter compensation mode".

[0145] In this embodiment, the sensor array collects five-dimensional environmental data: the physical layer sensor array collects real-time information on temperature, humidity, gas concentration, and light intensity within the breeding shed. The microcontroller performs preliminary Kalman filtering and data fusion. The microcontroller uploads the processed data to the cloud platform via 5G: the microcontroller encapsulates the data into JSON format via the 5G communication module and uploads it to the cloud-based decision management platform in real-time using the MQTT protocol.

[0146] S102, the preprocessed data is input into the constructed VMD-Attention-BiLSTM prediction model to predict environmental parameter information for future time moments.

[0147] The aquaculture environment data exhibits significant nonlinearity, nonstationarity, and long-term dependence. To overcome the system's large time delay characteristics (i.e., environmental parameter changes lag after control actions are issued), this embodiment constructs a spatiotemporal sequence prediction model of environmental parameters based on VMD-Attention-BiLSTM in the cloud. This model, as part of a digital twin, is responsible for predicting the environmental state at future moments, providing feedforward input for NMPC control.

[0148] See Figure 4 The VMD-Attention-BiLSTM prediction model includes: an input layer, a data denoising layer, a temporal feature extraction layer, and a feature weighting layer. The input layer is used to receive a temporal environment sequence composed of preprocessed data.

[0149] The received time-series environmental data is input into the data processing layer, simultaneously capturing both past information features and future trend features of the time series. The original time-series data of the aquaculture environment collected by sensors... It often contains high-frequency noise generated by electromagnetic interference from equipment and uncertain fluctuations caused by random environmental disturbances. Directly transmitting the original signal... Inputting data into a neural network can cause the model to struggle to capture key trends. Therefore, this embodiment first employs the Variational Mode Decomposition (VMD) algorithm to... Perform time-frequency signal processing.

[0150] It captures past information features and future trend features of time series, including:

[0151] Assuming the time-environment sequence is Variational Mode Decomposition (VMD) is used to transform the... Decomposed into One intrinsic mode component Each intrinsic mode component revolves around its respective center frequency. oscillation:

[0152]

[0153] The intrinsic modal components Composed of a set representing past information features and future trend features The Includes from The separated high-frequency noise term and low-frequency trend term:

[0154]

[0155] To solve the optimization problem containing equality constraints, a quadratic penalty factor is introduced. and Lagrange multipliers This transforms the constrained variational problem into an unconstrained variational problem. The constructed augmented Lagrangian function... :

[0156]

[0157] The frequency domain is continuously updated using the Alternating Directional Multiplier Method (ADMM). , and This continues until the convergence condition is met. Finally, the original signal... It is decomposed into a series of modal components. After removing modes containing high-frequency random noise, the remaining modes are selected. One effective modal component ( ), and put it at time The numerical values ​​are reconstructed into a high-dimensional feature vector. :

[0158]

[0159] For length of The time window, the final feature vector sequence output by the VMD module is denoted as :

[0160]

[0161] The sequence The data includes denoised multi-scale time-frequency features, which will be directly used as input data for the subsequent BiLSTM network.

[0162] In the above, Describes a minimization optimization operator for a multivariable set. For decomposition One modal component, for The center frequency corresponding to each modal component To represent taking the partial derivative with respect to time, For the Dirac function, Denotes the square of the L2 norm. This represents the equality constraints that must be satisfied. This indicates the inner product operation.

[0163] The temporal feature extraction layer captures past information features and future trend features, and concatenates them to obtain a future environmental state prediction vector.

[0164] Feature sequences after VMD decomposition and reconstruction Although the signal-to-noise ratio is significantly improved, the long-term dependencies and nonlinear dynamic features between data points still need to be extracted in depth. Traditional recurrent neural networks (RNNs) are prone to gradient vanishing or gradient exploding when processing long sequences, and can only utilize unidirectional historical information. Therefore, a bidirectional long short-term memory network is adopted.

[0165] In this model, the input to the BiLSTM layer is precisely the sequence of feature vectors output by the VMD layer in the previous section. .in: Representing the The denoised environmental modal feature vectors at each time step. The BiLSTM network consists of forward LSTM layers and backward LSTM layers, which respectively capture the positive inertia and negative dependence of environmental parameters (such as temperature and ammonia) over time. For each time step Feeding input to the forward LSTM layer And combine the previous forward hidden state Calculate the forward hidden state at the current time. Similarly, input is read from the LSTM layer. And combine the backward hidden state of the next time step Calculate the backward hidden state at the current time. The mathematical update process is described as follows:

[0166]

[0167]

[0168] To integrate past and future contextual information, BiLSTM will use the same time frame... The forward hidden state and the backward hidden state are concatenated to obtain the final integrated hidden state vector at that moment. :

[0169]

[0170] In the formula This represents a vector concatenation operation. It involves processing the input sequence at each time step... After performing the above calculations, the BiLSTM layer finally outputs a hidden state matrix containing complete temporal features. :

[0171]

[0172] in: For the forward operator of LSTM, For the inverse operator of LSTM, This represents a vector concatenation operation. The matrix... and its constituent state vectors It deeply aggregates the bidirectional dependency features of aquaculture environment parameters in the time dimension, which will be transmitted as input to the attention mechanism module of the next layer.

[0173] In time series forecasting of aquaculture environments, the contribution of the state at different historical moments to the predicted values ​​at future moments varies. To accurately capture the impact of key time points (such as abrupt changes in environmental parameters), this model introduces an attention mechanism. The input to the attention mechanism layer is the hidden state matrix output by the BiLSTM from the previous section. .

[0174] First, a fully connected layer (i.e., a multilayer perceptron) is used to calculate the time step. ( Hidden state matrix Energy score of the specific hidden state vector at time step t) :

[0175]

[0176] Then, the attention weights are normalized to a probability distribution using the Softmax function. :

[0177]

[0178] in: , and For learnable network parameters, This represents an exponential function.

[0179] Then, using the calculated weights Hidden states of BiLSTM The final context vector is obtained by performing a weighted summation on the same mathematical object. :

[0180]

[0181] Context vector It highly condenses the key spatiotemporal features of the input sequence. Finally, the vector... The input is linearly mapped to a fully connected layer, and the output is the future... Predicted environmental state values ​​at time 1 :

[0182]

[0183] Represents the hyperbolic tangent function. For fully connected layer functions, This is the output layer weight matrix. This is the output layer bias vector.

[0184] The predicted value It incorporates the future trends of temperature, humidity, ammonia concentration, and outdoor natural light intensity, and can accurately predict environmental trends 5-10 minutes in advance, providing advanced state references for the subsequent NMPC controller, thereby completely solving the lag problem of traditional feedback control systems.

[0185] S103, calculate the compensation ventilation volume and heat loss based on the environmental parameter information of the future time of the VMD-Attention-BiLSTM prediction model.

[0186] The VMD-BiLSTM-Attention model was used to obtain high-precision trends in future environmental parameter changes. To translate this advanced sensing information into specific control commands, see [link to relevant documentation]. Figure 5 This embodiment constructs a multi-objective game strategy based on nonlinear model predictive control (NMPC). The multi-objective game strategy based on nonlinear model predictive control (NMPC) is the core of the cloud-based decision management platform.

[0187] To perform rolling optimization within the NMPC framework, a mathematical model describing the dynamic characteristics of the livestock shed must be established, i.e., the physical mechanism core of the digital twin. Based on the law of conservation of energy and the law of mass balance, a lumped-parameter nonlinear state equation is established.

[0188] Thermodynamic equation:

[0189]

[0190] Gas diffusion equation:

[0191]

[0192] The light environment equation is:

[0193]

[0194] in: air density, The specific heat capacity of air, For the volume of the breeding shed, For heating power, Poultry biological heat production rate For the ventilation volume of the fan, Indoor temperature, Outdoor temperature The heat transfer coefficient of the building envelope. Surface area of ​​the enclosure structure of the livestock shed. This refers to the indoor ammonia concentration. For poultry biogas production rate, Other gas diffusion terms, Indoor light intensity, For building light transmittance, For the predicted sequence Outdoor natural light intensity provides feedforward information. This refers to the brightness conversion factor of the supplementary light. This refers to the control value corresponding to the brightness of the supplementary light.

[0195] Within the NMPC framework, the goal of the controller is to predict in the time domain. Within, find the optimal control sequence. ( Represents the optimal control sequence, referring to the sequence in the prediction time domain. Within, it is possible to make the cost function The specific set of control inputs that reaches the minimum value and satisfies all constraints, U: representing the entire sequence, including the inputs from the current time step. To the future All control vectors at any given time (i.e., all instructions and plans on how to turn on the fan, heater, and supplemental lighting in the future) enable the system to minimize energy consumption and maintain environmental stability while meeting physiological constraints.

[0196] Construct the following multi-objective cost function :

[0197]

[0198] in: Set the temperature for the target. The ammonia concentration penalty term is designed as a logarithmic barrier function: When the ammonia concentration approaches the upper limit At that time, the penalty value increases sharply, forcing the system to prioritize ventilation; As a penalty weight for temperature deviation, Weighting of penalties for excessive ammonia levels. Weighting for illumination deviation penalty As a weight for suppressing the energy consumption of wind turbines, As the energy consumption suppression weight of the heater, To suppress the energy consumption of the supplementary lighting, For the target illumination rhythm curve. This is the ventilation control amount for the fan. For heating control quantity, It is the square of the Euclidean norm.

[0199] Constraints:

[0200]

[0201] in: The minimum indoor temperature for poultry comfort. The highest indoor temperature for poultry comfort. This is the maximum ventilation control volume for the fan. This is the maximum heating control amount. To address the conflict between ventilation and insulation in winter, and to control the maximum supplemental lighting output, when the cloud-based decision management platform's predictive model determines that "ammonia levels are too high" and "temperature is too low," the NMPC controller will initiate forced compensation logic. The specific mathematical game process is as follows: Let the current time be... The prediction is that ammonia levels will exceed the standard in the future. The expected trajectory of ammonia concentration decline is set. It typically employs a first-order exponential decay form to ensure the smoothness of the adjustment process:

[0202]

[0203] in: The target ammonia concentration to be achieved at the next moment. This represents the ammonia concentration value measured by the sensor at the current moment. This represents the safe threshold for ammonia concentration, which is the ultimate steady-state target of the control system. The exponential decay rate coefficient has a range of values. This value determines the urgency of ammonia discharge; the larger the value, the faster the ammonia needs to decrease.

[0204] Discretization is performed using the forward Eulerian method, and the concentration at the next time step is set to equal the concentration of the target trajectory. The minimum control quantity required to achieve the target, i.e., the minimum necessary ventilation volume, is then solved. :

[0205]

[0206] in: To achieve the ammonia removal target, the minimum ventilation volume that the fan must provide at the current moment is: The ammonia production rate of poultry at the current moment. For the sampling and execution cycle of the control system,

[0207] This represents the expected change in ammonia concentration within a control period.

[0208] according to Calculate the instantaneous sensible heat loss power caused by the introduction of cold outdoor air through forced ventilation:

[0209]

[0210] in: This refers to the power loss due to the implementation of minimum ventilation. This is the actual measured temperature inside the building at the current moment. This represents the current outdoor temperature.

[0211] In order to offset the heat loss from ventilation and maintain a stable temperature, i.e. The required heating compensation power is determined by solving the thermodynamic energy balance equation. To offset heat loss from ventilation and maintain temperature stability:

[0212]

[0213] in: The heater compensation power required to maintain thermal balance : Non-negativity constraint function, ensuring that the calculated heating power is not negative; To dissipate the foundation's heat load through the walls; The current biothermal production rate of poultry;

[0214] Through the above calculations, NMPC, in solving for the optimal control sequence, is actually looking for a Nash equilibrium point: one that satisfies the minimum ventilation volume. To ensure air quality, through precise calculations Heat compensation is performed to avoid system oscillations caused by sudden temperature drops, which is common in traditional PID control. The final generated optimal cooperative command vector... (Including the PWM duty cycle of the fan, the control quantity of the heating equipment, and the brightness command of the supplementary light), which are sent to the microcontroller through the 5G digital thread to achieve precise control.

[0215] S104 generates coordinated commands based on the calculated compensated ventilation volume and heat loss, and drives the equipment to form a dynamic, adaptive closed-loop control, thereby accurately coordinating and regulating the aquaculture environment.

[0216] The cloud-based NMPC decision engine calculated the optimal coordinated control sequence for the fan, heater, and supplemental lighting equipment. ( Optimal fan ventilation volume Optimal heating power (Optimal supplementary lighting brightness). The microcontroller, as part of the physical twin, needs to drive the execution device (6) to accurately track this value. For heating commands... (Power percentage), using time proportional control, with a set cycle. (e.g., 2s), calculate the conduction time. The microcontroller controls the relay in... The system closes within a short timeframe, enabling linear power adjustment and precise compensation for heat loss. This is specifically designed for supplemental lighting commands. This is mapped to a PWM duty cycle, which drives the LED power supply to achieve stepless dimming and accurately track the light rhythm.

[0217] Due to the unmodeled dynamics of actuators such as ventilation equipment, including nonlinear friction, external wind pressure disturbances, and internal parameter perturbations, traditional PID control struggles to achieve high-precision tracking. Therefore, a sliding mode control (SMC) algorithm based on RBF neural network compensation was designed within the microcontroller to ensure robust and accurate execution of cloud-based commands. The architecture diagram of RBF-SMC is shown below. Figure 6 .

[0218] For the speed control of ventilation equipment, the tracking error is ,in It is based on the actual fan speed fed back by sensors. The sliding surface is designed. ,in Here are the parameters for the sliding surface. The dynamic model of the ventilation equipment can be simplified as follows:

[0219]

[0220] in: Represents the unknown nonlinear dynamics of the system. Indicates control gain. To control the input, Indicates external disturbance. The rate of change of acceleration, representing the actual fan speed fed back by the sensor, is the total output response of the system. This represents the rate of change of the actual fan speed. Design a sliding mode control law:

[0221]

[0222] in: and For unknown items and The estimate, for, It's a switch item. A drawback of conventional SMCs is that when... When inaccurate, switch item It can introduce high-frequency chattering, which can shorten the lifespan of the equipment.

[0223] To address the jitter problem in SMC and improve its adaptability to unknown dynamics and disturbances, an RBF neural network is introduced to approximate the unknown nonlinear term online. :

[0224]

[0225] In this embodiment, the RBF neural network adopts a three-layer structure: an input layer, a hidden layer, and an output layer. Input vector The hidden layer uses the Gaussian function:

[0226]

[0227] in: For the first The center vector of each node For the base width parameter, This represents the number of hidden layer nodes.

[0228] The network output is an estimate of unknown dynamics. ,in This is the adaptive weight vector of the network.

[0229] Substituting the output of the RBF neural network into the sliding mode control law, the final composite control strategy is obtained:

[0230]

[0231] in: Responsible for counteracting the main nonlinear interference, For the estimation of the known part of the system, This is a robust gain used to handle residual terms that the RBF neural network cannot fully approximate. Since the RBF network has already accurately compensated for most nonlinear disturbances, the switching gain here... Only a very small value is needed to process the approximation residual of the neural network, thereby ensuring the robust stability of the closed-loop system while completely eliminating the high-frequency jitter caused by traditional sliding mode control from a physical mechanism perspective, effectively protecting the motor and mechanical structure. It is the nominal model of the wind turbine system, a mathematical model based on the physical characteristics of the wind turbine system (such as air resistance coefficient, moment of inertia, etc.) with fixed parameters, used to provide basic model feedforward control. This is an estimate of the control gain function.

[0232] To ensure the stability of the closed-loop system, an online weight update law is designed based on Lyapunov stability theory. .

[0233] in: The adaptive update rate for the neural network weights (at the current moment, how quickly and in which direction the neural network parameters (weights) should be adjusted). The learning rate determines how quickly the network adapts to disturbances; This is a forgetting factor used to prevent weight drift and enhance the system's generalization ability. It is the value of the sliding surface function; It is the Gaussian function output vector of the hidden layer of the RBF neural network.

[0234] The RBF-SMC algorithm is embedded in the STM32 microcontroller and runs at a high frequency (e.g., 10ms per control cycle). It directly controls the ventilation equipment through the PWM interface, ensuring that the physical twin responds to the virtual twin's commands with millisecond-level precision and effectively resists random disturbances in the field.

[0235] To fully verify the effectiveness and advancement of the digital twin control system based on the deep fusion of 5G IoT and spatiotemporal data proposed in this embodiment, a 45-day pilot-scale experiment was conducted at the intelligent livestock and poultry breeding demonstration base of Shandong Zhongke Food Co., Ltd. The experiment aimed to quantitatively evaluate the system from four dimensions: environmental parameter prediction accuracy, multi-objective collaborative control effect, underlying execution tracking performance, and system communication real-time performance.

[0236] The experimental subject was a standard enclosed broiler house, measuring 85m × 12m × 3.5m, with a stocking density of 22,000 birds (white-feathered broilers, 28-42 days old). The house was equipped with the edge sensing and control subsystem developed in this embodiment: four monitoring nodes were evenly arranged along the longitudinal direction of the house. Each node included an SHT35 temperature and humidity sensor, an electrochemical NH3 sensor, and a light sensor, with a sampling frequency set to 1Hz. Four variable frequency negative pressure fans (rated power 1.1kW), two gas-fired heaters (rated heat load 50kW / unit), and four rows of dimmable LED light strips were also provided. The lower-level machine used an STM32H750VBT6, communicating with the cloud server via a Quectel RM500Q-GL5G module.

[0237] Evaluation metrics for prediction models: Root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (CDO). The prediction performance of the VMD-Attention-BiLSTM model can be measured using the following method:

[0238] Evaluation index for regulation effect: using temperature standard deviation ( ), Percentage of time ammonia concentration exceeded the standard ( ), Adjustment time ( ) and average daily energy consumption ( To evaluate the merits of NMPC strategies.

[0239] Accurate prediction of environmental parameters is fundamental to feedforward control. This section selects the ammonia concentration (NH3), which exhibits the strongest nonlinearity and greatest fluctuation during the aquaculture process, as the prediction target, with the prediction step size set to the next 10 minutes. (to verify the algorithm's performance).

[0240] To verify the necessity and contribution of each module (VMD decomposition, Attention mechanism, BiLSTM network) in the hybrid model proposed in this embodiment, ablation experiments as shown in Table 1 were designed.

[0241] Table 1. Comparison of ablation experiment results using the prediction model (NH3 concentration)

[0242]

[0243] VMD's contribution to noise reduction: Compared with Model B, after introducing VMD decomposition, RMSE decreased from 1.567 to 0.985, a reduction of 37.1%. This indicates that the original sensor data contains a large amount of electromagnetic noise and airflow disturbance noise caused by device start-up and shutdown. VMD effectively removes high-frequency noise modes, preserves the true physical trend of environmental parameter changes, and significantly improves the signal-to-noise ratio.

[0244] Temporal Focus of the Attention Mechanism: Compared to Model B, Model D shows improved model accuracy after introducing the attention mechanism. In-depth analysis reveals that during moments of ammonia fluctuation caused by manure removal or feeding, the attention mechanism assigns higher weights to nearby time steps, making the model more sensitive to these sudden changes.

[0245] Advantages of the combined model: The ModelE (VMD-Att-BiLSTM) proposed in this embodiment integrates three major advantages: data denoising, bidirectional temporal feature extraction, and key information weighting. Its coefficient of determination...

[0246] A value of 0.978 indicates that the predicted curve fits the true value very well, providing a highly reliable input for the future state of the NMPC controller.

[0247] This embodiment further compares the model with current mainstream time series prediction algorithms (ARIMA, SVR, GRU). The prediction and tracking performance of different models for ammonia concentration abrupt changes is as follows: Figure 7 As shown, detailed quantitative indicators are shown in Table 2.

[0248] Table 2 Performance Comparison of Different Prediction Algorithms

[0249]

[0250] Depend on Figure 4 As shown in Table 2: ARIMA (green dashed line): Due to its moving average characteristic based on historical data, it exhibits significant phase lag when facing the rapid increase in ammonia concentration around the 25th minute, failing to respond promptly to sudden changes. SVR (blue dotted line): Due to its sensitivity to noise, SVR exhibits significant jitter during tracking and has weak generalization ability, easily leading to overfitting or underfitting. GRU (purple dashed line): As a deep learning model, GRU outperforms traditional statistical methods, effectively capturing changing trends. However, compared to the model in this embodiment, it is still insufficient in removing high-frequency noise and capturing instantaneous change features, exhibiting a slight delay. The method in this application (red solid line): Benefiting from the VMD algorithm's extraction of nonlinear trend terms and the Attention mechanism's focus on key time steps, the model in this embodiment can closely fit the true value curve. Even... Figure 4 As shown in the magnified view, during the rapid rise-edge phase, the prediction error remains at an extremely low level (RMSE = 0.428 ppm), verifying its robustness under complex operating conditions. Although the computation time of the model in this embodiment is slightly longer than that of single-unit models such as GRU, the 65ms inference delay fully meets the real-time requirements for minute-level environmental control systems.

[0251] This embodiment focuses on verifying the system's ability to resolve the contradiction between "ventilation" and "thermal insulation and energy saving" under cold winter conditions.

[0252] Experimental scenario setup: A typical winter day was selected, with outside temperatures fluctuating between -5°C and 2°C. The target indoor temperature was set. Upper limit of ammonia concentration .

[0253] Comparison Strategy: Strategy 1 (Logic Threshold Control): Traditional PLC logic. Rules: Turn the fan up to 80%; Turn on the heater when needed. Strategy 2 (Decoupled PID Control): Independent temperature PID loop and ventilation PID loop, which do not interfere with each other. Strategy 3 (NMPC Cooperative Control in this application): Based on the multi-objective game algorithm described above.

[0254] To visually demonstrate the dynamic characteristics of the control process, Figure 8 The system response curves for a typical daytime ammonia concentration abrupt change during winter (simulation duration 60 minutes) were extracted. The figures primarily compare the existing logic threshold control (Strategy 1) with the NMPC collaborative control (Strategy 3) of this embodiment. (Note: Although statistical data for Strategy 2 is listed in Table 3, it is not included in the table to avoid overly cluttered charts.) Figure 8 The overlapping display has dynamic characteristics that fall between the two.

[0255] Table 3 Comparison of environmental regulation effects under three control strategies

[0256]

[0257] like Figure 8 As shown in (a), around the 10th minute of the simulation (corresponding to the start of the simulated manure cleaning operation), the ammonia source in the shed began to increase, and the concentration showed an upward trend.

[0258] Logic control (shown by dashed lines): Performed the worst. When the ammonia concentration exceeded the 20ppm threshold around the 20-minute mark, the fan was forced to immediately switch to 80% (…). Figure 8 (c dashed line), causing a large amount of cold air to rush in instantly. Figure 8 (b) It is evident that the room temperature dropped sharply below the cold stress threshold (22.5℃) within a short period of time, after which the heater was turned on at full power. Figure 8 (c. Orange dashed line). The system oscillates repeatedly between "supercooling-heating-superheating," which not only harms the health of the poultry flock but also wastes energy.

[0259] This application's NMPC (shown by the solid line) performs optimally. The predictive model detects the rising trend of ammonia in advance, and the controller initiates action before the ammonia level exceeds the limit. Figure 8(c) As shown by the solid line, NMPC calculated the Nash equilibrium solution: while smoothly increasing the fan speed (gradually changing from 0% to approximately 40%), the heater power was simultaneously increased in a feedforward manner. This model-based "feedforward compensation" mechanism ensures that the heat generated by the heater precisely offsets the heat loss caused by the additional ventilation. Figure 8 (b) The temperature curve remained almost constant (fluctuation <0.4℃), while the ammonia concentration was always suppressed below the safety line (20ppm), achieving truly imperceptible control.

[0260] NMPC uses rolling optimization to find the minimum control value, avoiding the over-adjustment phenomenon of "high air volume and high heating" in Strategy 1, and realizing on-demand heating. As shown in Table 3, compared with logic control, the daily energy consumption of this embodiment is reduced by 22.7%, with significant economic benefits.

[0261] To verify the ability of the RBF-SMC algorithm in the lower-level STM32 to execute instructions from the cloud, a wind turbine speed tracking experiment was conducted. Simulated natural wind pressure interference was introduced into the experiment (i.e., applying reverse-variable wind pressure at the air outlet).

[0262] Table 4. Fan Speed ​​Tracking Performance Indicators

[0263]

[0264] As shown in Table 4, traditional PID controllers experience a recovery time of up to 4.2 seconds when faced with sudden changes in external wind pressure, and exhibit significant steady-state errors, leading to a large deviation between the actual ventilation volume and the cloud-based decision value. While conventional SMC controllers offer fast response, they suffer from high-frequency chattering in steady state, which can damage motor bearings over long-term operation. The RBF neural network introduced in this application successfully approximates the unmodeled dynamics of the system. The RBF-SMC compensates for external wind pressure disturbances in real time, effectively mitigating the sliding mode control law. Experiments show that the RBF-SMC not only eliminates jitter but also controls the steady-state error within a certain range. With rpm (<1%), the physical entity is able to accurately execute the decision-making instructions of the digital twin.

[0265] Through systematic ablation experiments and comparative analysis, the following conclusions were drawn: The VMD-Attention-BiLSTM model, with its denoising and temporal focusing capabilities, improved the ammonia prediction accuracy to RMSE 0.428ppm, outperforming single deep learning models. The NMPC game theory strategy successfully decoupled the contradictions between multiple temperature and humidity parameters under winter operating conditions, achieving 22.7% energy savings compared to traditional methods while ensuring optimal environmental conditions. The RBF-SMC underlying algorithm and 5G communication ensured the accurate and rapid execution of control commands, verifying the overall superiority of the proposed digital twin system.

[0266] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0267] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion, characterized in that, include: Collect and preprocess information on temperature, humidity, gas concentration, and light intensity in the breeding shed; The preprocessed data is input into the constructed VMD-Attention-BiLSTM prediction model to predict environmental parameter information for future time moments. The compensation ventilation volume and heat loss are calculated based on the environmental parameter information of the VMD-Attention-BiLSTM prediction model at future time points, including: A mathematical model is established to describe the thermodynamics and gas diffusion processes in the livestock house, wherein: The thermodynamic equation is: The gas diffusion equation is: The light environment equation is: in: air density, The specific heat capacity of air, For the volume of the breeding shed, For heating power, Poultry biological heat production rate For the ventilation volume of the fan, Indoor temperature, Outdoor temperature The heat transfer coefficient of the building envelope. Surface area of ​​the enclosure structure of the livestock shed. This refers to the indoor ammonia concentration. For poultry biogas production rate, Other gas diffusion terms, Indoor light intensity, For building light transmittance, For the predicted sequence Outdoor natural light intensity provides feedforward information. This refers to the brightness conversion factor of the supplementary light. This refers to the control value corresponding to the brightness of the supplementary light; To minimize energy consumption and maintain environmental stability while satisfying the physiological constraints of poultry, a cost function is constructed. : in: Set the temperature for the target. The ammonia concentration penalty term is designed as a logarithmic barrier function: When the ammonia concentration approaches the upper limit At that time, the penalty value increases sharply, forcing the system to prioritize ventilation; As a penalty weight for temperature deviation, Weighting of penalties for excessive ammonia levels. Weighting for illumination deviation penalty As a weight for suppressing the energy consumption of wind turbines, As the energy consumption suppression weight of the heater, To suppress the energy consumption of the supplementary lighting, For the target illumination rhythm curve. This is the ventilation control amount for the fan. For heating control quantity, The square of the Euclidean norm; Constraints: in: The minimum indoor temperature for poultry comfort. The highest indoor temperature for poultry comfort. This is the maximum ventilation control value for the fan. This is the maximum heating control quantity. This is the maximum fill light control value; If the current status indicates that ammonia levels are too high and the temperature is too low, forced compensation will be initiated. Based on the calculated compensation ventilation volume and heat loss, coordinated commands are generated and the equipment is driven to form a dynamic and adaptive closed-loop control, which enables precise coordinated regulation of the aquaculture environment.

2. The digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion according to claim 1, characterized in that, The process of collecting and preprocessing information on temperature, humidity, gas concentration, and light intensity within the breeding shed includes: A sensor array is used to collect real-time information on temperature, humidity, gas concentration, and light intensity inside the breeding shed; The collected information is then subjected to preliminary Kalman filtering and data fusion. The fused data is encapsulated in a formatted manner and then uploaded to the cloud-based decision management platform in real time using the MQTT protocol. The VMD-Attention-BiLSTM prediction model is set within the cloud-based decision management platform.

3. The method for digital twin control of facility poultry farming environment based on deep spatiotemporal data fusion according to claim 1, characterized in that, The VMD-Attention-BiLSTM prediction model includes: an input layer, a data denoising layer, a temporal feature extraction layer, and a feature weighting layer; The input layer is used to receive a time-environment sequence composed of preprocessed data; The received time environment sequence is input into the data denoising layer, which simultaneously captures the past information features and future trend features of the time series. The temporal feature extraction layer captures the past information features and future trend features, and concatenates them to obtain a future environmental state prediction vector. The feature weighting layer introduces an attention mechanism to dynamically assign weights to the vector features in the future environmental state prediction vector, and then performs weighted fusion of the future environmental state prediction vector to obtain the environmental state prediction value.

4. The digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion according to claim 3, characterized in that, The received time-environment sequence is input into the data processing layer, which simultaneously captures past information features and future trend features of the time series, including: Assuming the original environmental sequence is Variational Mode Decomposition (VMD) is used to transform the... Decomposed into One intrinsic mode component Each intrinsic mode component revolves around its respective center frequency. oscillation: The intrinsic modal components Composed of a set representing past information features and future trend features The Includes from The separated high-frequency noise term and low-frequency trend term: Introducing a secondary penalty factor and Lagrange multipliers Transforming the constrained variation into an unconstrained variation, we construct the augmented Lagrangian function: The frequency domain is continuously iterated and updated using the alternating direction multiplier method. , and Continue until the convergence condition is met; After removing modes containing high-frequency random noise, select the remaining modes. Each effective modal component is given at time [time]. The numerical values ​​are reconstructed into a high-dimensional feature vector. : For length of Within the time window, the VMD module ultimately outputs a sequence of feature vectors. As subsequent input: in: Describes a minimization optimization operator for a multivariable set. For decomposition One modal component, for The center frequency corresponding to each modal component To represent taking the partial derivative with respect to time, For the Dirac function, Denotes the square of the L2 norm. This represents the equality constraints that must be satisfied. This indicates the inner product operation.

5. The digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion according to claim 4, characterized in that, The temporal feature extraction layer captures past information features and future trend features, and concatenates them to obtain a future environmental state prediction vector, including: The feature vector sequence The input is a BiLSTM network, which consists of two LSTM layers, forward and backward, to capture the forward inertia and backward dependence of environmental parameters as they evolve over time, respectively. For each time step Feeding input to the forward LSTM layer And combine the previous time step's forward hidden state Calculate the forward hidden state at the current time. : Reverse LSTM layer reads input And combine the backward hidden state of the next time step Calculate the backward hidden state at the current time. : At the same time The forward and backward hidden states are concatenated and fused with past and future contextual information to obtain the final integrated hidden state vector at that moment. : By analyzing each time step of the input sequence The above calculations ultimately output a hidden state matrix containing complete temporal features. : in: For the forward operator of LSTM, For the inverse operator of LSTM, This indicates a vector concatenation operation.

6. The digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion according to claim 5, characterized in that, The feature weighting layer introduces an attention mechanism to dynamically assign weights to the vector features in the future environment state prediction vector, and then performs weighted fusion of the future environment state prediction vector to obtain the environment state prediction value, including: First, each is computed through a fully connected layer. Energy score : Then, the attention weights are normalized to a probability distribution using the Softmax function. : Then, the calculated weights were used For BiLSTM Perform a weighted summation to obtain the final context vector. : Finally The input is linearly mapped to a fully connected layer, and the output is the future. Predicted environmental state values ​​at time 1 : in: , and For learnable network parameters, Represents an exponential function. Represents the hyperbolic tangent function. For fully connected layer functions, This is the output layer weight matrix. This is the output layer bias vector.

7. The digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion according to claim 1, characterized in that, If the current state is determined to be excessive ammonia and the temperature is too low, the forced compensation is initiated, including: Set the expected trajectory of ammonia concentration decrease : in: The target ammonia concentration to be achieved at the next moment. This represents the ammonia concentration value measured by the sensor at the current moment. This represents the safe threshold for ammonia concentration, which is the ultimate steady-state target of the control system. The exponential decay rate coefficient has a range of values. This value determines the urgency of ammonia discharge; the larger the value, the faster the ammonia needs to decrease. Discretization is performed using the forward Eulerian method, and the concentration at the next time step is set to equal the concentration of the target trajectory. The minimum control quantity required to achieve the target, i.e., the minimum necessary ventilation volume, is then solved. : in: To achieve the ammonia removal target, the minimum ventilation volume that the fan must provide at the current moment is: The ammonia production rate of poultry at the current moment. For the sampling and execution cycle of the control system, This represents the expected change in ammonia concentration within a control period. according to Calculate the instantaneous sensible heat loss power caused by the introduction of cold outdoor air through forced ventilation: in: This refers to the power loss due to the implementation of minimum ventilation. This is the actual measured temperature inside the building at the current moment. The outdoor temperature at the current moment; In order to offset the heat loss from ventilation and maintain a stable temperature, i.e. Solve according to the thermodynamic energy balance equation Determine the required heating compensation power To offset heat loss from ventilation and maintain temperature stability: in: The heater compensation power required to maintain thermal balance : Non-negativity constraint function, ensuring that the calculated heating power is not negative; To dissipate the foundation's heat load through the walls; The current biothermal production rate of poultry; The final generated cooperative instruction vector This enables precise regulation.

8. The digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion according to claim 7, characterized in that, The process of generating coordinated commands based on calculated compensated ventilation volume and heat loss, and driving equipment actions to form a dynamic, adaptive closed-loop control, enables precise coordinated regulation of the aquaculture environment, including: For the speed control of ventilation equipment, the aforementioned Converted to target fan speed The tracking error is ,in It is the actual fan speed fed back by sensors; Design sliding surface ,in For sliding surface parameters, The derivative of the tracking error; The dynamic model of the ventilation equipment is simplified as follows: in: Represents the unknown nonlinear dynamics of the system. Indicates control gain. To control the input, Indicates external disturbance. The rate of change of acceleration, representing the actual fan speed fed back by the sensor, is the total output response of the system. This represents the rate of change of the actual fan speed; Design a sliding mode control law: in: and For unknown items and The estimate, for, It is a switch item; Introducing RBF neural networks to approximate unknown nonlinear terms online : 。 9. The digital twin control method for facility poultry farming environment based on deep spatiotemporal data fusion according to claim 8, characterized in that, The introduction of the RBF neural network for online approximation of unknown nonlinear terms... ,include: The RBF neural network is designed with a three-layer structure: an input layer, a hidden layer, and an output layer. Input vector The hidden layer uses the Gaussian function: in: For the first The center vector of each node For the base width parameter, This represents the number of hidden layer nodes. The network output is an estimate of unknown dynamics. ,in This represents the adaptive weight vector of the network. Substituting the output of the RBF neural network into the sliding mode control law, the final composite control strategy is obtained: in: Responsible for counteracting the main nonlinear interference, For the estimation of the known part of the system, This is a robust gain used to handle residual terms that RBF neural networks cannot fully approximate. It is the nominal model of the wind turbine system. This is an estimate of the control gain function; Design an adaptive online weight vector update to ensure the stability of the closed-loop system: in: For the adaptive update rate of the weights, For learning rate, Forgetting factor, The value of the sliding surface function. It is the Gaussian function output vector of the hidden layer of the RBF neural network.

Citation Information

Patent Citations

  • Off-line handwritten mathematical formula identification method based on deep learning

    CN115205874A

  • Handwritten mathematical formula dynamic identification method based on multi-modal feature fusion

    CN120088800A