A method and system for on-line detection of stubble height of regenerated rice and dynamic regulation of header and a harvester
By using multi-sensor fusion and near-infrared imaging technology, combined with the improved YOLOv8-Pose algorithm and PID closed-loop control, the precise detection and dynamic control of the stubble height of ratooning rice were achieved. This solved the problems of unstable stubble height and insufficient accuracy in existing technologies, and improved the operating efficiency and yield of ratooning rice harvesters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU UNIV
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-26
AI Technical Summary
Existing combine harvesters for ratooning rice lack automatic control of the header height, resulting in unstable stubble height, which can easily damage dormant axillary buds and affect the yield of the second season. Furthermore, existing detection methods are not accurate enough in complex field environments and cannot adapt to the changing operational needs.
By employing a multi-sensor fusion method, near-infrared cameras are used to identify characteristic points of the roots and key stem nodes of rice plants. Combined with attitude sensor data, the dynamic control of the header is achieved through an improved YOLOv8-Pose algorithm and PID closed-loop control.
It improves the accuracy and stability of stubble height, protects dormant buds, adapts to complex field environments, and enhances operational efficiency and yield.
Smart Images

Figure CN122074291A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computer vision and agricultural machinery technology, and in particular relates to a method and system for online detection of stubble height and dynamic control of the header in ratooning rice, as well as a harvester. Background Technology
[0002] Ratoon rice is a rice cultivation model that allows for two harvests from a single planting. After the first rice harvest, appropriate cultivation and management practices encourage dormant axillary buds on the stubble to sprout into panicles, leading to a second heading, flowering, and grain filling. Traditionally, manual harvesting is used to increase the yield of the second season of ratoon rice, thereby improving the multiple cropping index. However, with my country's rapid economic and social development and the migration of young and middle-aged rural laborers to cities, ratoon rice combine harvesters have gradually become the main means of harvesting the first season of ratoon rice. Currently, most ratoon rice combine harvesters in China lack automatic header height control, relying on manual operation of hydraulic valves to adjust the stubble height. This method is not only labor-intensive but also makes it difficult to ensure the stability of the stubble height, easily damaging the dormant axillary buds of the ratoon rice, leading to delayed development and hindered growth, thus affecting the second season's yield and restricting the further expansion of ratoon rice cultivation. Furthermore, due to regional and varietal differences, the suitable stubble height for common ratoon rice varieties in my country is typically between 250mm and 400mm. Therefore, the header height needs to be adjusted accordingly for different regions and varieties. However, in the complex and ever-changing field operating environment, relying on operators to manually adjust the header height in real time places high demands on their experience and operational skills. Therefore, researching an online detection method for stubble height and dynamic control of the header in ratooning rice is a key issue that urgently needs to be addressed in the current research and application of ratooning rice combine harvesters, in order to protect dominant dormant buds and promote increased yield and income during the ratooning season.
[0003] In existing technologies, online detection and header control of stubble height in ratooning rice largely rely on single or combined sensing methods such as laser sensors, ultrasonic sensors, infrared sensors, or displacement sensors. For example, CN 119065304 A discloses a non-contact monitoring system based on laser sensors, tilt sensors, and displacement sensors. While this system achieves automatic header height adjustment to some extent, it lacks the ability to identify the stubble itself and is easily interfered with by non-target objects such as stems and leaves in the field. This results in a large amount of non-ground reflection signals in the measurement data, affecting the accuracy of height determination. Furthermore, such methods typically rely on complex multi-level filtering and data fusion algorithms to improve accuracy, leading to high system complexity, limited real-time performance, and strong dependence on sensor installation position and orientation, making it difficult to adapt to the dynamic operational needs of complex field environments.
[0004] For example, patent CN120476838A proposes a header control system that integrates visual detection and multi-angle sensors. It uses a deep convolutional neural network to extract feature points of the crop and the ground to construct terrain curves, thereby achieving contour-following control of the header. However, this type of method still has the following limitations: inaccurate feature extraction, lack of true target perception capability, and high reliance on indirect computation, making it difficult to meet the agronomical requirements for high-precision control of stubble height in ratooning rice.
[0005] For example, patent CN117291977A proposes a method for controlling the header of a rice harvester based on a binocular camera. It calculates three-dimensional information of the paddy field using binocular stereo vision and combines this with IMU sensors for attitude compensation to determine whether the rice has lodged, thereby adjusting the header height. However, this method primarily addresses the general problem of rice lodging detection, and its application to the specific scenario of controlling the stubble height of ratooning rice presents a limitation of functional mismatch.
[0006] Therefore, there is an urgent need for a direct measurement and dynamic control technology that has strong environmental adaptability and robustness, does not rely on complex data correction and filtering processes, has a faster system response, higher control accuracy, and is more suitable for deployment in highly dynamic and multi-interference field operation environments. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention provides a method and system for online detection of stubble height and dynamic control of the header in ratooning rice, as well as a harvester. This invention enables real-time and accurate identification of the biological characteristics of ratooning rice, height calculation based on multi-sensor fusion, and adaptive dynamic control of the header. It boasts high accuracy and robustness, effectively solving the problem of inaccurate stubble retention caused by changes in field lighting, machine posture vibrations, and uneven crop growth, thereby improving the accuracy of stubble retention in ratooning rice.
[0008] The present invention achieves the above-mentioned technical objectives through the following technical means.
[0009] A method for online detection of stubble height and dynamic control of the header in ratooning rice includes the following steps:
[0010] S1. Multi-source data acquisition: The image sensor installed at the front of the harvester header acquires images of the crop in front, and simultaneously acquires the harvester's attitude data and the physical height data of the header.
[0011] S2. Feature point extraction: The image from step S1 is processed to identify and obtain the root feature points and key stem node feature points of the rice plant.
[0012] S3. Height Calculation: Based on the root feature points and key stem node feature points from step S2, as well as the attitude data and image sensor parameters from step S1, calculate the absolute height of the key stem node relative to the ground.
[0013] S4. Target decision: Determine the target header height based on the absolute height above ground obtained in step S3 and the preset agronomic staking requirements.
[0014] S5. Closed-loop control: Based on the deviation between the target cutting height and the current cutting height in step S4, control the raising and lowering of the cutting table.
[0015] In the above scheme, in step S1, the image sensor is a near-infrared camera, used to acquire near-infrared images in a specific band; the attitude data is acquired by an attitude sensor; and the physical height data of the cutting platform is acquired by a height sensor.
[0016] In the above scheme, the specific wavelength band is 850nm; and / or, in step S2, a key point detection neural network is used to extract feature points, the neural network including an attention mechanism module for enhancing target feature extraction.
[0017] In the above scheme, the key point detection neural network is a YOLOv8-Pose network in which the CBAM attention mechanism module is embedded before the SPPF module of the YOLOv8 backbone feature extraction network; and / or, the key stem node feature point is the third node from the bottom of the rice plant.
[0018] In the above scheme, the formula for calculating the absolute height of the key stem node relative to the ground in step S3 is:
[0019]
[0020] in, This refers to the absolute height of the key stem node relative to the ground, that is, the vertical height of the key stem node relative to the ground. The height of the optical center of the image sensor from the ground. The initial mounting pitch angle of the image sensor's optical axis relative to the horizontal plane. The vehicle body pitch angle, This is the roll angle. For the focal length of the image sensor, The ordinate of the principal point in the image. The vertical pixel coordinates of the key stem node feature points. These are the vertical pixel coordinates of the root feature point.
[0021] In the above scheme, step S4, determining the target cutting platform height, specifically involves:
[0022] An initial target height is obtained by adding a safety distance to the absolute height of the key stem node relative to the ground; the initial target height is constrained within a preset agronomical safety stubble height range for ratooning rice to obtain the target header height; and / or, step S5 uses an incremental PID algorithm for closed-loop control.
[0023] A system for online detection of stubble height and dynamic control of header in ratooning rice is provided to implement the aforementioned method for online detection of stubble height and dynamic control of header in ratooning rice. The system includes a visual perception module, a sensor detection module, a control module, and an execution module.
[0024] The visual perception module includes an image sensor installed at the front end of the header, which is used to acquire an image of the crop in front and transmit it to the control module;
[0025] The sensor detection module includes an attitude sensor and a height sensor. The attitude sensor is used to acquire the attitude data of the harvester and transmit it to the control module; the height sensor is used to acquire the physical height data of the header and transmit it to the control module.
[0026] The control module is connected to the visual perception module and the sensor detection module, and is used to process the image of the crop in front, identify and acquire the root feature points and key stem node feature points of the rice plant; based on the root feature points and key stem node feature points, as well as the posture data and image sensor parameters, calculate the absolute height of the key stem node above the ground; determine the target header height according to the absolute height above the ground and the preset agronomic staking requirements; and control the raising and lowering of the header according to the deviation between the target header height and the current header height.
[0027] The execution module includes an electro-hydraulic proportional valve, which is used to receive instructions from the control module and drive the cutting table to rise and fall.
[0028] In the above scheme, the image sensor is an 850nm near-infrared camera, and the optical axis of the image sensor lens is tilted downwards; and / or, the control module is an edge computing device.
[0029] A harvester includes a harvester body, a header, and a hydraulic system, characterized in that the harvester further includes the online detection system for the stubble height of ratooned rice and the dynamic control system for the header.
[0030] In the above scheme, the hydraulic system includes a cutting table lifting cylinder, and the electro-hydraulic proportional valve is used to control the movement of the cutting table lifting cylinder.
[0031] Compared with the prior art, the beneficial effects of the present invention are:
[0032] 1. This invention breaks through the environmental bottleneck of visual recognition: by using 850nm near-infrared imaging technology and utilizing the characteristics of biological spectrum, it significantly improves the contrast between rice stem nodes and background in complex field environments with strong light, shadow and green background, ensuring the recognition stability of all-weather operation.
[0033] 2. This invention achieves precise stubble retention based on biological characteristics: It adopts the improved YOLOv8-Pose algorithm with the introduction of CBAM to directly locate the key point of the "third node from the bottom" that determines the yield of ratooning rice, rather than simply measuring the canopy height, so that the stubble position is more in line with agronomic requirements and effectively protects dormant buds.
[0034] 3. This invention improves control accuracy in complex terrain: By establishing a coordinate transformation model that includes IMU attitude data, the visual ranging error caused by fuselage pitch and roll is eliminated from a mathematical perspective, realizing the dual decoupled control of the cutter platform against ground undulations and fuselage sway.
[0035] 4. This invention enhances the safety and reliability of the system: Based on the intelligent algorithm, a physical hard constraint of 250mm~400mm and PID closed-loop control are introduced to prevent the cutting table from touching the ground or the stubble from being too high due to algorithm misjudgment, thereby reducing the operator's workload and improving work efficiency.
[0036] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0037] Figure 1 This is the main flowchart of an embodiment of the present invention for online detection of stubble height and dynamic control of the header in ratooning rice;
[0038] Figure 2 This is a hardware architecture and connection module diagram of an online detection and dynamic control system for stubble height of ratooning rice according to an embodiment of the present invention.
[0039] Figure 3 This is a schematic diagram of the improved YOLOv8-Pose key point detection network structure according to an embodiment of the present invention;
[0040] Figure 4 is a schematic diagram of the geometric principle model of monocular vision ranging and attitude compensation in an embodiment of the present invention, wherein Figure 4(a) is a side view of spatial geometric relationship and Figure 4(b) is a front view of image coordinate system;
[0041] Figure 5 This is a side view of the combined harvester for regenerated rice and the sensor installation location according to an embodiment of the present invention.
[0042] Figure 6This is a block diagram of the PID closed-loop control logic for the cutter height according to an embodiment of the present invention;
[0043] Figure 7 This is a schematic diagram illustrating the effect of identifying key points of rice stem nodes under near-infrared images according to an embodiment of the present invention.
[0044] In the diagram: 1. Harvester body; 2. Header; 3. Image sensor; 4. Attitude sensor; 5. Height sensor; 6. Control module; 7. Header lifting cylinder; 8. Electro-hydraulic proportional valve. Detailed Implementation
[0045] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0046] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "front," "rear," "left," "right," "upper," "lower," "axial," "radial," "vertical," "horizontal," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0047] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0048] A method for online detection of stubble height and dynamic control of the header in ratooning rice includes the following steps:
[0049] S1. Multi-source data acquisition: The image sensor 3 installed at the front end of the harvester header 2 is used to acquire images of the crop in front, and the attitude data of the harvester and the physical height data of the header are acquired simultaneously.
[0050] S2. Feature point extraction: The image from step S1 is processed to identify and obtain the root feature points and key stem node feature points of the rice plant.
[0051] S3. Height Calculation: Based on the root feature points and key stem node feature points from step S2, as well as the attitude data and image sensor parameters from step S1, calculate the absolute height of the key stem node relative to the ground.
[0052] S4. Target decision: Determine the target header height based on the absolute height above ground obtained in step S3 and the preset agronomic staking requirements.
[0053] S5. Closed-loop control: Based on the deviation between the target cutting platform height and the current cutting platform height in step S4, control the lifting and lowering of the cutting platform 2.
[0054] In step S1, image sensor 3 is a near-infrared industrial camera used to acquire near-infrared images in a specific wavelength band; the attitude data is acquired by attitude sensor 4; and the physical height data of the cutting table... The height is collected by height sensor 5, which is installed at the swing arm of the cutting table.
[0055] The specific wavelength band is 850nm. This wavelength band is preferred because it is based on the spectral reflectance characteristics of rice plants. The 850nm wavelength band is located in the high reflectance plateau region of the near-infrared spectrum of rice and avoids the strong absorption band of water. Under this wavelength band, the difference in spectral reflectance between the biologically active rice stem nodes and the field soil background and withered leaves reaches its maximum value, thereby forming a significant grayscale contrast. This can effectively filter out ambient visible light interference and maximize the enhancement of the texture and contour features of the stem nodes to obtain the best target recognition effect.
[0056] The attitude data includes the vehicle pitch angle. and roll angle .
[0057] In step S2, a key point detection neural network is used to extract feature points. The neural network includes an attention mechanism module for enhancing target feature extraction.
[0058] The keypoint detection neural network is a YOLOv8-Pose network in which the CBAM attention mechanism module is embedded before the SPPF module of the YOLOv8 backbone feature extraction network.
[0059] Preferably, an improved YOLOv8-Pose keypoint detection network is used for feature extraction. The specific implementation includes embedding a CBAM attention mechanism module before the SPPF module of the YOLOv8 backbone feature extraction network.
[0060] The channel attention submodule in the CBAM module is used to perform channel weighting on the feature map to suppress the response weights of background weeds and soil noise;
[0061] The spatial attention submodule in the CBAM module generates a spatial mask, enabling the network to focus on the texture and node features of rice stems in the image. The training process of this network includes: constructing a near-infrared image dataset of ratooning rice covering different lighting and growth states; manually labeling the detection boxes, root attachment points, and coordinates of the third node from the bottom of the target rice; applying Mosaic enhancement, random rotation, and brightness transformation strategies to expand the data, and dividing the dataset proportionally; setting the SGD optimizer with an initial learning rate of 0.01, a momentum factor of 0.937, a weight decay coefficient of 0.0005, and 400 training epochs; and using OKS as the keypoint regression loss function to achieve convergence and optimization of model parameters by minimizing the Euclidean distance between the predicted keypoints and the labeled ground truth.
[0062] The network output includes the coordinates of the root attachment points of the rice plants. And the key stem node coordinates of the "third node from the bottom" ,in These are the coordinates in the image pixel coordinate system.
[0063] The key stem node feature point includes the third node from the top of the rice plant. The third node from the top refers to the third stem node counted downwards from the top of the rice stem. This node is a key biological location for the enrichment of axillary buds in the ratooning season of rice. By identifying this node and controlling the cutting platform to cut above the third node from the top, it is possible to effectively protect the dominant dormant buds from mechanical damage, which plays a vital role in improving the seedling emergence rate and yield of ratooning rice.
[0064] In step S3, preferably, a monocular ranging model is constructed based on the pinhole imaging model and geometric triangulation, and attitude compensation is introduced. The specific calculation formula is as follows:
[0065] Set the initial mounting pitch angle of the camera's optical axis relative to the horizontal plane as follows: ;
[0066] The fixed vertical height of the camera's optical center O relative to the bottom of the cutting table is: This height parameter is a geometric constant determined by the rigid connection structure between the camera and the cutting table, and can be obtained through actual physical measurement after the equipment is assembled.
[0067] In a preferred example of this embodiment, The value is set to 510mm. Based on this fixed height and the real-time data collected by the cutting table height sensor, the real-time height of the camera's optical center O from the ground is determined. = + ;
[0068] Light O The angle with the optical axis is ;
[0069] Light O The angle with the optical axis is ;
[0070] Light O The total angle with the horizontal plane is According to the relationship of right triangles:
[0071] Horizontal distance ;
[0072] Similarly, using light O Total angle By combining the horizontal distance D, we can deduce the formula for calculating the absolute height of the key stem node relative to the ground:
[0073]
[0074] in, This refers to the absolute height of the key stem node relative to the ground, that is, the vertical height of the key stem node relative to the ground. The height of the optical center of the image sensor from the ground. The initial mounting pitch angle of the image sensor's optical axis relative to the horizontal plane. The vehicle body pitch angle, This is the roll angle. For the focal length of the image sensor, The ordinate of the principal point in the image. The vertical pixel coordinates of the key stem node feature points. The vertical pixel coordinates of the root feature point. This is the distance from the root pixel to the principal point on the image plane. The corresponding viewpoint of the key stem node in the image, i.e. , The corresponding viewpoint of the root in the image is... , This item is used to correct projection errors caused by fuselage roll.
[0075] The specific steps for determining the target cutting platform height in step S4 are as follows:
[0076] The theoretical target height is generated based on the calculated absolute height and agronomic stubble requirements, and a safety range constraint is applied. Specifically, a safety distance is added to the absolute height of the key stem node relative to the ground to obtain the initial target height. The initial target height is then constrained within a preset agronomical safety stubble height range for ratooning rice to obtain the target cutter height.
[0077] Specifically, based on agronomic requirements, the height of the identified key stem nodes... Safety distance above The location is set as the theoretical cutting position, and the initial target height is calculated. ;
[0078] The initial target height is constrained within a preset safe stubble height range for ratooning rice, that is, the physical constraint range for the safe stubble height of ratooning rice is set as follows: ,
[0079] like Then set the final target cutter height. = ;
[0080] like Then set the final target cutter height. = ;
[0081] like Then set the final target cutter height. = .
[0082] Preferably, step S5 employs an incremental PID algorithm for closed-loop control, specifically including:
[0083] Calculate the current time Height deviation ;
[0084] Calculate the increment of PWM control quantity in the hydraulic control system :
[0085]
[0086] in, , , These are the proportional coefficient, integral coefficient, and differential coefficient, respectively. and These are the height deviations of the previous and the time before that, respectively.
[0087] Output final control signal The electro-hydraulic proportional valve drives the lifting cylinder of the cutting table.
[0088] A system for online detection of stubble height and dynamic control of header in ratooning rice is provided to implement the aforementioned method for online detection of stubble height and dynamic control of header in ratooning rice. The system includes a visual perception module, a sensor detection module, a control module, and an execution module.
[0089] The visual perception module includes an image sensor 3 installed at the front end of the header 2. The image sensor 3 is used to acquire images of the crop in front and transmit them to the control module 6. Preferably, the image sensor 3 is an 850nm near-infrared industrial camera installed at the center of the front crossbeam of the header.
[0090] The sensor detection module includes an attitude sensor 4 mounted on the vehicle body and a height sensor 5 mounted on the header boom. The attitude sensor 4 is used to acquire the attitude data of the harvester and transmit it to the control module 6; the height sensor 5 is used to acquire the physical height data of the header and transmit it to the control module 6.
[0091] The control module 6 is connected to the visual perception module and the sensor detection module. The control module 6 is configured to run the improved YOLOv8-Pose algorithm and height calculation program to process the image of the crop in front, identify and obtain the root feature points and key stem node feature points of the rice plant; calculate the absolute height of the key stem node relative to the ground based on the root feature points and key stem node feature points, as well as the posture data and image sensor parameters; determine the target header height according to the absolute height relative to the ground and the preset agronomic staking requirements; and control the raising and lowering of the header 2 according to the deviation between the target header height and the current header height.
[0092] The execution module includes an electro-hydraulic proportional valve 8 and a drive circuit. The electro-hydraulic proportional valve 8 is used to receive instructions from the control module 6 and drive the cutting table 2 to rise and fall.
[0093] The control module 6 has a preset height calculation program. When the visual perception module fails to detect a valid target for several consecutive frames, the system automatically maintains the current height or switches to the preset average stubble height mode until a valid target is detected again.
[0094] The image sensor 3 is an 850nm near-infrared camera, and the lens of the image sensor 3 is mounted with the optical axis tilted downwards; the control module 6 is an edge computing device.
[0095] like Figure 5 As shown, a harvester includes a harvester body 1, a header 2, and a hydraulic system. The harvester also includes the online detection system for the height of the stubble of ratooned rice and the dynamic control system for the header.
[0096] The hydraulic system includes a cutting platform lifting cylinder 7, and the electro-hydraulic proportional valve 8 is used to control the movement of the cutting platform lifting cylinder 7.
[0097] In one specific embodiment of the present invention, the hardware selection and installation layout are as follows:
[0098] Preferably, the image sensor 3 is a Hikrobot MV-CA013-20GN 850nm narrow-band near-infrared industrial camera, installed on the right side plate of the cutting table 2 at the corresponding position of the cutting table auger axis, equipped with an IP67 dust cover, and a bandpass filter with a center wavelength of 850nm and a bandwidth of 20nm is installed in front of the lens. The lens optical axis is installed at a downward tilt of 30° to 60°, preferably at an angle of [missing information - likely a specific angle] with the horizontal plane. Set as .
[0099] The attitude sensor 4 is a WT901 six-axis IMU (Inertial Measurement Unit), rigidly mounted on the central beam of the chassis below the cab of the harvester body 1. Its X-axis points towards the front of the harvester, its Y-axis points to the right side of the harvester body, and its Z-axis is vertically upward and on the same side as the header 2. It is used to collect the pitch angle of the harvester body. and roll angle The information is then transmitted to the control module 6.
[0100] The height sensor 5 is a wire-type displacement sensor with a range of 0-1000mm, located on one side of the header height adjustment cylinder 7. It is used to collect the extension information of the header height adjustment cylinder and convert it into the straight-line distance of the header blade beam from the ground through linear calibration. It is then passed to control module 6.
[0101] The control module 6, using an NVIDIA Jetson Orin NX processor, is located in the cab control cabinet and is connected to the image sensor 3, attitude sensor 4, height sensor 5, and electro-hydraulic proportional valve 8. The execution module uses the electro-hydraulic proportional valve 8 to control the lifting cylinder 7 of the cutting table, achieving continuous and smooth height adjustment. In this embodiment, the electro-hydraulic proportional valve 8 is preferably a 4WRA6 type proportional directional valve. This valve can precisely adjust the flow rate and direction of the hydraulic oil according to the received control signal, driving the lifting cylinder 7 to perform stepless and smooth extension and retraction movements, thereby eliminating mechanical shock and improving control response speed.
[0102] In one specific embodiment of the present invention, such as Figure 1 and Figure 2 As shown, a method for online detection of stubble height and dynamic control of the header in ratooning rice includes the following steps:
[0103] Step S1: Multi-source data acquisition:
[0104] Set control cycle ;
[0105] Step S1.1, System Power-On Calibration: After the harvester is started, lower the header 2 to the lowest limit and read the original voltage value of the wire-type displacement sensor. calibrating linear mapping relationships ,in This is the proportionality coefficient. Zero-point offset;
[0106] Simultaneously, static zero-bias calibration is performed on the IMU inertial measurement unit;
[0107] Step S1.2, Soft-trigger synchronous acquisition: In order to eliminate the spatiotemporal errors caused by the movement of the harvester, the control module 6 adopts a soft-trigger mode;
[0108] Step S1.3, Concurrent Data Reading: At the same time as sending the camera exposure command, read the vehicle body attitude data output by IMU sensor 4 via the CAN bus. The header height data output by the wire-type displacement sensor 5 ;
[0109] Step S1.4, Attitude Validity Prediction: In one specific embodiment of the present invention, to avoid interference from invalid data, the rate of change of the vehicle pitch angle at the current moment is calculated. In this embodiment, an attitude effectiveness threshold is set: when the vehicle pitch angle change rate... When the aircraft is in a state of crossing a field ridge or experiencing severe vibration, the threshold is determined to be an empirical value derived from statistical analysis of a large amount of experimental data from actual field harvesting operations. Experimental data shows that when the pitch angle change rate exceeds this threshold, severe aircraft shaking will cause motion blur in the imaging and a significant increase in the dynamic error of the geometric ranging model.
[0110] Therefore, in order to ensure control stability, the system marks the current frame visual data as "unreliable", skips subsequent visual calculations, and uses the target instruction from the previous control cycle.
[0111] Step S2, Feature Point Extraction:
[0112] Step S2.1, Image Enhancement Processing: After receiving the 850nm near-infrared image with a resolution of 1920×1080, the control module 6 performs CLAHE processing on it. By suppressing the highlight areas and enhancing the details in the dark areas, the texture contrast of the rice stem nodes and leaves is significantly enhanced.
[0113] Step S2.2 Constructing an improved YOLOv8-Pose network: Using YOLOv8-Pose as the base network, embed the CBAM attention mechanism module before the SPPF layer of the backbone network.
[0114] like Figure 3 As shown, the specific implementation of the improvement is as follows:
[0115] Step S2.3, Channel Attention Feature Extraction: Within the CBAM module, global max pooling and global average pooling are first performed on the input feature map, generating two... The vectors are fed into a shared multilayer perceptron, the outputs are summed and passed through a sigmoid activation function to obtain the channel weight coefficients;
[0116] This step is used to suppress noise channel weights for background weeds and soil.
[0117] Step S2.4: Perform max pooling and average pooling on the channel dimension of the channel attention-weighted feature maps, and then concatenate them. Convolutional layers and a sigmoid activation function are used to obtain a spatial weight map;
[0118] This step focuses the network on the textured areas of rice roots and stem nodes in the image.
[0119] Step S2.5, Model Inference and Selection: Input the enhanced image into the improved YOLOv8-Pose network for inference, and output a set of key points containing multiple targets;
[0120] The system selects a single rice plant located in the horizontal center region of the image with the highest confidence level and extracts the root pixel coordinates of the rice plant. and pixel coordinates of the stubble node .
[0121] As shown in Figure 4, where Figure 4(a) is a side view of the spatial geometric relationship and Figure 4(b) is a front view of the image coordinate system; Step S3, Height Calculation (Spatial Coordinate Calculation Based on Pose Fusion):
[0122] Step S3.1, Camera absolute height calculation: The control module 6 uses the principle of geometric trigonometry combined with attitude data to calculate the physical height of the visual recognition results;
[0123] First, the real-time height of the camera's optical center O above the ground is calculated based on data from the wire-type displacement sensor. :
[0124] = +
[0125] in, The fixed vertical distance between the installation position of the near-infrared industrial camera and the bottom of the cutting table.
[0126] Step S3.2, Distortion Correction: Using the pre-calibrated camera intrinsic parameter matrix and distortion coefficient For the extracted root pixel coordinates and stem node pixel coordinates Distortion correction is performed; the camera calibration process preferably adopts the classic Zhang Zhengyou calibration method, which involves acquiring multiple images of a precision black and white checkerboard calibration board at different angles and positions, and using a calibration algorithm to calculate and obtain the intrinsic parameters and distortion parameters of the near-infrared industrial camera.
[0127] In a specific example of this embodiment, for a resolution of The intrinsic parameter matrix obtained from the calibration of a near-infrared industrial camera with a pixel count Example value (Unit: pixels).
[0128] Step S3.3: Construct the attitude correction matrix: based on the real-time pitch angle With the front of the vehicle pointing upwards, calculate the corrected effective pitch angle. .
[0129] Step S3.4, Application of Height Calculation Formula: Calculate the absolute height of the identified stubble node relative to the ground. ;
[0130] Light O The angle with the optical axis is ;
[0131] Light O The angle with the optical axis is ;
[0132] Light O The total angle with the horizontal plane is According to the relationship of right triangles:
[0133] Horizontal distance ;
[0134] Similarly, using light O Total angle By combining this with the horizontal distance D, we can deduce the following:
[0135]
[0136] in, This refers to the absolute height of the key stem node relative to the ground, that is, the vertical height of the key stem node relative to the ground. The height of the optical center of the image sensor from the ground. The initial mounting pitch angle of the image sensor's optical axis relative to the horizontal plane. The vehicle body pitch angle, This is the roll angle. For the focal length of the image sensor, The ordinate of the principal point in the image. The vertical pixel coordinates of the key stem node feature points. The vertical pixel coordinates of the root feature point. The distance from the stem node pixel to the principal point on the image plane. This is the distance from the root pixel to the principal point on the image plane. The corresponding viewpoint of the key stem node in the image, i.e. , The corresponding viewpoint of the root in the image is... , This item is used to correct projection errors caused by fuselage roll.
[0137] Step S4: Target stubble height decision and range constraints:
[0138] Step S4.1, Agronomic Target Generation: Control module 6 generates the final control target based on agronomic requirements and physical constraints. ;
[0139] Set the ideal cutting position above the identified node. The distance parameter is a safety margin set by comprehensively considering the mechanical thickness of the cutter blade, the amplitude of cutting vibration during harvesting, and the need to protect the biological needs of the stem cut from drying out and affecting the axillary buds. It is designed to ensure that the mechanical cutting action will not physically damage the dominant regenerating axillary buds located at the stem nodes, and this safety distance can be adaptively adjusted according to the specific type of cutter used and the accuracy requirements of the operation.
[0140] That is, the initial target height: .
[0141] Step S4.2, Physical Range Hard Constraints: To protect the root system of the ratooned rice and prevent excessive stubble height, a safe range is set. .
[0142] like 250mm, then set the final target cutter height. =250mm;
[0143] like 400mm, then set the final target cutter height. =400mm;
[0144] like Then set the final target cutter height. = .
[0145] Step S4.3, Moving Average Filtering: To prevent control oscillations caused by single-frame detection fluctuations, a length of [length missing] is established. The first-in-first-out queue stores the constrained target height. The average value of the queue is taken as the final control target. The length of the queue This is the result of experimental optimization based on the system's dynamic response characteristics;
[0146] The reason for choosing this value is: if If the value is too small, it cannot effectively smooth out high-frequency noise in visual detection; if If the value is too large, it will introduce significant control delay; using this specific length can achieve the best balance between effectively suppressing control oscillations and maintaining the hydraulic system's rapid tracking response to terrain changes.
[0147] Step S4.4, Abnormal Loss Handling: If the visual algorithm does not detect a valid target in the current frame, the counter is incremented by 1; if the counter value is less than 10, the system keeps the target height instruction of the previous frame unchanged; if the counter value exceeds 10, it automatically and smoothly transitions to the preset general height of 300mm.
[0148] The design logic of the 10-frame counter threshold is based on the system control cycle of 50ms and the normal operating speed of the harvester. The time window corresponding to 10 frames is 0.5 seconds. This time span setting is intended to build a reasonable fault tolerance buffer period, which is sufficient to filter out short-term detection loss caused by local leaf shading, sudden changes in sunlight, or single plant lodging, and avoid hydraulic system malfunction. It can also prevent the risk of blind operation caused by long-term lack of target guidance, and ensure that the header can be reset to a safe agronomic average height in a timely manner when entering a large area of lodging or turning at the edge of the field.
[0149] like Figure 6 As shown, step S5, closed-loop control (incremental PID closed-loop control):
[0150] Step S5.1, Error Calculation: Control module 6 calculates the target height... Compared with the current actual height The deviation is controlled by an incremental PID algorithm to control the hydraulic actuator module;
[0151] definition Time-of-flight height error .
[0152] Step S5.2, Incremental Calculation: Calculate the control quantity using the incremental PID formula.
[0153] The calculation formula is as follows:
[0154]
[0155] In the formula, , , These are the proportional, integral, and differential coefficients, respectively.
[0156] In the actual field testing of this embodiment, for the selected specific harvester model and electro-hydraulic proportional control system, the following preferred PID control parameters were determined to obtain the best dynamic response performance:
[0157] proportionality coefficient Improve system response speed;
[0158] Integral coefficient Eliminate steady-state errors and ensure stubble retention accuracy;
[0159] Differential coefficients : Suppress overshoot and prevent oscillation of the cutting platform.
[0160] It should be noted that the above parameter values are merely exemplary values based on the test platform of this embodiment. In actual engineering applications, the above PID parameters should be readjusted according to the inertial load characteristics of the harvester header and the flow response characteristics of the hydraulic system to achieve the best control effect.
[0161] Step S5.3, Dead Zone Logic: To protect the electro-hydraulic proportional valve, a dead zone threshold is set. ;
[0162] when At that time, a mandatory order To avoid frequent operation of hydraulic valves;
[0163] when At that time, perform normal PID calculation.
[0164] Step S5.4, Signal Conversion and Output: Calculate the final control quantity. The signal is converted into a PWM duty cycle signal of 12%, which drives the electro-hydraulic proportional valve 8 to control the extension and retraction of the cutting table lifting cylinder 7, thereby realizing the closed-loop adjustment of the cutting table height.
[0165] This embodiment preferably employs 850nm near-infrared imaging technology, combined with an improved CBAM-YOLOv8-Pose algorithm, which can directly identify biological nodes of crops (root feature points and key stem node feature points of rice plants, such as...). Figure 7 As shown in the figure, instead of simply measuring canopy height, it enables precise stubble retention based on agronomic needs;
[0166] Meanwhile, by integrating IMU attitude data, the interference of harvester swaying on visual ranging was eliminated at the mathematical model level. Combined with incremental PID control, this stabilized the stubble height control error within a certain range. Within this range, it is significantly superior to traditional contour control.
[0167] To verify the control accuracy and stability of the system under actual field conditions, the experiment was conducted in a field in Hekou Village, Dunshang Street, Guichi District, Chizhou City, Anhui Province. The experiment focused on the midday period of strong sunlight during the first harvest of ratooning rice and on uneven, pitted fields. The aim was to verify the anti-light interference capability of the 850nm near-infrared vision system and the compensation effect of the IMU attitude fusion algorithm on terrain disturbances. The test crop was the Tailiangyou 1332 rice variety. The harvester operated at a speed of 1.0 m / s, and 11 sets of dynamic control data were collected within the agronomical range of 250 mm to 400 mm.
[0168] Table 1 Field Trial Data
[0169] Number of trials Algorithm sets target height (mm) Actual height (mm) measured manually. Absolute error (mm) Relative error (%) 1 300 305 5 1.67 2 300 292 -8 2.67 3 350 358 8 2.29 4 320 316 -4 1.25 5 280 285 5 1.79 6 380 378 -2 0.53 7 300 312 12 4 8 330 320 -10 3.03 9 310 311 1 0.32 10 290 286 -4 1.38 11 340 345 5 1.47 Mean Absolute Error (MAE) -- 5.8 mm -- The overall deviation is extremely small. Maximum absolute error (MaxE) -- 12.0 mm ≤15mm Not out of tolerance Standard deviation of error (SD) -- 6.9 mm -- Low dispersion, stable control
[0170] As shown in Table 1, field trial results demonstrate that this system possesses extremely high control accuracy and operational stability. Statistical analysis shows that the system's mean absolute error (MAE) for dynamic stubble retention is 5.8 mm, with a standard deviation (SD) of only 6.9 mm, and the maximum absolute error of 12.0 mm is strictly controlled within the design range of ±15 mm. This confirms that the present invention, by integrating near-infrared vision and attitude calculation with incremental PID closed-loop control, can effectively eliminate interference from machine vibration and terrain undulations, achieving precise control of stubble height for ratooning rice. This is significantly superior to traditional manual operation and meets the agronomical requirements for protecting dominant axillary buds during the ratooning season.
[0171] The core concept of this invention lies in utilizing near-infrared spectral characteristics in conjunction with deep learning keypoint detection technology to solve the problem of biometric identification in ratooning rice stubble retention, and combining this with attitude compensation to achieve precise control. Therefore, all equivalent substitutions based on this core concept are covered within the scope of protection of this invention. For example:
[0172] Hardware aspect: Although the embodiment preferably uses an 850nm near-infrared industrial camera, other near-infrared cameras such as 940nm and 780nm that can significantly distinguish plant stems from the background of dead leaves, or depth sensors such as TOF cameras and lidar to acquire biometric data, are all variations of the present invention.
[0173] Algorithm level: Although the improved YOLOv8-Pose algorithm is described in detail in the embodiments, with the development of artificial intelligence technology, other key point detection networks such as HRNet, RTMPose, and ViTPose, or future updated versions of the YOLO series algorithms, as long as they improve the ability to extract rice stem node features by introducing attention mechanisms (such as CBAM and SE-Block), should be regarded as equivalent implementations of the present invention.
[0174] Control level: Although the incremental PID algorithm is used in the embodiment, using fuzzy PID, ADRC or model predictive control to achieve closed-loop adjustment of the cutter height does not deviate from the technical scope of the present invention.
[0175] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0176] The detailed descriptions listed above are merely specific illustrations of feasible embodiments of the present invention and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for online detection of stubble height and dynamic control of the header in ratooning rice, characterized in that, Includes the following steps: S1. Multi-source data acquisition: The image sensor (3) installed at the front of the harvester header (2) is used to acquire the image of the crop in front, and the attitude data of the harvester and the physical height data of the header are acquired simultaneously. S2. Feature point extraction: The image from step S1 is processed to identify and obtain the root feature points and key stem node feature points of the rice plant. S3. Height Calculation: Based on the root feature points and key stem node feature points from step S2, as well as the attitude data and image sensor parameters from step S1, calculate the absolute height of the key stem node relative to the ground. S4. Target decision: Determine the target header height based on the absolute height above ground obtained in step S3 and the preset agronomic staking requirements. S5. Closed-loop control: Based on the deviation between the target cutting height and the current cutting height in step S4, control the raising and lowering of the cutting table (2).
2. The method for online detection of stubble height and dynamic control of the header in ratooning rice according to claim 1, characterized in that, In step S1, the image sensor (3) is a near-infrared camera used to acquire near-infrared images in a specific band; the attitude data is acquired by the attitude sensor (4); and the physical height data of the cutting platform is acquired by the height sensor (5).
3. The method for online detection of stubble height and dynamic control of the header in ratooning rice according to claim 2, characterized in that, The specific wavelength band is 850nm; and / or, in step S2, a key point detection neural network is used to extract feature points, the neural network including an attention mechanism module for enhancing target feature extraction.
4. The method for online detection of stubble height and dynamic control of the header in ratooning rice according to claim 3, characterized in that, The key point detection neural network is a YOLOv8-Pose network in which a CBAM attention mechanism module is embedded before the SPPF module of the YOLOv8 backbone feature extraction network; and / or, the key stem node feature point is the third node from the bottom of the rice plant.
5. The method for online detection and dynamic control of stubble height in ratooning rice according to any one of claims 1 to 4, characterized in that, In step S3, the formula for calculating the absolute height of the key stem node relative to the ground is: in, This refers to the absolute height of the key stem node relative to the ground, that is, the vertical height of the key stem node relative to the ground. The height of the optical center of the image sensor from the ground. The initial mounting pitch angle of the image sensor's optical axis relative to the horizontal plane. The vehicle body pitch angle, This is the roll angle. For the focal length of the image sensor, The ordinate of the principal point in the image. The vertical pixel coordinates of the key stem node feature points. These are the vertical pixel coordinates of the root feature point.
6. The method for online detection and dynamic control of stubble height in ratooning rice according to any one of claims 1 to 4, characterized in that, The specific steps for determining the target cutting platform height in step S4 are as follows: An initial target height is obtained by adding a safety distance to the absolute height of the key stem node relative to the ground; the initial target height is constrained within a preset agronomical safety stubble height range for ratooning rice to obtain the target header height; and / or, step S5 uses an incremental PID algorithm for closed-loop control.
7. A system for online detection of stubble height and dynamic control of the header in ratooning rice, characterized in that, The system is used to implement the method for online detection of stubble height and dynamic control of the header of ratooning rice as described in any one of claims 1 to 6. The system includes a visual perception module, a sensor detection module, a control module (6) and an execution module. The visual perception module includes an image sensor (3) installed at the front end of the header (2). The image sensor (3) is used to acquire an image of the crop in front and transmit it to the control module (6). The sensor detection module includes an attitude sensor (4) and a height sensor (5). The attitude sensor (4) is used to acquire the attitude data of the harvester and transmit it to the control module (6); the height sensor (5) is used to acquire the physical height data of the header and transmit it to the control module (6). The control module (6) is connected to the visual perception module and the sensor detection module, and is used to process the image of the crop in front, identify and obtain the root feature points and key stem node feature points of the rice plant; based on the root feature points and key stem node feature points, as well as the posture data and image sensor parameters, calculate the absolute height of the key stem node above the ground; determine the target header height according to the absolute height above the ground and the preset agronomic staking requirements; control the raising and lowering of the header (2) according to the deviation between the target header height and the current header height. The execution module includes an electro-hydraulic proportional valve (8), which is used to receive instructions from the control module (6) and drive the cutting table (2) to rise and fall.
8. The online detection and dynamic control system for stubble height of ratooned rice according to claim 7, characterized in that, The image sensor (3) is an 850nm near-infrared industrial camera, and the lens optical axis of the image sensor (3) is tilted downward; and / or, the control module (6) is an edge computing device.
9. A harvester, comprising a harvester body (1), a header (2), and a hydraulic system, characterized in that, The harvester also includes the online detection and dynamic control system for the stubble height of ratooned rice as described in claim 7 or 8.
10. The harvester according to claim 9, characterized in that, The hydraulic system includes a cutting platform lifting cylinder (7), and the electro-hydraulic proportional valve (8) is used to control the action of the cutting platform lifting cylinder (7).