A pig house environment linkage control system coupling the growth environment of a lactating sow and piglets

CN122963272APending Publication Date: 2026-10-23TROPICAL CORP STRAIN RESOURCE INST CHINESE ACAD OF TROPICAL AGRI SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611450437.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0005]为了解决现有技术对于仔猪红外信息与背景加热垫信息无法有效分解,并且无法准确量化仔猪聚集情况,导致加热垫控制反馈不精准的技术问题,本发明的目的在于提供一种哺乳母猪和仔猪生长环境耦合的猪舍环境联动控制系统,所采用的技术方案具体如下:

Benefits of technology

本发明针对常规空气温度传感器物理测温严重滞后且母子环境需求冲突的问题,本发明通过分析当前监测周期内的饲料消耗量与饮水消耗量,提取母猪的水料消耗比。系统跳过了空气温度反馈环节,直接将反映母猪热应激代谢的前馈指标与仔猪躯体聚集程度相融合,计算出仔猪环境热量补偿值,并通过PID控制器精准控制加热垫功率,实现了母猪降温需求与仔猪保温需求的深度耦合。针对底层加热垫升温导致常规图像阈值分割失效的问题,本发明通过整合拼接连续多帧热力矩阵,并执行主成分分解,利用时空分布特性直接剥离了加热垫的大面积背景热量,从而在复杂的辐射环境中精准提取出纯净的仔猪热源矩阵,有效排除了底层加热源的干扰。本发明在提取仔猪聚集区域后,建立了节点分布拓扑图,通过拓扑图内部的节点聚集度分析来量化躯体聚集程度。该方式将图像面积识别转化为图论连通性计算,大幅提升了聚集状态判定的抗干扰能力与数值稳定性。综上,本发明基于母猪生理前馈特征与仔猪红外拓扑特征的有效融合,实现了猪舍局部微环境热量流失与底层热能补偿的即时动态平衡。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963272A_ABST
    Figure CN122963272A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of control system, and particularly relates to a pig house environment linkage control system for coupling the growth environment of lactating sows and piglets. The system obtains the feed and water consumption of sows to calculate the water-feed consumption ratio of sows; obtains continuous multiple frames of heat matrices of piglet areas and integrates and splices them, and obtains a piglet heat source matrix by stripping the heat of heating pads through principal component decomposition; extracts the piglet aggregation area in the heat source matrix and establishes a node distribution topology graph, and obtains the body aggregation degree of piglets through node aggregation degree analysis; finally, the piglet environment heat compensation value is determined according to the water-feed consumption ratio and the body aggregation degree, and a PID controller is used to control the power of the heating pad. The present application effectively overcomes the temperature monitoring lag and background floor radiation interference, and realizes the precise heat compensation of local microenvironment by combining the physiological feedforward of sows and the graph theory characteristics of piglets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of control system technology, specifically to a pigsty environment linkage control system that couples the growth environment of lactating sows and piglets. Background Technology

[0002] In large-scale pig breeding facilities, lactating sows and newborn piglets share the same farrowing pen. Lactating sows have a high metabolic rate during lactation, and to avoid heat stress, their ideal ambient temperature is typically between 18 and 22 degrees Celsius. Newborn piglets, however, have less subcutaneous fat and their thermoregulatory centers are not fully developed, requiring a localized environment of 29 to 33 degrees Celsius to maintain their body temperature. Thus, despite sharing the same space, their temperature requirements differ significantly.

[0003] Existing environmental control systems typically employ independent single-loop feedback logic, placing fans above the sow for cooling and heating pads at the bottom of the piglet area for insulation. However, when the sow triggers the cooling fans due to heat, the high-speed flow of cold air inevitably intrudes into the piglet area. Conventional air temperature sensors, due to the thermal inertia of their plastic casing and internal probe, experience a delay of several minutes in sensing a drop in local air temperature and generating an electrical signal change. During this waiting period, piglets quickly huddle together for warmth after the cold air enters; and traditional feedback systems only passively increase the heating power at the bottom after the thermometer reading actually drops, causing piglets to repeatedly suffer from adverse environmental conditions.

[0004] To address the issue of temperature measurement lag, existing technologies incorporate visual recognition to assess piglet crowding. However, in the high-dust environment of pigsties, optical camera lenses are easily contaminated and have high maintenance costs. Switching to low-cost infrared thermal imaging sensors presents new technical bottlenecks: the heating pads at the bottom of the piglets heat up gradually over a large area during operation, and this background radiation overlaps with the actual radiation from the piglets' bodies, causing conventional static image thresholding methods to fail. Furthermore, conventional area thresholding or coordinate variance methods are easily affected by isolated piglets or environmental noise when assessing crowding; when piglets begin to disperse, these algorithms cannot provide a clear numerical cutoff point, leading to system delays and potentially causing overheating due to the bottom heating pads operating at full power. Summary of the Invention

[0005] To address the technical problems of existing technologies that cannot effectively decompose infrared information of piglets and background heating pad information, and cannot accurately quantify piglet aggregation, leading to inaccurate heating pad control feedback, the present invention aims to provide a pigsty environment linkage control system that couples the growth environment of lactating sows and piglets. The specific technical solution adopted is as follows: This invention eliminates a pigsty environment linkage control system that couples the growth environments of lactating sows and piglets, the system comprising: The sow water and feed consumption characteristic analysis module is used to obtain the amount of feed and water consumed in the sow's feed trough during the current monitoring period, and to obtain the sow's water and feed consumption ratio based on the amount of feed and water consumed. The piglet infrared information analysis module is used to obtain a continuous multi-frame thermal matrix of the piglet area under the current monitoring period; after integrating and splicing all thermal matrices, principal component decomposition is performed to obtain the piglet heat source matrix stripped of the heating pad heat. The piglet body aggregation degree quantification module is used to extract the piglet aggregation region from the piglet heat source matrix and establish a node distribution topology map of the piglet aggregation region; and to perform node aggregation degree analysis in the node distribution topology map to obtain the piglet body aggregation degree. The piglet environmental heat compensation module is used to obtain the piglet environmental heat compensation value based on the water-feed consumption ratio and the degree of piglet body aggregation, and to use a PID controller to control the power of the heating pad based on the piglet environmental heat compensation value.

[0006] Furthermore, the sow water and feed consumption characteristic analysis module also includes a manual feeding detection unit, which executes the following algorithm: Obtain the feed weight curve in the current monitoring period. The extreme points in the feed weight curve divide the feed weight curve into the first increasing curve segment and the first decreasing curve segment. The first increasing curve segment is identified as the first artificial feeding stage. Obtain the drinking water volume curve for the current monitoring period. The extreme points in the drinking water volume curve divide the drinking water volume curve into a second increasing curve segment and a second decreasing curve segment. The second increasing curve segment is identified as the second artificial feeding stage.

[0007] Furthermore, the method for integrating and splicing the thermal matrix includes: Each frame's heatmap is flattened into a sequence and forms a column vector; the column vectors of the flattened heatmaps of all frames are concatenated in chronological order to obtain the integrated matrix.

[0008] Furthermore, the principal component decomposition algorithm employs the principal component tracking algorithm to perform convex optimization decomposition operations on the integrated matrix.

[0009] Furthermore, the method for obtaining the piglet pyrogen matrix includes: The integrated matrix is ​​decomposed into a background smoothing temperature matrix and a mutation heat source feature matrix. In the mutation heat source feature matrix, the column vector corresponding to the last frame is restored to matrix form to obtain the piglet heat source matrix.

[0010] Furthermore, the method for obtaining the node distribution topology map includes: For any two nodes in the piglet gathering area, if the distance between the two nodes is within a preset distance range, an edge is constructed between the two nodes; all node combinations are traversed to construct a distribution matrix, where the rows and columns of the distribution matrix represent the node indices in the piglet gathering area, and the element values ​​represent whether there is an edge between the node combinations, with an element value of 1 indicating the existence of an edge and an element value of 0 indicating the absence of an edge; the distribution matrix is ​​used as the node distribution topology graph.

[0011] Furthermore, the method for obtaining the degree of aggregation of the piglet bodies includes: A spectral graph partitioning algorithm is used to divide the node distribution topology graph. The algebraic connectivity obtained is used as the numerator, and the total number of nodes is used as the denominator to obtain the degree of aggregation of the piglet body.

[0012] Furthermore, the method for obtaining the environmental heat compensation value for piglets includes: The water-to-feed consumption ratio data is smoothed using a logarithmic function. A gain coefficient is obtained based on the smoothing result. The gain coefficient is then used to increase the degree of aggregation of the piglets' bodies to obtain the environmental heat compensation value for the piglets.

[0013] Furthermore, the step of using a PID controller to control the power of the heating pad based on the piglet's environmental heat compensation value includes: The environmental heat compensation value for piglets is used as an error term, and the duty cycle compensation component is obtained using the classic positional PID formula. The sum of the duty cycle compensation component and the preset base power is used as the initial target output power; if the initial target output power is greater than the rated maximum power of the heating pad, the rated maximum power of the heating pad is used as the final target output power; otherwise, the initial target output power is used as the final target output power for power control.

[0014] Furthermore, the method of obtaining the duty cycle compensation component using the classical positional PID formula also includes integral limiting and boundary protection logic: If the integral term in the classic positional PID formula is greater than the preset maximum integral term threshold, then the integral term is set to the maximum integral term threshold; if the piglet environmental heat compensation value in the current monitoring period is continuously less than the piglet environmental heat compensation value in the previous preset number of monitoring periods, or if the piglet environmental heat compensation value in the current monitoring period is equal to zero, then the integral term is cleared to zero and accumulation starts again.

[0015] The present invention has the following beneficial effects: This invention addresses the significant lag in physical temperature measurement by conventional air temperature sensors and the conflict between the sow's and piglet's environmental needs. By analyzing feed and water consumption during the current monitoring period, the system extracts the sow's feed-water ratio. The system bypasses the air temperature feedback loop, directly integrating feedforward indicators reflecting the sow's heat stress metabolism with the piglet's body aggregation level to calculate the piglet's environmental heat compensation value. A PID controller precisely controls the heating pad power, achieving deep coupling between the sow's cooling needs and the piglet's insulation needs. To address the issue of conventional image thresholding failing due to the heating pad's rising temperature, this invention integrates and splices multiple consecutive thermal matrices and performs principal component decomposition. Utilizing spatiotemporal distribution characteristics, it directly removes large areas of background heat from the heating pad, accurately extracting a pure piglet heat source matrix in a complex radiation environment, effectively eliminating interference from the underlying heating source. After extracting the piglet aggregation area, the invention establishes a node distribution topology graph and quantifies the body aggregation level through node aggregation degree analysis within the topology graph. This method transforms image area recognition into graph connectivity calculation, significantly improving the anti-interference capability and numerical stability of aggregation state determination. In summary, this invention achieves an instantaneous dynamic balance between heat loss in the local microenvironment of the pig house and heat compensation at the bottom layer by effectively integrating the physiological feedforward characteristics of sows and the infrared topographic characteristics of piglets. Attached Figure Description

[0016] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a block diagram of a pigsty environment linkage control system that couples the growth environment of lactating sows and piglets, as provided in one embodiment of the present invention. Detailed Implementation

[0018] The following description, in conjunction with the accompanying drawings, details the specific scheme of a pigsty environment linkage control system that couples the growth environments of lactating sows and piglets, provided by this invention.

[0019] Please see Figure 1 The diagram illustrates a structural block diagram of a pigsty environment linkage control system that couples the growth environment of lactating sows and piglets according to an embodiment of the present invention. The system includes: a sow water and feed consumption characteristic analysis module 101, a piglet infrared information analysis module 102, a piglet body aggregation degree quantification module 103, and a piglet environmental heat compensation module 104.

[0020] The sow water and feed consumption characteristic analysis module 101 first analyzes the sow's feeding status by obtaining the feed consumption and water consumption in the sow's trough during the current monitoring period. Based on these figures, the sow's water-feed consumption ratio is calculated. A higher water-feed consumption ratio indicates more severe heat sweating in the sow during the fixed monitoring period. This suggests that the pigsty ventilation and cooling system is paying closer attention to the sow's condition. Activating the ventilation and cooling system increases the risk of cold air intruding into the piglet area, thus indicating a higher priority for the bottom heating pad to provide thermal compensation.

[0021] In this embodiment of the invention, the sow water and feed consumption characteristic analysis module 101 receives real-time electrical signals from the sow feed trough weighing sensor and the water pipeline flow meter. It determines the water and feed consumption ratio through the quantitative information represented by the signals. This ratio is locked in shared memory and invoked in the downstream piglet environmental heat compensation module 104 to obtain the piglet environmental heat compensation value for the current monitoring cycle. The system implements a cross-cycle value retention mechanism for the shared memory address. Before the next monitoring cycle ends and a new calculation result is generated, the system forces the water and feed consumption ratio in the shared memory to remain unchanged. Through this data retention mechanism, downstream independent image processing steps, operating at a high frequency (seconds), can directly obtain valid and stable feedforward parameters at any time when initiating a read request. This effectively overcomes the data loss problem caused by the difference in sampling frequency between minute-level metabolic monitoring and second-level image control.

[0022] In one specific implementation, the length of the monitoring cycle can be set to 1.5 hours. At the beginning of the monitoring cycle, the weighing sensor at the bottom of the sow's feed trough is read to obtain the initial weight, and the flow meter of the drinking water pipeline is read to obtain the initial volume. At the end of the monitoring cycle, the feed consumption and water consumption in the sow's feed trough are recalculated to obtain the amount of feed consumed and water consumed in the sow's feed trough during the monitoring cycle.

[0023] Preferably, in some implementations of the present invention, considering that manual feeding may occur during the monitoring period, the consumption amount obtained by comparing the data between the start and end times of the period will not be accurate, and may even result in a negative number. Therefore, the sow water and feed consumption characteristic analysis module further includes a manual feeding detection unit, which executes the following algorithm: Obtain the feed weight curve in the current monitoring period. The extreme points in the feed weight curve divide the feed weight curve into the first increasing curve segment and the first decreasing curve segment. The first increasing curve segment is identified as the first artificial feeding stage. Obtain the drinking water volume curve for the current monitoring period. The extreme points in the drinking water volume curve divide the drinking water volume curve into a second increasing curve segment and a second decreasing curve segment. The second increasing curve segment is identified as the second artificial feeding stage.

[0024] In the above process, because the feeding stage results in a continuous increase in feed weight or water volume, the increasing segment in the entire curve corresponds to the artificial feeding stage. Therefore, throughout the entire monitoring period, the feed consumption and water consumption can be obtained by statistically analyzing the integral results of the decreasing segment. It should be noted that the specific extreme point extraction process, integration process, etc., are all basic mathematical operations and will not be elaborated here.

[0025] In the specific implementation of this invention, considering that feed consumption and water consumption have different dimensions, it is necessary to convert water consumption to weight units (by multiplying by density) and then divide feed consumption by water consumption to obtain the water-feed consumption ratio. To prevent frequent calculation errors caused by the system continuously monitoring even when there is no water consumption in the pigsty at night or in other extreme situations, if water consumption is detected to be 0, the data in that monitoring period can be directly considered meaningless, and no further processing by subsequent modules will be performed.

[0026] The piglet infrared information analysis module 102 receives real-time two-dimensional temperature data from the infrared thermopile array above the piglet area. This two-dimensional temperature data is represented by an infrared image, which can be considered as a matrix, i.e., the thermal matrix described in this embodiment of the invention. A set of thermal matrices can be obtained by acquiring multiple consecutive frames. In a specific implementation of this embodiment, the number of frames for acquiring the thermal matrix is ​​set to 30.

[0027] This invention takes into account the real-world environment of a pigsty, where, after the bottom heating pad is turned on, the infrared radiation on its surface is characterized by a large area, global distribution, and slow heating. Conversely, the piglet's body (whether active or resting) occupies a very small space in the entire infrared monitoring field of view, and the temperature is concentrated in localized areas, which corresponds to a significant sparsity feature in the matrix structure. Therefore, the two have significant compositional differences, so principal component decomposition (PCD) can be used to divide the extracted infrared information into heating pad background temperature information and individual piglet temperature information, thereby obtaining a piglet heat source matrix stripped of heating pad heat. Since the obtained thermal matrix is ​​a continuous frame, the thermal matrices of all frames should be integrated and spliced ​​during PCD to obtain a complete overall processing object using PCD.

[0028] Preferably, in some implementations of the embodiments of the present invention, the method for integrating and splicing the thermal matrix includes: Each frame's heatmap is flattened into a sequence and forms a column vector; the column vectors of the flattened heatmaps of all frames are concatenated in chronological order to obtain the integrated matrix.

[0029] Furthermore, the integrated matrix can be decomposed using the Principal Component Pursuit (PCP) algorithm. Specifically, the objective function can be iteratively solved using the alternating direction multiplier method or the augmented Lagrange multiplier method, outputting a background smoothing temperature matrix and abrupt heat source feature matrix. The background smoothing temperature matrix is ​​a low-rank matrix representing a slowly varying heating background, and the abrupt heat source feature matrix is ​​a sparse matrix representing pure live organism features. Through this decomposition, the pure piglet heat source matrix can be accurately extracted from a complex radiation environment, effectively eliminating interference from underlying heat sources. It should be noted that the above-mentioned principal component pursuit algorithm is a technique well-known to those skilled in the art, and its specific algorithm content will not be elaborated upon.

[0030] Since the integration matrix involves splicing multiple frames of thermal matrices during the above process, the resulting abrupt change heat source feature matrix is ​​also a spliced ​​result. Therefore, the column vector corresponding to the last frame can be restored to matrix form to obtain the piglet heat source matrix. That is, this piglet heat source matrix represents the thermal data of the latest frame in the current monitoring period. It should be noted that this piglet heat source matrix may contain a small number of negative overflow values, which can be directly assigned the value 0.

[0031] Although the piglet heat source matrix is ​​the result after removing the influence of background heating pad heat, in the actual environment, there is still sparse heat information such as that from lighting fixtures in the piglet heat source matrix. Since this noise information is usually more dispersed, while the piglet aggregation areas are relatively concentrated, the piglet body aggregation degree quantification module 103 further extracts the piglet aggregation areas from the piglet heat source matrix. Targeted analysis is then performed on these piglet aggregation areas in subsequent processing.

[0032] In a specific implementation, the entire piglet heat source matrix can be traversed to find all nodes with values ​​greater than zero. If the number of such nodes is less than a preset threshold, it indicates that there is no monitored target within the infrared field of view, or that the area is completely dark due to device obstruction. In this case, the piglet gathering area can be directly set to 0, and the control operation can be terminated. The threshold value can be set according to the field of view of the infrared device; in this specific implementation of the present invention, it can be set to 10.

[0033] If the number of such nodes exceeds a threshold, connected component analysis can be performed to obtain multiple connected blocks. Blocks with an area smaller than the noise area threshold are discarded; these blocks are considered free noise points at the edge of the infrared image or isolated piglets that have briefly passed by, and should not be subject to clustering analysis. The remaining connected blocks are considered piglet clustering areas. If the number of remaining connected blocks is less than or equal to 1, the number of piglet clustering areas can be set to 0, indicating that further clustering analysis is meaningless, and the control operation is terminated. The noise area threshold can be set to 5 pixels.

[0034] In order to effectively analyze the degree of piglet aggregation, the piglet body aggregation degree quantification module 103 establishes a node distribution topology map of the piglet aggregation area. This topology map represents the adjacency of each node in the piglet aggregation area. The connection relationship of the nodes can significantly represent the aggregation characteristics. Therefore, node aggregation degree analysis can be performed in the node distribution topology map to obtain the degree of piglet body aggregation.

[0035] Preferably, in some implementations of the present invention, the node distribution topology graph adopts an eight-connected topology graph structure. That is, for any two nodes in the piglet gathering area, if the distance between the two nodes is within a preset distance range, an edge is constructed between the two nodes. This preset distance range is the eight-neighborhood. If two nodes are within each other's eight-neighborhood, an edge is constructed. Traversing all node combinations yields an N×N distribution matrix, where N is the number of nodes in the piglet gathering area. That is, the rows and columns in the distribution matrix represent the node indices in the piglet gathering area, and the element values ​​represent whether there is an edge between node combinations. An element value of 1 indicates the existence of an edge, and an element value of 0 indicates the absence of an edge. The distribution matrix is ​​used as the node distribution topology graph.

[0036] Further, a spectral graph partitioning algorithm can be applied to the node distribution topology. The resulting algebraic connectivity is used as the numerator, and the total number of nodes is used as the denominator to obtain the degree of piglet body aggregation. According to graph theory properties, the number of eigenvalues ​​of the Laplace matrix that are 0 equals the number of connected components in the topology. When piglets disperse to form two or more independent, unconnected body blocks, the full-view topology breaks into multiple connected components, and the second smallest eigenvalue converges to 0. This serves as the cutoff boundary for determining the elimination of piglet crowding behavior. The above ratio form normalizes the algebraic connectivity. Since piglets vary in size at different ages, the effective node base varies. Dividing by the total number of nodes can eliminate the influence of numerical base caused by differences in body size and area, extracting the pure spatial distribution crowding ratio. The greater the degree of piglet body aggregation, the more edges connect the nodes, and the more severe the piglet huddling and squeezing phenomenon is on site.

[0037] The spectral partitioning algorithm is a well-known technique in the art, and its brief process is as follows: The elements of each row of the distribution matrix are summed. The sum represents the number of neighboring nodes connected to each node, i.e., the node degree. These degrees are arranged sequentially on the diagonal, with zeros padded in the remaining positions to form a degree matrix. The distribution matrix is ​​subtracted from the degree matrix to obtain the Laplace matrix. The eigenvalues ​​of the Laplace matrix are solved using the Lanczos iterative algorithm, and the second smallest eigenvalue is the algebraic connectivity. The specific algorithm is a well-known technique in the art and will not be elaborated upon here.

[0038] The piglet environmental heat compensation module 104 ultimately receives the water-to-feed ratio and the degree of piglet body aggregation, integrates the two features to obtain the piglet environmental heat compensation value representing the environmental heat gap, and then performs power control through the PID controller.

[0039] Preferably, in some implementations of the present invention, the method for obtaining the environmental heat compensation value for piglets includes: The water-to-feed consumption ratio data is smoothed using a logarithmic function. A gain coefficient is obtained based on the smoothing result. This gain coefficient is then used to amplify the piglet's body aggregation level, resulting in the piglet's environmental heat compensation value. This is expressed by the formula: ; in, This represents the environmental heat compensation value for piglets. The degree of aggregation of piglets' bodies. Let ln be the water-to-material consumption ratio, and ln be a logarithmic function with the natural constant as the base.

[0040] In the above formula, Able to guarantee when When the logarithm is 0, the logarithmic calculation is valid and the result is 0. (This is achieved through...) This ensures that under normal heat preservation conditions where the sow does not trigger a surge in water consumption (i.e., the water-to-feed ratio is 0), the multiplier factor within the brackets is 1. This indicates that no additional gain is needed to improve piglet body aggregation, avoiding a dead loop caused by a zero multiplier factor leading to control loop failure. The logarithmic function acts as a smoothing penalty to suppress... At its maximum, this results in excessively high power spikes. The multiplicative term represents the system using the sow's metabolic heat index as a feedforward weight, directly injecting and amplifying the penalty for overcrowding in the piglet space. The larger the final piglet environmental heat compensation value, the more severe the heat deficit caused by the cold air convection within the farrowing pen microenvironment and the heat lost due to the piglets squeezing against each other, indicating that the system needs to immediately increase the heat output of the bottom heating pad.

[0041] Preferably, in some implementations of the present invention, the step of using a PID controller to control the power of the heating pad based on the piglet's environmental heat compensation value includes: The ideal steady-state environment heat compensation value for piglets is considered to be 0. Therefore, in PID control, the piglet environment heat compensation value can be directly used as the error term, and the duty cycle compensation component can be obtained using the classic positional PID formula. This classic positional PID formula is a technique well-known to those skilled in the art. The formula mainly consists of the sum of three products: the proportional term reflects the immediate severity of the current environmental heat deficit; the integral term, through discrete accumulation of historical compensation values, is used to eliminate long-term, continuous steady-state cold stress errors; and the derivative term, through the difference between the current compensation value and the compensation value of the previous processing cycle, reflects the trend of crowding changes to suppress power overshoot. The specific formula is not shown here, as it is a technique well-known to those skilled in the art.

[0042] The sum of the duty cycle compensation component and the preset base power is used as the initial target output power. If the initial target output power is greater than the rated maximum power of the heating pad, it indicates that the calculation result exceeds the limit, and the rated maximum power of the heating pad is used as the final target output power. Otherwise, the initial target output power is used as the final target output power for power control. The final target output power is then converted into a pulse width modulation (PWM) signal with alternating high and low levels and sent to the solid-state relay of the bottom heating pad. The larger the PWM duty cycle, the longer the conduction time of the solid-state relay within one cycle, and the more heat energy is output by the bottom heating pad. This precisely counteracts the cold airflow from the sow end, prompting the piglets to lie flat evenly and achieving dynamic balance of the local thermal environment. It should be noted that the rated maximum power of the heating pad is the factory rated data and can be directly retrieved without additional data acquisition.

[0043] Furthermore, in some implementations of this invention, to prevent the continuous operation of the high-power server-side fan from causing the environmental heat compensation value for piglets to remain high for an extended period, thereby leading to PID integral term runaway (integral saturation), the duty cycle compensation component obtained using the classic positional PID formula is further included, along with integral limiting and boundary protection logic: If the integral term in the classic positional PID formula exceeds the preset maximum integral term threshold, it indicates that the long-term intrusion of cold air has led to excessive accumulation of historical errors, posing a risk of overheating due to integral saturation and the inability of the heating pad power to decrease when piglets disperse. In this case, the integral term is set to the maximum integral term threshold. If the piglet environmental heat compensation value in the current monitoring period is continuously less than the piglet environmental heat compensation value in the previous preset number of monitoring periods, or if the piglet environmental heat compensation value in the current monitoring period is equal to zero, it indicates that the cold stress phenomenon has been truly alleviated and the piglets have begun to disperse stably. The system needs to immediately return to the basic heat preservation state, and the integral term is cleared to zero and accumulation begins again. The maximum integral term threshold can be set to 1000; the preset number can be set to 3, meaning a continuous decrease for three consecutive monitoring periods.

[0044] In summary, this invention obtains the feed and water consumption of sows to calculate the sow's feed-water ratio; acquires and integrates multiple consecutive frames of thermal matrix data from the piglet region; and obtains the piglet heat source matrix by stripping the heat from the heating pad through principal component decomposition. Piglet aggregation areas are extracted from the heat source matrix, and a node distribution topology map is established. The degree of piglet body aggregation is obtained through node aggregation degree analysis. Finally, the environmental heat compensation value for piglets is determined based on the feed-water ratio and the degree of body aggregation, and the power of the heating pad is controlled using a PID controller. This invention effectively overcomes temperature monitoring lag and background floor radiation interference, and achieves precise thermal compensation of the local microenvironment by combining sow physiological feedforward and piglet graph theory characteristics.

Claims

1. A pigsty environment linkage control system that couples the growth environment of lactating sows and piglets, characterized in that, The system includes: The sow water and feed consumption characteristic analysis module is used to obtain the amount of feed and water consumed in the sow's feed trough during the current monitoring period, and to obtain the sow's water and feed consumption ratio based on the amount of feed and water consumed. The piglet infrared information analysis module is used to obtain a continuous multi-frame thermal matrix of the piglet area under the current monitoring period; after integrating and splicing all thermal matrices, principal component decomposition is performed to obtain the piglet heat source matrix stripped of the heating pad heat. The piglet body aggregation degree quantification module is used to extract the piglet aggregation region from the piglet heat source matrix and establish a node distribution topology map of the piglet aggregation region; and to perform node aggregation degree analysis in the node distribution topology map to obtain the piglet body aggregation degree. The piglet environmental heat compensation module is used to obtain the piglet environmental heat compensation value based on the water-feed consumption ratio and the degree of piglet body aggregation, and to use a PID controller to control the power of the heating pad based on the piglet environmental heat compensation value.

2. The pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 1, characterized in that, The sow water and feed consumption characteristic analysis module also includes a manual feed addition detection unit, which executes the following algorithm: Obtain the feed weight curve in the current monitoring period. The extreme points in the feed weight curve divide the feed weight curve into the first increasing curve segment and the first decreasing curve segment. The first increasing curve segment is identified as the first artificial feeding stage. Obtain the drinking water volume curve for the current monitoring period. The extreme points in the drinking water volume curve divide the drinking water volume curve into a second increasing curve segment and a second decreasing curve segment. The second increasing curve segment is identified as the second artificial feeding stage.

3. The pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 1, characterized in that, The method for integrating and splicing the thermal matrix includes: Each frame's heatmap is flattened into a sequence and forms a column vector; the column vectors of the flattened heatmaps of all frames are concatenated in chronological order to obtain the integrated matrix.

4. The pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 3, characterized in that, The principal component decomposition algorithm employs the principal component pursuit algorithm to perform convex optimization decomposition operations on the integration matrix.

5. The pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 4, characterized in that, The method for obtaining the piglet heat source matrix includes: The integrated matrix is ​​decomposed into a background smoothing temperature matrix and a mutation heat source feature matrix. In the mutation heat source feature matrix, the column vector corresponding to the last frame is restored to matrix form to obtain the piglet heat source matrix.

6. The pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 1, characterized in that, The method for obtaining the node distribution topology map includes: For any two nodes in the piglet gathering area, if the distance between the two nodes is within a preset distance range, an edge is constructed between the two nodes; all node combinations are traversed to construct a distribution matrix, where the rows and columns of the distribution matrix represent the node indices in the piglet gathering area, and the element values ​​represent whether there is an edge between the node combinations, with an element value of 1 indicating the existence of an edge and an element value of 0 indicating the absence of an edge; the distribution matrix is ​​used as the node distribution topology graph.

7. The pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 6, characterized in that, The method for obtaining the degree of aggregation of the piglets' bodies includes: A spectral graph partitioning algorithm is used to divide the node distribution topology graph. The algebraic connectivity obtained is used as the numerator, and the total number of nodes is used as the denominator to obtain the degree of aggregation of the piglet body.

8. The pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 1, characterized in that, The method for obtaining the environmental heat compensation value for piglets includes: The water-to-feed consumption ratio data is smoothed using a logarithmic function. A gain coefficient is obtained based on the smoothing result. The gain coefficient is then used to increase the degree of aggregation of the piglets' bodies to obtain the environmental heat compensation value for the piglets.

9. The pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 1, characterized in that, The step of using a PID controller to control the power of the heating pad based on the piglet's environmental heat compensation value includes: The environmental heat compensation value for piglets is used as an error term, and the duty cycle compensation component is obtained using the classic positional PID formula. The sum of the duty cycle compensation component and the preset base power is used as the initial target output power; if the initial target output power is greater than the rated maximum power of the heating pad, the rated maximum power of the heating pad is used as the final target output power; otherwise, the initial target output power is used as the final target output power for power control.

10. A pigsty environment linkage control system for coupling the growth environment of lactating sows and piglets according to claim 9, characterized in that, The method of obtaining the duty cycle compensation component using the classic positional PID formula also includes integral limiting and boundary protection logic: If the integral term in the classic positional PID formula is greater than the preset maximum integral term threshold, then the integral term is set to the maximum integral term threshold; if the piglet environmental heat compensation value in the current monitoring period is continuously less than the piglet environmental heat compensation value in the previous preset number of monitoring periods, or if the piglet environmental heat compensation value in the current monitoring period is equal to zero, then the integral term is cleared to zero and accumulation starts again.