A health management method for regulating the environment inside and outside a native black pig breeding house
By introducing air enthalpy and cumulative thermal environment adaptability index, the environmental control inside and outside the black pig breeding house is dynamically adjusted, which solves the problems of environmental imbalance and pig stress in the traditional system and achieves the accuracy and stability of environmental regulation.
Patent Information
- Application Number
- CN202611370111.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-04
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional black pig farm environmental control systems fail to effectively quantify the pigs' adaptability to hot and humid environments, leading to environmental imbalances and stress in the pigs when weather changes or grazing patterns change. Furthermore, the control commands for ventilation equipment are prone to oscillation.
By introducing air enthalpy as a control variable, the equivalent exposed air enthalpy is calculated and a cumulative thermal environment adaptation index is generated. Combined with short-term extrapolated outdoor meteorological values and the adaptation level of the pig herd, the control commands of the air inlet and exhaust fans are dynamically adjusted to achieve a smooth environmental transition.
It improves the accuracy and stability of environmental regulation, avoids environmental imbalance and stress in the pigsty, and ensures the effectiveness of ventilation equipment and the health of the pigs.
Smart Images

Figure CN123166115A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of livestock and poultry breeding environment control technology, specifically a health management method for controlling the internal and external environment of a natural black pig breeding shed. Background Technology
[0002] Natural black pig farming often employs a combination of indoor feeding and outdoor grazing. Regarding environmental control in the pigpens, traditional control systems typically use indoor dry-bulb temperature as the sole control variable, or rely on mechanical ventilation at fixed operating frequencies. However, in actual farming environments, relative humidity and dry-bulb temperature together determine the true overall thermodynamic state. A single temperature variable cannot characterize the actual heat and humidity load resulting from their coupling, leading to an inability of the system to accurately assess the environmental pressure actually borne by the pig herd under complex weather conditions.
[0003] Meanwhile, existing environmental control logic largely relies on statically set targets, failing to consider the physiological adaptation process of the pig herd. The pig herd's buffering capacity against the current hot and humid environment is influenced by its historical exposure. Due to the lack of a quantitative tracking mechanism for the duration and magnitude of historical environmental deviations, the control system cannot dynamically adjust control targets based on the pig herd's actual thermal adaptation level. When outdoor weather conditions change abruptly, conventional ventilation adjustments can easily introduce ineffective outdoor airflow, causing imbalances in the indoor environment.
[0004] Furthermore, during the transition between breeding and grazing modes, the opening and closing of the grazing passageway doors causes the original controlled negative pressure state inside the breeding shed to disappear, resulting in a physical abrupt change in the boundary of airflow exchange between the inside and outside of the shed. When faced with this lack of dynamic boundary, conventional closed-loop control algorithms will experience abnormal accumulation of integral variables within their control loops. When the passageway doors are closed again, the accumulated deviation will cause oscillations in the ventilation system's control commands, leading to over-response or disordered operation of the air intake and exhaust fans, thereby causing environmental instability within the shed and triggering environmental stress in the pig herd. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a health management method for regulating the internal and external environment of a natural black pig farm. This method solves the problem that traditional environmental control methods, which focus on a single temperature or fixed ventilation volume during the transition from natural black pig farming to grazing, do not consider the actual heat and humidity load generated by the coupling of temperature and humidity, and lack a quantitative mechanism for assessing the pigs' adaptability to the thermal environment. Furthermore, when changes in outdoor weather or the opening and closing of grazing passage doors cause abrupt changes in airflow boundaries, ventilation equipment is prone to oscillations in control commands, leading to instability in the internal environment and stress in the pigs.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a health management method for regulating the internal and external environment of a natural black pig breeding shed, comprising: Obtain indoor air enthalpy, outdoor air enthalpy, and the rate of change of outdoor air enthalpy; The outdoor air mixing weight is determined based on the exhaust fan operating parameters and the static pressure difference between the inside and outside of the breeding house. The indoor air enthalpy value and the outdoor air enthalpy value are weighted and calculated using the outdoor air mixing weight to obtain the equivalent exposed air enthalpy value. Based on the deviation of the equivalent exposed air enthalpy value from the preset suitable air enthalpy value range, a cumulative thermal environment adaptability index is generated. The short-time extrapolation value of outdoor air enthalpy is obtained based on the outdoor air enthalpy and the rate of change of outdoor air enthalpy, and the target enthalpy is generated by combining it with the cumulative thermal environment adaptability index. Based on the target enthalpy value, the adjustment amount of the feedforward opening of the air inlet window and the adjustment amount of the feedback frequency of the exhaust fan are calculated, control commands are generated and sent to the air inlet window actuator and the exhaust fan frequency converter.
[0007] This invention introduces air enthalpy as a control variable to characterize the combined thermal and humidity state of ambient air. By calculating the equivalent exposed air enthalpy, the actual replacement degree of indoor air masses by outdoor air introduced through mechanical ventilation is quantified. Based on this, the duration and magnitude of historical environmental deviations are tracked to generate a cumulative thermal environment adaptation index, using the pig herd's adaptation level to the current thermal and humidity environment as a dynamic constraint variable for subsequent control calculations. Simultaneously, by combining the short-term extrapolation trend of outdoor meteorological data with the target enthalpy deviation, the feedforward response of the air inlet window and the feedback regulation of the exhaust fan are decoupled, improving the stability of the ventilation system during environmental transition periods.
[0008] Further, the step of obtaining the indoor air enthalpy value, the outdoor air enthalpy value, and the rate of change of the outdoor air enthalpy value includes: Read the measurement values from indoor and outdoor sensors, extract the effective dry-bulb temperature and relative humidity after outlier processing to derive the air moisture content, calculate and apply low-pass filtering to obtain the indoor air enthalpy and the outdoor air enthalpy; calculate the rate of change of the outdoor air enthalpy in adjacent sampling periods, and when the absolute value of the rate of change of the outdoor air enthalpy is less than a preset dead zone threshold, clear the rate of change of the outdoor air enthalpy to zero to obtain the rate of change of the outdoor air enthalpy after dead zone processing.
[0009] By deriving the air humidity content, a thermodynamic calculation benchmark for moist air is established. In addition, dead zone processing is used to filter out minor disturbances in the outdoor environment and sensor measurement noise, preventing high-frequency noise from causing frequent and disordered actions of the actuator.
[0010] Further, the step of obtaining the equivalent exposed air enthalpy value includes: The actual operating frequency of the exhaust fan is obtained as the operating parameter of the exhaust fan. The mechanical ventilation volumetric flow rate is obtained by interpolation in the pre-stored exhaust fan performance data table based on the static pressure difference inside and outside the breeding house, and the mechanical air exchange volume is calculated. The preset equivalent mixed air volume of the breeding house is obtained, and the outdoor air mixing weight is determined based on the mechanical air exchange volume and the equivalent mixed air volume of the breeding house. The equivalent exposed air enthalpy value is obtained by weighting the indoor air enthalpy value and the outdoor air enthalpy value using the outdoor air mixing weight.
[0011] The ventilation volume is estimated by using the fan performance data table and static pressure difference interpolation to avoid the interference of dust environment on the wind speed measurement device; and the outdoor air mixing weight is calculated by combining the equivalent mixed air volume to objectively reflect the actual replacement ratio of outdoor airflow to indoor air mass in a single cycle.
[0012] Further, the step of generating the cumulative thermal environment adaptation index includes: The equivalent exposed air enthalpy value is subtracted from the lower and upper limits of the suitable air enthalpy value range to extract the single-cycle enthalpy deviation in the high and low enthalpy directions. The single-cycle enthalpy deviation is divided into non-exceeding deviation and exceeding deviation according to a preset medium deviation upper limit, and the change amplitude of non-exceeding deviation in adjacent periods is calculated. The non-exceeding deviation, the change amplitude of non-exceeding deviation, and the exceeding deviation are respectively processed by exponential weighted moving average and normalized to generate the cumulative thermal environment adaptation index.
[0013] By performing asymmetric processing on environmental deviations of different degrees, non-exceeding deviations are used as the accumulation term of environmental adaptability, while exceeding the limits are used as the constraint term that weakens the adaptation index, thus preventing the system from misjudging long-term exposure to poor environments as a high level of adaptability; and exponentially weighted moving averages are used to match the characteristics of environmental memory decaying over time.
[0014] Further, the step of generating the target enthalpy value includes: The rate of change of outdoor air enthalpy is limited to a preset range, and a short-time extrapolated value of outdoor air enthalpy is obtained by first-order linear extrapolation based on the outdoor air enthalpy. The allowable indoor-outdoor enthalpy difference is calculated based on the cumulative thermal environment adaptation index. A rate of change constraint interval is constructed using the target enthalpy value of the previous period, a pig herd environment allowable interval is constructed using pig herd information, and an indoor-outdoor enthalpy difference constraint interval is constructed using the short-time extrapolated value of outdoor air enthalpy and the allowable indoor-outdoor enthalpy difference. The intersection of the rate of change constraint interval, the pig herd environment allowable interval, and the indoor-outdoor enthalpy difference constraint interval is obtained to generate a feasible interval for the target enthalpy value.
[0015] By constructing the intersection of the integrated equipment adjustment rate, the pig herd environmental requirements, and the indoor and outdoor enthalpy difference constraints, the feasible range of the generated target enthalpy value is ensured to be within the hardware execution boundary and the physiologically permissible range of the pig herd, while also meeting the control requirements for the gradual reduction of indoor and outdoor environmental differences during the grazing transition period.
[0016] Furthermore, the step of generating the target enthalpy value further includes: A candidate target enthalpy value is calculated based on the grazing transition progress coefficient, the short-time extrapolation of the outdoor air enthalpy value, and the indoor air enthalpy value. When the candidate target enthalpy value is within the feasible range of the target enthalpy value, the candidate target enthalpy value is used as the target enthalpy value for the current period. When the candidate target enthalpy value exceeds the feasible range of the target enthalpy value, the candidate target enthalpy value is restricted to the nearest boundary of the feasible range of the target enthalpy value and used as the target enthalpy value.
[0017] By limiting the out-of-limit candidate target enthalpy values to within the feasible range, the algorithm can be guaranteed to run continuously under non-ideal weather conditions, and the target value setting can be avoided from exceeding the safety control boundary.
[0018] Further, the step of calculating the feedforward opening adjustment of the air inlet window includes: Calculate the target enthalpy value deviation from the target enthalpy value of the indoor air; compare the direction of the target enthalpy value deviation with the direction of the difference between the short-time extrapolated value of the outdoor air enthalpy value and the indoor air enthalpy value to determine the effectiveness of ventilation regulation; use the cumulative thermal environment adaptation index to adjust the feedforward gain of the air inlet window; determine the air inlet window action direction coefficient based on the effectiveness of ventilation regulation; multiply the feedforward gain of the air inlet window, the air inlet window action direction coefficient, and the absolute value of the rate of change of the outdoor air enthalpy value to obtain the feedforward opening adjustment amount of the air inlet window.
[0019] The effectiveness of ventilation regulation is determined based on the deviation of the target enthalpy value and the short-term extrapolation direction of outdoor weather, preventing ineffective ventilation from introducing outdoor air and causing indoor environmental imbalance. The feedforward gain of the air inlet window is dynamically adjusted in combination with the cumulative thermal environment adaptation index, and the air inlet response speed is adjusted according to the actual adaptation level of the pig herd to reduce the impact of sudden changes in outdoor weather on the indoor environment.
[0020] Further, the step of calculating the feedback frequency adjustment amount of the exhaust fan includes: Based on the determination result of the ventilation adjustment effectiveness, the direction of the target enthalpy deviation is reversed to obtain the effective feedback deviation of the exhaust fan; the effective feedback deviation of the exhaust fan is processed by incremental proportional-integral-derivative control to calculate the adjustment amount of the exhaust fan feedback frequency.
[0021] To address the non-monotonic relationship between exhaust volume and indoor enthalpy changes, the direction of the target enthalpy deviation is reversed based on the effectiveness of ventilation regulation, ensuring the accuracy of the feedback regulation loop output polarity under different indoor-outdoor relative enthalpy difference conditions.
[0022] Further, the step of generating the control commands includes: The adjustment amount of the exhaust fan feedback frequency and the adjustment amount of the air inlet window feedforward opening are respectively added to the actual operating frequency of the exhaust fan and the actual opening of the air inlet window in the previous cycle to obtain the preliminary control frequency and the preliminary control opening. The initial control frequency is limited by using the preset minimum ventilation volume corresponding frequency and the maximum allowable operating frequency; The static pressure difference between the inside and outside of the breeding house and the average wind speed at the air inlet for the next cycle are estimated based on the initial control frequency after the amplitude limit and the initial control opening. When the estimated value of the static pressure difference between the inside and outside of the breeding house or the average wind speed of the air inlet exceeds the corresponding preset upper limit, the opening of the air inlet window is increased first. If the air inlet window reaches the maximum opening, the frequency of the exhaust fan is reduced. The control command is generated after the rate of change is limited and verified.
[0023] Before issuing instructions, frequency and opening degree are estimated and verified. When the static pressure difference or air inlet velocity exceeds the limit, the adjustment strategy of first increasing the air inlet window opening and then reducing the fan frequency is implemented to avoid excessive static pressure difference causing air leakage in the building or disordered airflow organization, while ensuring the basic air exchange volume.
[0024] Furthermore, it also includes: The system monitors the detection signal of the grazing passage door; when the grazing passage door is detected to switch from closed to open, the closed-loop tracking of the target enthalpy value is stopped, the historical deviation update of the feedback control and the update of the cumulative thermal environment adaptation index are paused, the air inlet window is controlled to a preset opening degree and the exhaust fan is maintained at the minimum ventilation frequency; when the grazing passage door is detected to close again and the confirmation time is met, the actual operating frequency of the exhaust fan is read as the initial output value, the historical deviation variable is initialized according to the difference between the current target enthalpy value and the indoor air enthalpy value, and the update of the cumulative thermal environment adaptation index is restarted.
[0025] To address the sudden change in the controlled negative pressure boundary inside the shed caused by the opening of the grazing passage door, the abnormal accumulation of variables inside the control system is prevented by pausing closed-loop tracking and integral variable updates. After the passage door is closed, the actual operating frequency is read and the historical deviation is reinitialized, so as to achieve a smooth and disturbance-free switch of the ventilation equipment from the door-open maintenance state to the closed-loop control mode.
[0026] A second aspect of the present invention provides a computer-readable storage medium comprising computer instructions; when the computer instructions are executed in a computing device, the computing device performs any of the above-described methods for the health management of the internal and external environment of a natural black pig breeding shed.
[0027] A third aspect of the present invention provides a computer program product that, when the computer program product is run in a computing device, causes the computing device to execute any of the above-described methods for regulating the internal and external environment of a natural black pig breeding shed.
[0028] This invention provides a health management method for regulating the internal and external environment of a natural black pig farm, which has the following beneficial effects: This invention uses air enthalpy instead of a single temperature variable, combining dry-bulb temperature and relative humidity to quantify the heat and humidity load within the pig farm. By calculating the cumulative thermal environment adaptation index, it uses the pig herd's adaptation level to historical environmental deviations as a dynamic constraint. Compared to traditional control methods based on instantaneous conditions, this method avoids misjudging long-term exposure to poor environmental conditions as high adaptation levels, thus improving the objectivity of environmental assessment and the accuracy of environmental regulation targets.
[0029] This invention generates a target enthalpy value constrained by multiple boundaries by combining a short-time extrapolated value of outdoor air enthalpy with the cumulative thermal environment adaptability index. Based on the effectiveness of ventilation regulation, it calculates the adjustment amount of the feedforward opening of the air inlet window and the adjustment amount of the feedback frequency of the exhaust fan. By decoupling the feedforward response and feedback regulation, the problem of indoor environmental imbalance caused by ineffective ventilation introduced during sudden changes in outdoor weather is solved, and the oscillation of control commands for ventilation equipment is effectively suppressed.
[0030] This invention addresses the abrupt changes in airflow boundaries within the shed caused by grazing mode switching by establishing a smooth control switching mechanism based on the state of the grazing passage door. When the passage door is open, closed-loop tracking and historical deviation updates are paused to prevent abnormal accumulation of integral variables within the control system. After the passage door is closed, historical deviation variables are reinitialized by reading the actual operating frequency, achieving a smooth, disturbance-free switch of the ventilation equipment from the door-open maintenance state to the closed-loop control mode, avoiding environmental impacts caused by control instability and equipment overload malfunctions. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of the structure of the original ecological black pig breeding house internal and external environment regulation and health management system provided in an embodiment of the present invention; Figure 2 The overall flowchart of the method for regulating and managing the health of the internal and external environment of the original ecological black pig breeding house provided in the embodiments of the present invention; Figure 3 This is a flowchart of the data acquisition and air enthalpy calculation process in an embodiment of the present invention; Figure 4 This is a flowchart of the target enthalpy value generation process in an embodiment of the present invention; Figure 5 This is a flowchart of the air intake and exhaust control process in an embodiment of the present invention. Detailed Implementation
[0032] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] like Figure 1 As shown, this embodiment of the invention provides a health management system for regulating the internal and external environment of a natural black pig farm. The natural black pig farm of this embodiment has an openable grazing passage. When the grazing passage is closed, the farm forms a controlled mechanical ventilation space. The air exchange boundary inside the farm is composed of controlled air inlets, exhaust outlets, and building gaps with air leakage channels characterized by equivalent air leakage area parameters. The main hardware components of the system include a sensor array, actuators, and a central control unit.
[0034] The sensor group is equipped with an indoor temperature and humidity sensor, an outdoor temperature and humidity sensor and their radiation shield, a static pressure difference sensor inside and outside the livestock shed, a grazing passage door status sensor, and an outdoor wind speed sensor or meteorological data interface for acquiring outdoor wind speed.
[0035] The central control unit is used to collect sensor signals and issue control commands to the actuators. The central control unit may include: an operation management module, a data acquisition module, an equivalent exposure enthalpy calculation module, a thermal environment adaptability index calculation module, a target enthalpy generation module, an intake and exhaust ventilation control module, and a command constraint coordination module.
[0036] The actuators include an electric air intake window actuator with position feedback function and an exhaust fan with a frequency converter.
[0037] See Figure 2 This invention provides a health management method for regulating the internal and external environment of a natural black pig breeding shed, comprising the following steps: S10 verifies the current hardware operating status and meteorological conditions. If the conditions are met, the pre-grazing environmental transition control is initiated. The operation management module confirms that the sensor signals are continuous, the position feedback of the electric air intake window actuator and the operation feedback of the exhaust fan frequency converter are normal, and the outdoor weather has not triggered the meteorological threshold for prohibiting grazing, and then initiates the pre-grazing environmental transition control process.
[0038] S20 synchronously reads sensor measurements according to a preset sampling period, eliminates invalid signals to derive air humidity, calculates and filters indoor and outdoor air enthalpy values, and extracts the rate of change of outdoor air enthalpy. The data acquisition module reads indoor and outdoor temperature and humidity data, as well as static pressure difference data inside and outside the breeding shed. It calculates enthalpy based on the thermodynamic state equation of moist air, processes the enthalpy data using a low-pass filter, and extracts the rate of change of outdoor air enthalpy and its absolute value after dead-zone processing.
[0039] S30 estimates the mechanical ventilation volume based on the actual operating frequency of the exhaust fan, the static pressure difference between inside and outside the breeding house, and the exhaust fan performance data table. It then calculates the outdoor air mixing weight coefficient and generates the equivalent exposed air enthalpy. The equivalent exposed air enthalpy calculation module calculates the weighted value of the outdoor air enthalpy and the indoor air enthalpy to obtain environmental state parameters used to estimate the degree of impact of mechanical ventilation on the indoor thermal and humid environment.
[0040] S40 compares the boundary between the equivalent exposed air enthalpy value and the suitable air enthalpy value range, extracts the single-cycle enthalpy deviation in the high and low enthalpy directions, and determines the non-exceeding deviation, the magnitude of the non-exceeding deviation change, and the exceeding deviation, respectively. The above data are then processed using an exponentially weighted moving average to generate a normalized cumulative thermal environment adaptation index. The thermal environment adaptation index calculation module performs weighted statistics on the data within a set historical window to generate control state variables used to adjust the allowable indoor-outdoor enthalpy difference, the target enthalpy change rate, and the feedforward gain of the air inlet window.
[0041] S50 calculates the short-time extrapolation of outdoor air enthalpy based on the current outdoor air enthalpy and the rate of change of outdoor air enthalpy. It adjusts the allowable indoor-outdoor enthalpy difference using the cumulative thermal environment adaptation index. It constructs an indoor-outdoor enthalpy difference constraint interval based on the short-time extrapolation of outdoor air enthalpy and the allowable indoor-outdoor enthalpy difference. It constructs a pig herd environment allowable interval based on the pig herd environment control parameters, and limits the single-cycle allowable change of the target enthalpy based on the current adaptation index and equipment response capability. It constructs a target enthalpy change rate constraint interval. It finds the intersection of the indoor-outdoor enthalpy difference constraint interval, the pig herd environment allowable interval, and the target enthalpy change rate constraint interval to generate a feasible interval for the target enthalpy and outputs the target enthalpy.
[0042] S60 determines the effectiveness of increasing the air intake volume in reducing the target enthalpy deviation and decides the direction of the air intake window's operation. It uses the cumulative thermal environment adaptation index to tune the air intake window's feedforward gain and calculates the air intake window's feedforward opening adjustment based on the absolute value of the outdoor air enthalpy change rate after dead-zone processing. It determines the direction of the exhaust fan's feedback adjustment based on the difference between the short-time extrapolated outdoor air enthalpy and the indoor air enthalpy, and calculates the exhaust fan's feedback frequency adjustment based on the effective feedback deviation. The air intake and exhaust control module superimposes the air intake window's feedforward opening adjustment to the current actual air intake window opening to obtain the initial control opening of the air intake window; it superimposes the exhaust fan's feedback frequency adjustment to the actual operating frequency of the exhaust fan in the previous control cycle to obtain the initial control frequency of the exhaust fan. The initial control opening of the air intake window and the initial control frequency of the exhaust fan constitute the initial control command for the actuator.
[0043] S70, the instruction constraint coordination module calculates the minimum ventilation requirement in real time, and performs boundary verification on the preliminary control instructions output by the air intake and exhaust control module based on the static pressure difference inside and outside the breeding house and the average wind speed at the air inlet. It corrects the instructions according to the preset priority, generates the final control instructions, and sends them to the actuator to ensure that the actuator's control instructions are within the equipment and ventilation constraints. Subsequently, the instruction constraint coordination module determines the control steps to be executed in the next sampling cycle based on the current operating mode.
[0044] In step S10, the system verifies the current hardware working status and meteorological conditions through the operation management module to initiate pre-grazing environmental transition regulation after the preset conditions are met.
[0045] S101, the operation management module periodically performs a start-up condition check. This check includes verifying whether the measurement signals from the indoor and outdoor temperature and humidity sensors, the static pressure difference sensor between the inside and outside of the livestock shed, the grazing passage door status sensor, and the outdoor wind speed sensor or meteorological data interface are within their effective range and whether data transmission is continuous. The system further determines whether there is stall, overload, or communication abnormality in the position feedback of the electric air inlet actuator and the operation feedback of the frequency converter.
[0046] The system simultaneously compares the current outdoor temperature, relative humidity, and wind speed values to see if they reach the preset meteorological thresholds for prohibiting grazing, and verifies whether the current pig herd's breed and growth stage information meet the requirements for pre-grazing environmental transition control. The preset meteorological thresholds for prohibiting grazing are determined based on the environmental control limits corresponding to different breeds and growth stages, combined with historical statistical data from the farm. For example, when excessively high outdoor temperatures cause heat stress or excessively high wind speeds affect animal behavior, the corresponding measured values are considered to have reached the threshold. When all verification conditions meet the preset requirements, the system can confirm that the conditions for initiating pre-grazing environmental transition control are met.
[0047] S102, the system switches operating modes under different operating conditions. The system is configured with a normal control mode, a transitional control mode, a door-open operation mode, a door-closed recovery mode, and a fault control mode. When the system does not receive a grazing command or does not meet the start-up conditions, it remains in the normal control mode. In this state, the system performs normal negative pressure ventilation control according to a constant temperature baseline and minimum ventilation volume. After receiving an automatic grazing plan or a manual trigger signal and completing the start-up condition verification, the operation management module switches the system to the transitional control mode to initiate target enthalpy tracking control and coordinated control of the air inlet and exhaust fans.
[0048] S103, When the grazing passage door opens, it triggers a change in system boundary conditions and pauses feedback control status updates. When the grazing passage door status sensor detects that the passage door has switched from a closed state to an open state, the original mechanical ventilation boundary conditions of the livestock shed change. At this time, outdoor air enters through the passage door, and the system switches to open-door operation mode.
[0049] To avoid abnormal commands generated by drastic fluctuations in input deviations in the automatic control loop, the operation management module stops the closed-loop tracking calculation of the target enthalpy value by the intake and exhaust ventilation control modules, suspends the updating of historical deviation variables and output status in the exhaust fan feedback control calculation, and suspends the recursive update of the cumulative thermal environment adaptability index. The system directly issues commands to adjust the electric air intake window actuator to the preset opening mode and degree. This opening degree is calibrated based on the building structure of the breeding house, the location of the air intake window, and the results of on-site wind pressure tests, and is used to reduce the adverse effects of external airflow on the airflow organization inside the house after the passage is opened.
[0050] Simultaneously, the frequency converter stops adjusting its frequency based on the set value of the static pressure difference between the inside and outside of the pigsty, and instead maintains the operating frequency corresponding to the minimum ventilation volume required for the current number of pigs. This prevents the exhaust fan from abnormally increasing its frequency due to a decrease in the static pressure difference between the inside and outside of the pigsty caused by the opening of the passageway door. The central control unit sends control commands to the frequency converter and the electric air inlet actuator through analog output modules, digital output modules, or an industrial communication bus. Relay outputs are used for equipment enabling and safety interlocking.
[0051] S104, Smooth transition of system state recovery and control after passage closure. When the door status sensor detects that the grazing passage door has closed again and the closure time exceeds the preset door status confirmation time, the system switches from the open operation mode to the closed recovery mode. The door status confirmation time is set to several seconds to tens of seconds to filter high-frequency false triggering signals from the sensor caused by pigs or staff entering or leaving the passage.
[0052] During this recovery period, the operation management module reads the actual operating frequency of the exhaust fan and uses it as the initial output value when the feedback control of the exhaust fan is restored. It also reinitializes the historical deviation variable according to the current target enthalpy deviation, so that the first feedback frequency adjustment after the recovery is zero or close to zero, in order to avoid sudden changes in drive commands caused by the control state switch.
[0053] Then, the system drives the actuator to re-establish the target static pressure difference based on the defined rate of change of the static pressure difference between the inside and outside of the breeding house. After the static pressure difference between the inside and outside of the breeding house stabilizes and the indoor environmental parameters return to the set range, the system automatically resets to the normal control mode and restarts the recursive update of the cumulative thermal environment adaptation index.
[0054] S105, execute fault handling mode. During the execution of the above control cycle, if the operation management module detects sensor signal loss, control bus communication abnormality, or actuator mechanical failure, the system interrupts the current pre-grazing environmental transition control and enters fault control mode.
[0055] The system executes the corresponding fault replacement control mode according to the fault type: when the outdoor temperature and humidity sensor or meteorological data interface fails, the system exits the transition control mode and performs normal control according to the indoor environmental measurement value; when the indoor temperature and humidity sensor fails, the system switches to the redundant measuring point first, and maintains the preset minimum ventilation volume and outputs an alarm when there is no effective redundant measuring point. When the static pressure difference sensor inside and outside the breeding house malfunctions, the system stops the static pressure difference closed-loop regulation and performs restricted operation according to the pre-calibrated correspondence between the exhaust fan frequency and the air inlet window opening; when the electric air inlet window actuator stalls or the position feedback is abnormal, the system restricts the exhaust fan operating frequency according to the last confirmed actual opening. When the exhaust fan fails, the system activates the backup exhaust fan or emergency ventilation device. If no backup equipment is available, the grazing passage must not be opened, and a continuous alarm will be triggered. When control bus communication malfunctions, the actuator retains the most recently validated control command for a preset confirmation time. After the confirmation time expires, the system switches to the corresponding fault control mode. The system maintains the corresponding fault control mode until a manual reset command is received and the fault is confirmed to have been cleared.
[0056] See Figure 3 In step S20, the system synchronously reads sensor measurement values through the data acquisition module according to a preset sampling period, derives air humidity after eliminating invalid signals, and then calculates and filters indoor air enthalpy and outdoor air enthalpy, extracting the rate of change of outdoor air enthalpy for use by the control system.
[0057] S201, the data acquisition module performs signal validity determination and outlier handling on the raw sensor data. The system synchronously reads the raw signals from the indoor temperature and humidity sensor, the outdoor temperature and humidity sensor, and the static pressure difference sensor inside and outside the livestock shed according to the set sampling period. Before feeding the data into subsequent control calculations, the data acquisition module performs multiple signal verifications. The data acquisition module calculates the absolute value of the difference between the current sampled value and the sampled value of the previous period. If this difference exceeds a preset jump threshold, the system marks the sampled value as data to be confirmed. This jump threshold is determined based on the maximum possible rate of change of the physical environment and the sensor's own response time constant; for example, the temperature jump threshold can be set to 0.5℃ per second.
[0058] If a single sampling exceeds the threshold, the system temporarily uses the valid data from the previous period. If multiple consecutive sampling periods exceed the threshold, the system performs multi-source consistency verification using redundant sensor measurements, the relationship between indoor and outdoor environmental changes, exhaust fan operation status, and air inlet window operation status. The multi-source consistency verification results support the system gradually accepting new sampled values according to the preset maximum allowable change rate when real environmental changes occur. If multi-source consistency verification fails to confirm the data, the corresponding sensor is marked as abnormal, and a fault handling procedure is triggered; consecutively fluctuating values are not directly used as the new data benchmark. Furthermore, the data acquisition module monitors the signal sequence. If the values remain completely unchanged for multiple consecutive sampling periods, the system determines that a sensor signal freeze has occurred. The data acquisition module synchronously checks whether the measured values exceed the hardware range limits. When an abnormal signal is detected and exceeds the system's maximum allowable tolerance period, the fault handling procedure is triggered.
[0059] S202 performs thermodynamic conversion of air state parameters. The thermal and humidity state of the pig herd's environment is affected by both dry-bulb temperature and air humidity; a single temperature value cannot fully characterize the air's thermal and humidity state. The system converts temperature and humidity data into moist air enthalpy, hereinafter referred to as air enthalpy. After acquiring the effective dry-bulb temperature and relative humidity after outlier processing, the data acquisition module reads the local atmospheric pressure value pre-stored within the system. The system uses the dry-bulb temperature to calculate the water vapor saturation partial pressure under the current conditions, and combines this with the measured relative humidity value to calculate the actual water vapor partial pressure, thereby deriving the air moisture content. Based on this, the data acquisition module calculates the air enthalpy: ; In the formula, This indicates the enthalpy of air, expressed in kJ / kg dry air. This indicates the measured dry-bulb temperature of air, in °C. The humidity content of the air is expressed in kg / kg dry air; the constant 1.006 represents the specific heat capacity at constant pressure of dry air; the constant 2501 represents the latent heat of vaporization of water at 0℃; and the constant 1.86 represents the specific heat capacity at constant pressure of water vapor. The data acquisition module substitutes the indoor and outdoor temperature and humidity into the above calculation formulas and outputs the indoor air enthalpy value for the current period in real time. and outdoor air enthalpy When calculating air humidity from temperature and relative humidity, the system uses the preset calculation relationship of saturated water vapor partial pressure and local atmospheric pressure parameters.
[0060] S203 performs digital filtering and extracts the rate of change of outdoor air enthalpy. Changes in the outdoor environment and sensor measurement noise cause short-period fluctuations in air enthalpy data. Directly using unfiltered data for control increases the likelihood of frequent actuator movements. The data acquisition module uses a first-order low-pass filter or other digital filtering methods that can suppress high-frequency noise to process indoor and outdoor air enthalpy values separately, obtaining filtered indoor and outdoor air enthalpy values.
[0061] When the system starts up for the first time or resets from a fault, the air enthalpy value of the current cycle is used as the initial value for the corresponding filtering process. The data acquisition module calculates the rate of change of outdoor air enthalpy value based on the outdoor air filtered enthalpy value of adjacent sampling cycles and the control sampling cycle. When the absolute value of the rate of change of outdoor air enthalpy value is less than the preset dead zone threshold for the rate of change of outdoor air enthalpy value, it is treated as zero; when its absolute value reaches or exceeds the dead zone threshold, the corresponding rate of change is retained.
[0062] The outdoor enthalpy change rate dead zone threshold is determined by converting the measurement error of the outdoor temperature and humidity sensor into the air enthalpy calculation relationship in step S202, and further converting it into the upper limit of the enthalpy change rate error in combination with the control sampling period, as well as the lower limit of the outdoor air enthalpy change rate that can cause the minimum effective action of the air inlet window. The larger of the two values is taken as the outdoor enthalpy change rate dead zone threshold.
[0063] The rate of change of outdoor air enthalpy after dead zone processing is used to determine the trend of outdoor air enthalpy change. Its absolute value is used as the absolute value of the rate of change of outdoor air enthalpy, which is used to determine the magnitude of the feedforward opening adjustment of the air inlet window. The sign of the rate of change of outdoor air enthalpy is not directly used as the basis for determining the direction of opening or closing the air inlet window.
[0064] In step S30, the system estimates the current mechanical ventilation volume through the equivalent exposure enthalpy calculation module, calculates the outdoor air mixing weight coefficient, and then generates the equivalent exposure air enthalpy. This parameter reflects the impact of air exchange inside the breeding house on the thermal and humidity state of the air inside the house and is used as an input for subsequent calculations.
[0065] S301, the equivalent exposure enthalpy calculation module performs mechanical ventilation volume estimation. Dust in the internal environment of the livestock shed can cause clogging or reading drift of the instrument probes that directly measure flow velocity. Therefore, the equivalent exposure enthalpy calculation module indirectly estimates the mechanical ventilation volume using the operating parameters of the exhaust fan. The system reads the actual operating frequency of the exhaust fan and the static pressure difference between the inside and outside of the livestock shed measured by sensors in real time. The static pressure difference between the inside and outside of the livestock shed is defined as the difference between the outdoor static pressure and the indoor static pressure, and is a positive value under negative pressure mechanical ventilation conditions.
[0066] The system pre-stores the performance data table for this model of exhaust fan. Before performing interpolation, the equivalent exposure enthalpy calculation module limits the actual operating frequency of the exhaust fan and the static pressure difference inside and outside the livestock shed, restricting them to the input range specified in the exhaust fan performance data table. Using the limited actual operating frequency of the exhaust fan and the static pressure difference inside and outside the livestock shed as input variables, the equivalent exposure enthalpy calculation module interpolates the data in the exhaust fan performance data table to obtain the mechanical ventilation volumetric flow rate under the current operating conditions. Multiplying the mechanical ventilation volumetric flow rate by the control sampling period yields the mechanical ventilation volume within the current control period.
[0067] S302, Establish the calculation relationship for the outdoor air mixing weight coefficient. Under mechanical ventilation, outdoor air entering the livestock shed mixes with the existing air inside before being discharged. The equivalent exposure enthalpy calculation module estimates the update ratio of outdoor air to the indoor air state based on the mechanical ventilation volume within a control sampling period. The system extracts the preset equivalent mixed air volume of the livestock shed. This parameter is calibrated by combining the total internal volume of the livestock shed with the volume occupied by equipment, the volume occupied by the pigs, and the results of on-site ventilation tests.
[0068] The outdoor air mixing weighting coefficient is determined based on the mechanical ventilation volumetric flow rate, the control sampling period, and the equivalent mixed air volume of the livestock house, and is limited to a range of 0 to 1. The higher the mechanical ventilation volumetric flow rate, or the smaller the equivalent mixed air volume of the livestock house, the higher the outdoor air mixing weighting coefficient. This coefficient is used to estimate the equivalent update ratio of mechanical ventilation to the indoor air conditions within a control sampling period.
[0069] S303, Calculate the equivalent exposure enthalpy. The equivalent exposure enthalpy calculation module uses an outdoor air mixing weighting coefficient to weight the indoor air filter enthalpy and the outdoor air filter enthalpy, estimating the impact of mechanical ventilation on the thermal and humid environment of the pig herd within a control sampling period. ; In the formula, Indicates the equivalent enthalpy of exposed air; This represents the outdoor air mixing weighting coefficient; Indicates the enthalpy value of indoor air filtration; This represents the filtered enthalpy of outdoor air. The equivalent exposed air enthalpy is input into the thermal environment adaptation index calculation module as a historical thermal and humidity environment statistical parameter, and it is not equivalent to the direct measurement results of pig body temperature, metabolic load, or actual physiological adaptability.
[0070] In step S40, the system compares the equivalent exposed air enthalpy value with the suitable air enthalpy value range through the thermal environment adaptation index calculation module, extracts the directional enthalpy deviation, and performs historical statistics using exponential weighted moving average processing to generate a normalized cumulative thermal environment adaptation index, which is used as the control state quantity for subsequent system control.
[0071] S401, the thermal environment adaptability index calculation module obtains the environmental assessment benchmark and extracts the directional enthalpy deviation. The system has a pre-stored parameter table of suitable air enthalpy ranges matching different pig breeds and growth stages. This parameter table is established based on the suitable dry-bulb temperature range and suitable relative humidity range corresponding to different pig breeds and growth stages. Following the air enthalpy calculation relationship in step S202, the corresponding temperature and humidity boundaries are converted into air enthalpy boundaries to determine the lower limit of the suitable air enthalpy. and the upper limit of suitable air enthalpy The thermal environment adaptability index calculation module obtains the lower limit and upper limit of the suitable air enthalpy value for the current stage based on the currently entered information on pig breed and growth stage.
[0072] The high enthalpy deviation and low enthalpy deviation are calculated according to the following formulas: ; ; In the formula, Indicates the deviation from high enthalpy; This indicates the amount of low enthalpy deviation; Indicates the equivalent enthalpy of exposed air; This indicates the lower limit of the suitable air enthalpy value; This indicates the upper limit of the suitable air enthalpy value.
[0073] The system processes high and low enthalpy deviations separately. The upper limit of the medium deviation in the high enthalpy direction is determined based on the current pig breed, growth stage, and preset environmental allowable parameters; the upper limit of the medium deviation in the low enthalpy direction is also determined based on the current pig breed, growth stage, and preset environmental allowable parameters. Environmental allowable parameters are pre-stored according to the environmental allowable ranges corresponding to different pig breeds, growth stages, and weight ranges, and are used to determine the environmental allowable enthalpy boundary for the pig herd. The portion not exceeding the corresponding medium deviation upper limit is defined as a non-exceeding deviation, and the portion exceeding the corresponding medium deviation upper limit is defined as an exceeding deviation. The change range of the non-exceeding deviation is determined based on the non-exceeding deviation in adjacent control cycles. The above data input step S402 performs historical weighted statistics, and the unprocessed single-cycle enthalpy deviation change rate is no longer directly output to the target enthalpy generation module.
[0074] S402 executes the exponentially weighted moving average processing of directional enthalpy deviation data. The thermal environment adaptation index calculation module performs exponential weighting processing on the non-exceeding-limit deviation, the magnitude of change of non-exceeding-limit deviation, and the exceeding-limit deviation in both the high and low enthalpy directions. Within the set historical time window, data closer to the current time has a greater statistical weight, while the weight of data further away from the current time gradually decreases.
[0075] The system obtained the following respectively: Non-excessive deviation weighted values in the high and low enthalpy directions ; Weighted values of non-excessive deviations in the high and low enthalpy directions ; Weighted values of out-of-limit deviations in the high and low enthalpy directions .
[0076] in, This indicates the direction of high or low enthalpy. When the system is first started or reset from a fault state, historical statistical variables are initialized using data corresponding to the current period. Different statistics can use the same or different attenuation coefficients; specific parameters are set based on the historical window length, control sampling period, and field test results.
[0077] S403 generates the directional cumulative thermal environment adaptation index. The thermal environment adaptation index calculation module normalizes and combines the non-exceeding-limit deviation weighted value, the non-exceeding-limit deviation change weighted value, and the exceeding-limit deviation weighted value.
[0078] ; In the formula, Indicates direction The cumulative thermal environment adaptability index; Indicates direction Corresponding baseline adaptation parameters; , and These represent the weighting coefficients corresponding to the non-exceeding deviation weighting value, the non-exceeding deviation change weighting value, and the exceeding deviation weighting value, respectively. Indicates direction Non-exceeding-limit deviation weighted reference value Indicates direction The weighted reference value for non-excessive deviation changes. Indicates direction The weighted reference value for the out-of-limit deviation; the three reference values are only used for... , and Normalize the values and set them all to values greater than zero; This means that the calculation result will be limited to the range of 0 to 1.
[0079] Specifically, historical enthalpy deviations that occur repeatedly within a preset range are positively adjusted, while deviations exceeding the upper limit of the moderate deviation range are negatively corrected to avoid misinterpreting persistently high or low air enthalpy environments as indicating a high degree of adaptation. Baseline adaptation parameters, weighting coefficients, and normalized reference values are set for different pig breeds and growth stages, corresponding to high and low enthalpy directions. , and Based on the on-site calibration period , and The effective statistical range is determined, and the positive upper limit of each effective statistical range is taken as the corresponding reference value. Set in the range of 0 to 1. , and All values were set to non-negative. Through field comparative experiments, the overshoot of the target enthalpy value and the reciprocating adjustment of the control commands for the air inlet and exhaust fans under different parameter combinations were compared to determine the parameter sets corresponding to the pig breed, growth stage, and direction of action. These parameter sets were then pre-stored in the system. The system obtained the high enthalpy adaptation index and the low enthalpy adaptation index, respectively.
[0080] The cumulative thermal environment adaptation index is a control state quantity calculated by the control system based on historical environmental data. It is used to adjust the rate of change of the target enthalpy value, the allowable indoor-outdoor enthalpy difference, and the feedforward gain of the air inlet window. It is not a direct measurement or diagnostic result of the actual physiological adaptability of pigs.
[0081] S404, execute the dual-threshold hysteresis determination of the direction of action of the thermal environment adaptability index. The thermal environment adaptability index calculation module determines whether the high enthalpy direction adaptability index or the low enthalpy direction adaptability index should be used in this control cycle based on the difference between the outdoor air filter enthalpy value and the indoor air filter enthalpy value.
[0082] When the outdoor air filter enthalpy is higher than the indoor air filter enthalpy, and the difference between the two reaches the high enthalpy direction switching threshold and continues for a preset confirmation time, the system selects the high enthalpy direction adaptation index as the current adaptation index. When the outdoor air filter enthalpy is lower than the indoor air filter enthalpy, and the difference between the two reaches the low enthalpy direction switching threshold and continues for a preset confirmation time, the system selects the low enthalpy direction adaptation index as the current adaptation index. When the indoor and outdoor air enthalpy difference is between the two direction switching thresholds, the direction of action selected in the previous control cycle is maintained to avoid frequent switching of the current adaptation index's direction of action within the critical range.
[0083] Reference Figure 4 In step S50, the system uses the target enthalpy generation module to combine the short-term change trend of the outdoor environment with the current adaptation index to find the intersection of the indoor and outdoor enthalpy difference constraint interval, the pig herd environment allowable interval, and the target enthalpy change rate constraint interval, generate the target enthalpy feasible interval, and output the target enthalpy value.
[0084] S501, the target enthalpy generation module performs a short-term extrapolation of the outdoor air enthalpy. The system reads the filtered outdoor air enthalpy for the current period and the rate of change of outdoor air enthalpy after dead-zone processing. To prevent transient interference from causing abnormal extrapolation results, the target enthalpy generation module first limits the rate of change of outdoor air enthalpy to a preset maximum reasonable rate of change.
[0085] The target enthalpy generation module obtains a short-time extrapolated value of outdoor air enthalpy using a first-order linear extrapolation method, based on the filtered outdoor air enthalpy, the rate of change of the limited outdoor air enthalpy, and a preset extrapolation time. The extrapolation time is set according to the response time of the actuator and the on-site step response results of changes in the air state in the livestock shed. The short-time extrapolated value of outdoor air enthalpy is also limited by a preset reasonable range of outdoor air enthalpy to prevent the extrapolated value from exceeding the actual meteorological range due to abnormal short-term change rates.
[0086] S502, Calculate the allowable indoor-outdoor enthalpy difference. During the environmental transition period before grazing, the target enthalpy generation module determines the allowable indoor-outdoor air enthalpy difference before the grazing passage is opened, based on the current adaptation index. The system presets the lower and upper limits of the allowable indoor-outdoor enthalpy difference corresponding to the current growth stage: ; In the formula, This indicates the permissible indoor-outdoor enthalpy difference; This indicates the lower limit of the permissible indoor-outdoor enthalpy difference; This indicates the upper limit of the permissible indoor-outdoor enthalpy difference; This indicates the current adaptation index.
[0087] When the current fitness index is low, the system employs a smaller permissible indoor-outdoor enthalpy difference and a lower permissible rate of change of the target enthalpy value, ensuring that the indoor environment before the grazing passage is opened is closer to the outdoor environment, but the approach process remains slow. When the current fitness index is high, the system allows for a relatively larger indoor-outdoor enthalpy difference and can employ a higher permissible rate of change of the target enthalpy value and feedforward gain of the air inlet window. When the current fitness index is low, and the permissible indoor-outdoor enthalpy difference and target rate of change requirements cannot be simultaneously met within the set transition time, the system delays the opening of the grazing passage instead of increasing the rate of environmental change.
[0088] S503, find the intersection of multiple constraint intervals for the target enthalpy value. To prevent the generated target enthalpy value from exceeding the allowable range of the pig herd environment or the equipment's adjustment capability, the target enthalpy value generation module constructs the following three constraint intervals: The first constraint interval is the indoor-outdoor enthalpy difference constraint interval. This interval is centered on the short-time extrapolation value of the outdoor air enthalpy value and uses the allowable indoor-outdoor enthalpy difference determined in step S502 as the upper and lower boundaries. The second constraint interval is the permissible range of the pig herd environment. The target enthalpy generation module reads the pre-stored permissible temperature and relative humidity ranges based on the current pig herd's breed, growth stage, and weight range. Following the thermodynamic conversion method for air state parameters in step S202, it converts the corresponding temperature and humidity boundary parameters into air enthalpy boundaries to determine the permissible enthalpy range of the pig herd environment. Simultaneously, indoor temperature and relative humidity remain constrained by their respective permissible temperature and relative humidity ranges. The third constraint interval is the target enthalpy change rate constraint interval. Based on the target enthalpy value of the previous control cycle, the allowable target change amount is determined according to the current adaptation index and is limited by the maximum response speed of the equipment.
[0089] The feasible range for the target enthalpy value of the current control cycle is determined by the following formula: ; In the formula, This indicates the feasible range for the target enthalpy value; This indicates the range of indoor and outdoor enthalpy difference constraints. Indicates the permissible environmental range for the pig herd; This represents the constraint interval for the rate of change of the target enthalpy value. The target enthalpy value generation module takes the maximum value among the lower limits of the three constraint intervals as the lower limit of the feasible range of the target enthalpy value, and takes the minimum value among the upper limits of the three constraint intervals as the upper limit of the feasible range of the target enthalpy value.
[0090] The rate of change of the target enthalpy increases with the current adaptation index, but must not exceed the maximum environmental regulation rate that the fan and air inlet can achieve under current operating conditions. While the air enthalpy meets the target range, the indoor temperature and relative humidity must still meet their respective permissible limits.
[0091] S504, Execute target enthalpy generation and non-overlap anomaly handling. The target enthalpy generation module reads the current grazing transition time and the set total transition time. The set total transition time is pre-calibrated and stored based on the current pig herd's breed, growth stage, environmental adjustment response time in the pig house, and the results of on-site step response tests. The target enthalpy generation module calculates the ratio of the current grazing transition time to the set total transition time, limiting the ratio to between 0 and 1 to obtain the grazing transition progress coefficient; then, based on the grazing transition progress coefficient, the short-time extrapolated value of outdoor air enthalpy, and the current filtered indoor air enthalpy, it calculates candidate target enthalpy values.
[0092] When the candidate target enthalpy value is within the feasible range of the target enthalpy value generated in step S503, the candidate target enthalpy value is used as the target enthalpy value for the current period; when the candidate target enthalpy value exceeds the feasible range of the target enthalpy value, it is restricted to the boundary of the nearest feasible range of the target enthalpy value.
[0093] When the feasible range for the target enthalpy value does not exist, the system will no longer directly recognize the target enthalpy value of the previous cycle as the current permissible target. The target enthalpy value generation module first calculates the intersection of the permissible range of the pig herd environment and the constraint range of the target enthalpy value change rate. If the intersection is not empty, the system restricts the target enthalpy value of the previous cycle to within the intersection, suspends the short-term extrapolation of the outdoor air enthalpy value, and outputs an alarm message indicating that the target constraint range has no intersection and grazing is postponed; if the intersection is still empty, the system stops the environmental transition control before grazing and gradually adjusts the control target to the permissible range of the pig herd environment according to the maximum target change rate allowed by the equipment.
[0094] See Figure 5 In step S60, the air intake and exhaust control module calculates the target enthalpy deviation, compares the direction of the difference between the short-term extrapolated outdoor air enthalpy and the indoor air enthalpy, evaluates the effectiveness of increasing the outdoor air intake in reducing the target enthalpy deviation, and calculates the adjustment amount of the intake window feedforward opening and the adjustment amount of the exhaust fan feedback frequency. The intake window mainly responds to the absolute value of the rate of change of outdoor air enthalpy, and the exhaust fan mainly responds to the effective feedback deviation of the exhaust fan.
[0095] S601, the intake and exhaust air control module performs target enthalpy deviation calculation and ventilation adjustment effectiveness determination. The intake and exhaust air control module subtracts the current indoor air filter enthalpy value from the target enthalpy value generated in step S50 to obtain the target enthalpy deviation, and sets a target enthalpy deviation dead zone based on sensor measurement error and the minimum effective action amount of the actuator.
[0096] When the absolute value of the target enthalpy deviation is less than the target enthalpy deviation dead zone threshold, the system determines that the current indoor air enthalpy has reached the target allowable range, the air inlet window maintains its current opening, and the exhaust fan does not perform frequency adjustment based on the target enthalpy deviation.
[0097] When the target enthalpy deviation exceeds the target enthalpy deviation dead zone threshold, the system compares the direction of the target enthalpy deviation with the direction of the difference between the short-time extrapolated outdoor air enthalpy and the indoor air filter enthalpy. When the two directions are consistent, it indicates that increasing the outdoor air intake helps to bring the indoor air enthalpy closer to the target enthalpy, and the system determines that the ventilation adjustment is effective. When the two directions are opposite, it indicates that increasing the outdoor air intake will cause the indoor air enthalpy to deviate further from the target enthalpy, and the system determines that the ventilation adjustment is ineffective. When the difference between the short-time extrapolated outdoor air enthalpy and the indoor air filter enthalpy is within the indoor-outdoor enthalpy difference dead zone, the system determines that the outdoor air's adjustment effect on the current target is insufficient.
[0098] The direction of the air intake window's movement and the direction of the exhaust fan's feedback control are based on the results of the ventilation regulation effectiveness assessment, and are no longer directly determined by the positive or negative sign of the outdoor air enthalpy change rate.
[0099] S602, the air intake and exhaust control module calculates the feedforward opening adjustment amount of the air intake window based on the ventilation adjustment effectiveness judgment result and the current adaptation index. The air intake window movement range is determined by the absolute value of the change rate of outdoor air enthalpy after dead zone treatment, and the movement direction is determined by the ventilation adjustment effectiveness judgment result in step S601.
[0100] The feedforward gain of the air inlet window is calculated using the following formula: ; In the formula, Indicates the feedforward gain of the air intake window; Indicates the base feedforward gain; This represents the adaptive gain adjustment coefficient; This represents the current adaptation index. The basic feedforward gain and the adaptation index gain adjustment coefficient are calibrated based on the effective flow area of the air inlet window, the equivalent mixed air volume of the breeding house, and the results of on-site step response tests.
[0101] The adjustment amount of the feedforward opening of the air inlet window is calculated according to the following formula: ; In the formula, Indicates the adjustment amount of the feedforward opening of the air inlet window; This represents the absolute value of the rate of change of outdoor air enthalpy after dead zone treatment; This indicates the coefficient of the air intake window's movement direction.
[0102] When increasing the amount of outdoor air introduced helps to reduce the deviation from the target enthalpy value, When a positive value is taken, the air intake window will open wider; when increasing the amount of outdoor air introduced will increase the deviation from the target enthalpy value, Taking the smaller absolute value of the negative value, the air intake window will perform a limited closing action; when the ventilation regulation effect is unclear, Set the value to zero, and keep the air intake window at its current opening.
[0103] The adjustment of the feedforward opening of the air inlet window is also subject to the maximum opening change in a single cycle and the mechanical opening range of the air inlet window. Its final opening is coordinated by step S70 in combination with the minimum ventilation volume, the static pressure difference inside and outside the breeding house and the average wind speed at the air inlet.
[0104] S603, the intake and exhaust ventilation control module performs closed-loop feedback control calculations for the exhaust fan. Since the direction of the effect of increasing the exhaust fan frequency on the indoor air enthalpy depends on the difference between the short-time extrapolated value of the outdoor air enthalpy and the filtered value of the indoor air, the system first reverses the direction of the target enthalpy deviation based on the ventilation adjustment effectiveness judgment result in step S601, thus obtaining the effective feedback deviation of the exhaust fan.
[0105] When the short-term extrapolated outdoor air enthalpy is higher than the indoor air filter enthalpy, increasing the exhaust fan frequency will raise the indoor air enthalpy, and the system will use the original direction of the target enthalpy deviation for feedback control. When the short-term extrapolated outdoor air enthalpy is lower than the indoor air filter enthalpy, increasing the exhaust fan frequency will lower the indoor air enthalpy, and the system will reverse the target enthalpy deviation before executing feedback control. When the difference between the short-term extrapolated outdoor air enthalpy and the indoor air filter enthalpy is within the indoor-outdoor enthalpy difference dead zone, the system will suspend exhaust fan feedback adjustment based on air enthalpy.
[0106] The exhaust fan can be controlled using incremental proportional-integral-derivative (PID) control, where the feedback frequency adjustment is calculated based on the effective feedback deviation of the exhaust fan. The proportional, integral, and derivative parameters are tuned through a step response test of the livestock shed ventilation system.
[0107] When the system is first run or resumes from open operation mode, the current actual operating frequency of the exhaust fan is used as the initial output value of the feedback control, and the historical deviation variable is initialized based on the current effective feedback deviation of the exhaust fan. When the exhaust fan frequency has reached the upper limit of allowable frequency but the feedback control still requires to continue increasing the frequency, or has reached the lower limit of allowable frequency but the feedback control still requires to continue decreasing the frequency, the integral accumulation in the corresponding direction is paused; integral calculation resumes when the operating frequency leaves the limit state.
[0108] S604, the intake and exhaust ventilation control module generates preliminary control commands. The intake and exhaust ventilation control module adds the exhaust fan feedback frequency adjustment amount calculated in step S603 to the actual operating frequency of the exhaust fan in the previous control cycle to obtain the preliminary control frequency of the exhaust fan in the current cycle; and adds the intake window feedforward opening adjustment amount calculated in step S602 to the current actual opening of the intake window to obtain the preliminary control opening of the intake window.
[0109] When the system starts up for the first time, the preset start-up reference frequency and initial opening degree are used as the reference values for the previous cycle to avoid the inability to perform calculations due to the previous cycle's state variables not yet being established. The input command constraint coordination module performs the final amplitude and constraint adjustment for the initial control frequency of the exhaust fan and the initial control opening degree of the air inlet window.
[0110] In step S70, the system uses the instruction constraint coordination module to verify the minimum ventilation volume, inverter operating frequency, static pressure difference inside and outside the breeding house, average wind speed at the air inlet, and single-cycle change of the actuator in the preliminary control instructions output by the air intake and exhaust control module. After correction according to the preset priority, the final control instructions are generated.
[0111] S701, the instruction constraint coordination module performs boundary verification between minimum ventilation volume and inverter operating frequency. The system reads the current number of pigs and the minimum ventilation volume setting for the corresponding growth stage, multiplying the two to obtain the minimum ventilation volume flow rate of the pig house. When the system is equipped with carbon dioxide or ammonia sensors, the minimum ventilation volume flow rate can also be increased according to the corresponding gas concentration.
[0112] The command constraint coordination module converts the minimum ventilation volume flow rate into the frequency corresponding to the minimum ventilation volume based on the exhaust fan performance data table. When the initial control frequency of the exhaust fan is lower than the frequency corresponding to the minimum ventilation volume, it is increased to that frequency; when the initial control frequency of the exhaust fan is higher than the maximum allowable operating frequency of the frequency converter, it is limited to the maximum allowable operating frequency. After the above limiting process, the command constraint coordination module generates a first-level corrected operating frequency.
[0113] S702, the instruction constraint coordination module adjusts the static pressure difference between the inside and outside of the breeding house and the average wind speed at the air inlet. In negative pressure mechanical ventilation mode, the exhaust fan's air volume and the effective flow area of the air inlet window jointly affect the static pressure difference between the inside and outside of the breeding house and the average wind speed at the air inlet. When the static pressure difference between the inside and outside of the breeding house exceeds the design range of the building and ventilation system, it will increase uncontrolled air leakage; when the average wind speed at the air inlet exceeds the on-site calibration range, it will affect the air jet and mixing state inside the house.
[0114] The instruction constraint coordination module estimates the exhaust volume based on the first-level correction operating frequency, and, in conjunction with the initial control opening of the air inlet window, the effective flow area of the air inlet window, and the air density, estimates the static pressure difference inside and outside the pigsty and the average wind speed at the air inlet for the next control cycle. The average wind speed at the air inlet is the average air velocity on the effective flow cross section of the air inlet window, which is not the same as the air velocity in the pigs' activity area, and therefore is not directly compared with the air velocity limit in the pigs' activity area.
[0115] When the estimated static pressure difference between the inside and outside of the breeding house in the next control cycle is greater than the preset upper limit of static pressure difference, the instruction constraint coordination module prioritizes increasing the opening of the air inlet window; when the air inlet window has reached the maximum allowable opening and the estimated static pressure difference between the inside and outside of the breeding house in the next control cycle still exceeds the upper limit, the operating frequency of the exhaust fan is reduced under the condition that it is not lower than the frequency corresponding to the minimum ventilation volume; when the exhaust fan has been reduced to the frequency corresponding to the minimum ventilation volume and the static pressure difference still exceeds the upper limit, the system outputs an alarm for blocked air inlet channel or abnormal ventilation resistance.
[0116] After satisfying the static pressure difference constraint inside and outside the breeding shed, if the estimated average inlet velocity in the next control cycle exceeds the preset upper limit, the instruction constraint coordination module continues to increase the inlet window opening. When the inlet window has reached the maximum allowable opening and the estimated average inlet velocity in the next control cycle still exceeds the upper limit, the exhaust fan operating frequency is reduced, provided it is not lower than the frequency corresponding to the minimum ventilation volume. After the above adjustments, a secondary corrected operating frequency and a secondary corrected inlet window opening are generated.
[0117] S703 executes control command rate limiting and command issuance. The command constraint coordination module reads the actual operating frequency of the exhaust fan and the current actual opening of the air inlet window from the previous control cycle, and calculates the difference between the secondary corrected operating frequency and the actual operating frequency, and the difference between the secondary corrected air inlet window opening and the actual opening, respectively.
[0118] The instruction constraint coordination module sets the maximum frequency change of the exhaust fan per cycle based on the inverter's allowable acceleration and deceleration rates, and sets the maximum opening change of the air inlet window per cycle based on the actuator stroke and operating speed. When the frequency difference or opening difference exceeds the corresponding limit, the difference is limited. The limited increment is added to the current actual state to generate the final control frequency of the exhaust fan and the final control opening of the air inlet window.
[0119] The command constraint coordination module sends the final control frequency of the exhaust fan and the final control opening of the air inlet window to the exhaust fan frequency converter and the air inlet window electric actuator, respectively, through the analog output module, digital output module, or industrial communication bus. After the actuators move, the system enters the next control sampling cycle.
[0120] When the system is in transition control mode, steps S20 to S70 continue to be executed in the next control sampling cycle; when the system is in normal control mode, step S20 and normal negative pressure ventilation control are executed; when the system is in open operation mode, step S20, equipment status monitoring and grazing prohibition meteorological threshold monitoring are executed, steps S30 to S70 are not executed, and the cumulative thermal environment adaptation index recursive update is suspended; when the system is in closed recovery mode, the recovery control specified in step S104 is executed; when the system is in fault control mode, the fault control specified in step S105 is executed.
[0121] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these specific embodiments are merely illustrative. Those skilled in the art can omit, substitute, and modify the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, combining the above method steps to perform substantially the same function and achieve substantially the same result using substantially the same method falls within the scope of the present invention.
Claims
1. A health management method for regulating the internal and external environment of a natural black pig breeding shed, characterized in that, include: Obtain indoor air enthalpy, outdoor air enthalpy, and the rate of change of outdoor air enthalpy; The outdoor air mixing weight is determined based on the exhaust fan operating parameters and the static pressure difference between the inside and outside of the breeding house. The indoor air enthalpy value and the outdoor air enthalpy value are weighted and calculated using the outdoor air mixing weight to obtain the equivalent exposed air enthalpy value. Based on the deviation of the equivalent exposed air enthalpy value from the preset suitable air enthalpy value range, a cumulative thermal environment adaptability index is generated. The short-time extrapolation value of outdoor air enthalpy is obtained based on the outdoor air enthalpy and the rate of change of outdoor air enthalpy, and the target enthalpy is generated by combining it with the cumulative thermal environment adaptability index. Based on the target enthalpy value, the adjustment amount of the feedforward opening of the air inlet window and the adjustment amount of the feedback frequency of the exhaust fan are calculated, control commands are generated and sent to the air inlet window actuator and the exhaust fan frequency converter.
2. The health management method for regulating the internal and external environment of the original ecological black pig breeding shed according to claim 1, characterized in that, The steps for obtaining indoor air enthalpy, outdoor air enthalpy, and the rate of change of outdoor air enthalpy include: Read the measurement values of indoor and outdoor sensors, extract the effective dry-bulb temperature and relative humidity after outlier processing to derive the air moisture content, calculate and use low-pass filtering to obtain the indoor air enthalpy value and the outdoor air enthalpy value; Calculate the rate of change of outdoor air enthalpy value in adjacent sampling periods. When the absolute value of the rate of change of outdoor air enthalpy value is less than a preset dead zone threshold, the rate of change of outdoor air enthalpy value is cleared to zero, thus obtaining the rate of change of outdoor air enthalpy value after dead zone processing.
3. The health management method for regulating the internal and external environment of the original ecological black pig breeding shed according to claim 1, characterized in that, The steps to obtain the equivalent enthalpy of exposed air include: The actual operating frequency of the exhaust fan is obtained as the operating parameter of the exhaust fan. The mechanical ventilation volume flow rate is obtained by interpolation in the pre-stored exhaust fan performance data table in combination with the static pressure difference inside and outside the breeding house, and the mechanical ventilation volume is calculated. Obtain the preset equivalent mixed air volume of the breeding house, and determine the outdoor air mixing weight based on the mechanical ventilation volume and the equivalent mixed air volume of the breeding house; The equivalent exposed air enthalpy is obtained by weighting the indoor air enthalpy with the outdoor air enthalpy using the outdoor air mixing weight.
4. The health management method for regulating the internal and external environment of the original ecological black pig breeding shed according to claim 1, characterized in that, The steps for generating the cumulative thermal adaptation index include: The equivalent exposed air enthalpy value is subtracted from the lower limit and upper limit of the suitable air enthalpy value range, respectively, and the single-cycle enthalpy value deviation in the high enthalpy direction and the low enthalpy direction is extracted. The single-cycle enthalpy deviation is divided into non-exceeding deviation and exceeding deviation according to a preset medium deviation upper limit, and the change range of non-exceeding deviation in adjacent cycles is calculated. The non-exceeding deviation, the variation range of the non-exceeding deviation, and the exceeding deviation are respectively processed by exponential weighted moving average and normalized to generate the cumulative thermal environment adaptation index.
5. The health management method for regulating the internal and external environment of the original ecological black pig breeding shed according to claim 1, characterized in that, The steps for generating the target enthalpy value include: The rate of change of outdoor air enthalpy is limited to a preset range, and a first-order linear extrapolation is performed on the outdoor air enthalpy to obtain the short-time extrapolated value of the outdoor air enthalpy. The allowable indoor-outdoor enthalpy difference is calculated based on the cumulative thermal environment adaptability index. The rate of change constraint interval is constructed using the target enthalpy value of the previous period, the allowable range of the pig herd environment is constructed using the pig herd information, and the indoor-outdoor enthalpy difference constraint interval is constructed using the short-time extrapolated value of the outdoor air enthalpy value and the allowable indoor-outdoor enthalpy difference. The intersection of the rate of change constraint interval, the allowable interval of the pig herd environment, and the indoor-outdoor enthalpy difference constraint interval is used to generate the feasible interval of the target enthalpy value.
6. The health management method for controlling the internal and external environment of the original ecological black pig breeding shed according to claim 5, characterized in that, The steps for generating the target enthalpy value also include: The candidate target enthalpy value is calculated based on the grazing transition progress coefficient, the short-time extrapolation of the outdoor air enthalpy value, and the indoor air enthalpy value; When the candidate target enthalpy value is within the feasible range of the target enthalpy value, the candidate target enthalpy value is taken as the target enthalpy value for the current period; When the candidate target enthalpy value exceeds the feasible range of the target enthalpy value, the candidate target enthalpy value is restricted to the nearest boundary of the feasible range of the target enthalpy value and used as the target enthalpy value.
7. The health management method for regulating the internal and external environment of the original ecological black pig breeding shed according to claim 1, characterized in that, The steps for calculating the feedforward opening adjustment of the air inlet window include: Calculate the deviation between the target enthalpy value and the target enthalpy value of the indoor air; The effectiveness of ventilation regulation is determined by comparing the direction of the deviation of the target enthalpy value with the direction of the difference between the short-term extrapolated value of the outdoor air enthalpy value and the indoor air enthalpy value. The feedforward gain of the air inlet window is tuned using the cumulative thermal environment adaptability index. The air inlet window movement direction coefficient is determined based on the ventilation regulation effectiveness. The absolute value of the feedforward gain of the air inlet window, the air inlet window movement direction coefficient, and the change rate of outdoor air enthalpy are multiplied together to obtain the feedforward opening adjustment amount of the air inlet window.
8. The health management method for regulating the internal and external environment of the original ecological black pig breeding shed according to claim 7, characterized in that, The steps for calculating the feedback frequency adjustment of the exhaust fan include: Based on the determination result of the ventilation regulation effectiveness, the direction of the target enthalpy deviation is reversed to obtain the effective feedback deviation of the exhaust fan; Incremental proportional-integral-derivative control is used to process the effective feedback deviation of the exhaust fan, and the adjustment amount of the exhaust fan feedback frequency is calculated.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions; when the computer instructions are executed in a computing device, they cause the computing device to perform the method of any one of claims 1-8.
10. A computer program product, characterized in that, When the computer program product is run in a computing device, it causes the computing device to perform the method of any one of claims 1-8.
