Control system and method of full-automatic bionic sampling robot

The fully automated bionic sampling robot, through its intelligent control system and mechanical bionic technology, solves the problems of low efficiency and sample distortion in traditional sampling methods. It achieves efficient, undisturbed, and accurate sample collection and reliable test results, supports data traceability, and improves the scientific rigor and impartiality of grain testing.

CN121973203APending Publication Date: 2026-05-05LIANGZHU BRANCH OF HANGZHOU GRAIN COLLECTION & STORAGE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LIANGZHU BRANCH OF HANGZHOU GRAIN COLLECTION & STORAGE CO LTD
Filing Date
2026-01-28
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Traditional manual sampling is inefficient, labor-intensive, relies on personal experience, and is not standardized. Electric negative pressure automatic sampling leads to sample distortion, impurity intake, and sample damage, affecting the accuracy and consistency of test results.

Method used

The fully automated bionic sampling robot control system employs a three-layer intelligent control architecture of perception, decision-making, and execution. It combines lidar, grating ruler, pressure sensor, image sensor, and encoder to achieve precise sampling point planning, depth positioning, and sample filling status recognition. The system uses a bionic sampling head and robotic arm for undisturbed data acquisition.

Benefits of technology

It achieves efficient, undisturbed, and accurate sample collection with low sample variation coefficient, reliable test results, and supports data traceability, thereby improving the scientific rigor and impartiality of grain testing and reducing labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121973203A_ABST
    Figure CN121973203A_ABST
Patent Text Reader

Abstract

According to the control system and method of the full-automatic bionic sampling robot, a'mechanical bionic 'sampling technology is created for the first time, the standardized sampling action of a sampler with rich experience is completely simulated through a precise mechanical transmission and intelligent control system, and undisturbed, fixed-depth, fixed-point and full-process automatic sample collection is achieved. Through a precise mechanical structure and an intelligent control system, a standard action process of a grain sampler with rich experience in executing deep sampling is completely simulated and optimized, so that a sampling technology is converted from a passive suction mode to an active, precise and undisturbed collection mode. The whole system is uniformly scheduled by a central control unit (PLC). An operator only needs to set sampling parameters on a touch screen of a control room, and the system can automatically complete the whole process from vehicle identification, point location planning, sampling execution to sample conveying. All operation steps are electronically recorded, so that complete standardization, intelligent programming and traceability of the sampling process are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial robot technology, and in particular to a control system and method, electronic equipment and computer-readable storage medium for a fully automated bionic sampling robot. Background Technology

[0002] Vehicle sampling upon arrival at the warehouse serves as the starting point for quality inspection, and its scientific validity, representativeness, and authenticity directly determine the accuracy of subsequent test results. For a long time, traditional manual sampling and electric negative pressure automatic sampling methods have revealed many drawbacks in practical applications: manual sampling is inefficient, labor-intensive, and heavily influenced by subjective factors; while negative pressure automatic sampling, although automated, suffers from sample distortion due to strong negative pressure disturbances, especially in grains such as rice, easily leading to excessive impurity absorption and husk damage, resulting in problems such as inflated "outer brown rice rate" and misjudgments of excessive impurities.

[0003] Currently, two main sampling methods are used at grain purchasing sites: manual sampling and electric negative pressure automatic sampling (existing equipment: fully automatic grain sampling machine). Manual sampling relies on samplers holding a sampler and inserting it point by point into the grain pile on top of the vehicle. This method is not only extremely labor-intensive, requiring samplers to frequently climb to heights, posing serious safety hazards, but also highly dependent on personal experience in terms of sampling point selection, insertion depth, and sampling techniques, resulting in large fluctuations in sample representativeness and making it difficult to achieve standardization and traceability.

[0004] To address the inefficiency of manual sampling, electric negative pressure automatic sampling machines have emerged. These devices use a vacuum pump to generate a powerful negative pressure airflow, drawing grain from the grain pile into the sampling tube. While this automates operation and reduces labor costs, its working principle itself introduces new technical drawbacks. The powerful negative pressure airflow violently disturbs the grain pile during sampling, causing lighter impurities (such as dust, debris, and shriveled grains) to be preferentially drawn in, often creating a false impression of "excessive impurities." Simultaneously, the friction between the high-speed airflow and the bends in the pipe easily damages and peels off the outer husk of the rice, producing new brown rice and severely distorting the key indicator of "outer brown rice rate" for purchasing and pricing. This quality deviation caused by the sampling method itself means that the test results cannot accurately reflect the original state of the grain, resulting in significant differences in test data between different vehicles from the same batch.

[0005] Therefore, the grain industry urgently needs a new sampling technology that can achieve automation and high efficiency, while also preserving the original state of the sample to the greatest extent and ensuring the authenticity and reliability of the test results. Summary of the Invention

[0006] To address the technical problems existing in the prior art, the present invention provides the following technical solution:

[0007] On the one hand, a fully automated biomimetic sampling robot control system is provided, which adopts a three-layer intelligent control architecture of perception-decision-execution:

[0008] The perception layer includes a lidar for acquiring three-dimensional point cloud data of the vehicle, a grating ruler displacement sensor for measuring the depth information of the sampling head, a pressure sensor for measuring the pressure of grain inside the sampling tube, an image sensor for capturing images of the inside of the sampling tube, a proximity switch for detecting the opening and closing state of the sampling port, and an encoder for measuring the motor speed and angle.

[0009] The decision layer, with a PLC as its core and an integrated edge computing module, is used to process perception layer data and generate control commands. It includes: a point planning module that uses an improved genetic algorithm to generate sampling point plans based on lidar point cloud data; a depth positioning module that uses a Kalman filter algorithm to fuse grating ruler and encoder data and to compensate for depth positioning errors; a filling recognition module that uses a convolutional neural network model to identify sample filling status based on image sensor data; and an adaptive PID control module that dynamically adjusts the insertion speed of the sampling head based on pressure sensor feedback.

[0010] The execution layer includes a vertical motion platform for raising and lowering the sampling head, a robotic arm for driving the sampling head to the target position, a bionic sampling head for opening and closing the sampling port, and a sample delivery device for transporting the sample.

[0011] Preferably, the bionic sampling head includes a sampling tube and a mechanical opening and closing device; the mechanical opening and closing device is driven by a micro servo motor to drive the sampling port baffle to rotate and achieve opening and closing, and a sealing ring is provided between the baffle and the sampling tube.

[0012] Preferably, the vertical motion platform adopts a ball screw pair driven by a servo motor, and the servo motor is controlled by a position-speed dual closed-loop PID control algorithm.

[0013] Preferably, the PLC of the decision-making layer adopts the Siemens S7-1200 series. The PLC communicates with the servo driver through the CANopen protocol, with the sensor through the Modbus RTU protocol, and with the terminal touch screen through the Ethernet TCP / IP protocol.

[0014] Preferably, the software system of the decision layer adopts a real-time operating system and includes a driver layer, a middleware layer, and an application layer; the middleware layer uses the OPC UA protocol to build a data bus; the application layer includes a vehicle parameter scanning and point planning module, a depth positioning and error compensation module, an opening and closing timing control module, a sample filling state recognition module, and a motion trajectory optimization module.

[0015] Preferably, the depth positioning and error compensation module adopts an extended Kalman filter algorithm, and the state vector includes the sampling head depth, movement speed and transmission clearance compensation amount, so as to fuse the position data of the grating ruler and the speed data of the encoder.

[0016] On the other hand, a fully automated biomimetic sampling robot control method is provided, applied to the aforementioned control system, comprising the following steps:

[0017] S1. System initialization: Perform device self-test, sensor calibration and communication test to put the system into standby mode;

[0018] S2. Vehicle Scanning and Point Planning: Vehicles are scanned using LiDAR to acquire 3D point cloud data, and uniformly distributed sampling point coordinates are generated based on an improved genetic algorithm.

[0019] S3. Sampling head insertion control: Control the robotic arm to move the sampling head above the target point, control the vertical motion platform to insert the sampling head into the grain pile to the target depth according to the predetermined speed curve, and control the bionic sampling head to open the sampling port when the target depth is reached.

[0020] S4. Sample filling monitoring: The sample filling status in the sampling tube is monitored in real time by image sensor and pressure sensor. When the filling rate reaches the set threshold and the pressure reaches the corresponding threshold, the bionic sampling head is controlled to close the sampling port.

[0021] S5. Sampling head extraction and sample transport: Control the vertical motion platform to extract the sampling head according to the predetermined speed curve, control the robotic arm to move the sampling head above the sample transport device, open the sampling port to discharge the sample, and the sample transport device completes the transport.

[0022] S6. Cycle and End: Repeat steps S3 to S5 until all planned points have been sampled. The system will then reset and generate a report.

[0023] Preferably, during the insertion of the sampling head in step S3, an extended Kalman filter algorithm is used to fuse the depth measurement data of the grating ruler and the speed data of the encoder in real time to dynamically compensate for transmission gap and temperature drift, so as to achieve accurate depth positioning.

[0024] Preferably, in step S4, the image inside the sampling tube acquired by the image sensor is identified by a convolutional neural network model to obtain the real-time filling rate; and the sample is confirmed to be full by a dual threshold judgment method in combination with the measurement value of the pressure sensor.

[0025] Preferably, in steps S3 and S5, the predetermined speed curve is an S-shaped speed curve; the servo motor is controlled by an adaptive PID control algorithm to track the speed curve, thereby achieving smooth insertion and removal of the sampling head.

[0026] On the other hand, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, which, when executed by the processor, implement the method described above.

[0027] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement the above method.

[0028] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0029] Disturbing sampling: The "close-open-fill-close" biomimetic action sequence is adopted. The dual threshold judgment of pressure sensor and YOLOv5s image recognition (fill rate ≥95% and pressure ≥7350Pa) is used to achieve non-destructive sample collection with a coefficient of variation ≤1%, which reduces grain pile disturbance compared with traditional negative pressure sampling.

[0030] Fully automated control: Based on the state machine control logic of PLC, the entire process of vehicle scanning, point planning (genetic algorithm optimization), sampling execution (S-curve + adaptive PID) and sample transportation is automated with a human intervention rate of 0%.

[0031] High-precision positioning: The extended Kalman filter is used to fuse the data of the grating ruler (±0.01mm) and the encoder, and the depth positioning error is ≤0.3mm; the S-shaped speed curve and adaptive PID control ensure that the tilt angle of the motion trajectory is ≤0.3°, and the depth difference of 10 samplings at the same point is ≤0.5mm.

[0032] Data traceability: Data is uploaded to the SQL Server database in real time via the OPC UA protocol, storing more than one year's worth of sampling data (23 parameters including timestamp, 3D coordinates, fill rate, and weight), and supports PDF report export.

[0033] High cost-effectiveness: Efficiency is increased several times (3 minutes / cart for robots vs. 10 minutes / cart for humans), saving 2 person-hours per cart (based on a labor cost of 50 yuan / hour, the annual cost saving is approximately 182,500 yuan / unit).

[0034] By uniformly distributing 96 samples (with genetic algorithm-optimized sampling points), the consistency of grain quality data for the same batch is ensured (moisture difference ≤0.2% and bulk density difference ≤2g / L for samples from the same batch and depth), providing traceable technical evidence for fair procurement.

[0035] Grain storage: Supports multi-layer depth monitoring of grain piles (0.5m / 1m / 1.5m / 2m), combined with temperature sensors (accuracy ±0.5℃) to realize early warning of hot zones in grain piles (when the deep moisture content is ≥13% and the temperature is ≥25℃, a mold warning is triggered), reducing the storage loss rate by 0.3% / year.

[0036] Grain processing: Providing processing enterprises with accurate raw material quality data (such as bulk density and impurity content) and optimizing processing technology (such as adjusting grinding time). Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0038] Figure 1 This is an architecture diagram of a fully automated biomimetic sampling robot control system provided in an embodiment of the present invention;

[0039] Figure 2 This is a control logic flowchart of a biomimetic sampling head provided in an embodiment of the present invention;

[0040] Figure 3 This is a block diagram of the hardware and software system composition provided in the embodiments of the present invention;

[0041] Figure 4 This is a schematic diagram of an intelligent control process provided by an embodiment of the present invention;

[0042] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0043] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0044] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or scheme described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or schemes. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0045] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0046] In this embodiment of the invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0047] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0048] This invention proposes the concept and core technology of a fully automated biomimetic sampling robot control system and method. This device revolutionarily abandons the traditional negative pressure airflow principle, pioneering a "mechanical biomimetic" sampling technology. Through precise mechanical transmission and intelligent control systems, it completely simulates the standardized sampling actions of experienced samplers, achieving undisturbed, fixed-depth, fixed-point, and fully automated sample collection. This invention details its "close-then-open, precise-position" biomimetic sampling head, its "gravity buffer, non-destructive collection" conveying system, and its fully automated precision control system based on gear transmission. It also analyzes its significant advantages in sample representativeness, physical integrity, and quality consistency. This provides a completely new technical path for constructing a scientific, impartial, and efficient modern grain quality inspection system.

[0049] From the field to the warehouse, to processing, and finally to the consumer, the stability and accuracy of grain quality are crucial throughout the entire industry chain. In the grain procurement stage, quality inspection is the core basis for determining grain pricing, warehousing, grading, and subsequent auctions. Sampling, as the initial step in the inspection process, aims to obtain highly representative samples to accurately reflect the average quality level of the entire batch of grain. However, traditional sampling methods have shown limitations in the face of ever-increasing grain circulation volumes and rising demands for fairness and scientific rigor in quality inspection.

[0050] The core concept of the control system and method of the fully automated biomimetic sampling robot is to completely abandon the traditional negative pressure airflow sampling principle and instead adopt a "mechanical biomimetic" technical approach. "Mechanical biomimetic" means using a precise mechanical structure and intelligent control system to completely simulate and optimize the standard operating procedures of experienced grain samplers when performing deep sampling. This concept marks a shift in sampling technology from "passive inhalation" to "active, precise, and undisturbed collection."

[0051] Through long-term frontline procurement practice, it has been observed that experienced samplers follow a rigorous set of operating procedures (i.e., the control logic of the fully automated bionic sampling robot) when conducting deep sampling: First, the sampler is vertically inserted into the grain pile to the predetermined depth. During this process, the sampling port is closed or semi-closed to prevent surface impurities from mixing into the deep sample. After reaching the target depth, the sampling port is opened to allow grain to flow in naturally. Once the sample is full, the sampling port is closed, and the sampler is smoothly pulled out. The entire process minimizes disturbance to the grain pile, ensuring that the sample taken is the "original sample" at that depth.

[0052] The fully automated biomimetic sampling robot, together with other technologies, constitutes a complete, efficient, and reliable undisturbed sampling system. Its goal is to achieve maximum consistency in quality for samples from the same batch and from the same shipment. This means that regardless of who operates the system, when or where it is used, as long as the same batch of grain is sampled, the obtained samples should exhibit extremely high stability in key quality indicators, thus providing a solid technical guarantee for scientific and fair grain procurement.

[0053] The core technology applications of this invention are described below:

[0054] (I) The bionic sampling head is the core execution component, directly determining the representativeness and authenticity of the sample. Traditional negative pressure sampling heads begin working during insertion into the grain pile, where the negative pressure airflow simultaneously removes surface and shallow impurities, resulting in severe sample stratification and making it impossible to obtain a pure sample at a specific depth. In contrast, the fully automated bionic sampling robot innovatively adopts a "close first, then open, precise placement" working mode, with the specific process as follows:

[0055] 1. Closed Insertion: Before the sampling operation begins, the sampling port at the front end of the sampling tube is completely closed by a mechanical opening and closing device controlled by a micro-gear transmission system. When the robotic arm drives the sampling head vertically downward, the closed sampling port acts like a "probe," smoothly penetrating the surface of the grain pile to the preset sampling depth without any external interference. This process completely avoids sample mixing and impurity pre-absorption caused by traditional negative pressure methods during the insertion stage, ensuring sampling consistency.

[0056] 2. Positioning and Opening: Once the high-precision displacement sensor confirms that the sampling head has accurately reached the target depth (e.g., 2 meters below the grain pile on the vehicle), the PLC control system issues a command to drive the micro gear set, causing the sampling port to open silently inside the grain pile. This action is precise and reliable, completely avoiding sampling deviations caused by improper opening timing.

[0057] 3. Self-flowing filling: After the sampling port is opened, the grain, under the influence of gravity, smoothly fills the sampling tube using its own natural flow. Because there is no strong airflow disturbance, the sample filling process is gentle and orderly, ensuring that the sample obtained at this depth is an undisturbed "original sample." This process replicates the ideal state of manual deep sampling to the greatest extent possible.

[0058] 4. Closure and Removal: Once the sampling tube is full, the control system again instructs the gear set to close the sampling port, "locking" the sample inside the tube. Then, the sampling head is smoothly and vertically pulled out of the grain pile. Throughout the entire removal process, the sample is completely sealed, effectively preventing cross-contamination between different layers of grain and sample spillage.

[0059] The four-step cycle of "close-open-fill-close" perfectly replicates the essence of optimal manual sampling, achieving a technological leap from "perturbed sampling" to "unperturbed sampling," representing the most fundamental revolutionary breakthrough and innovation.

[0060] (ii) The system’s automation and intelligence rely on a high-precision and high-stability control system. The system uses high-precision gears, racks and pinions as the core transmission mechanism. By scanning the height, width and length of the vehicle, it automatically calculates the sampling points and builds a stable and reliable mechanical motion platform.

[0061] Vertical motion control: A servo motor drives a precision lead screw to control the vertical movement of the sampling head. Lead screw drive offers advantages such as high transmission efficiency, high positioning accuracy, and good repeatability, ensuring that the sampling head accurately reaches the preset sampling depth every time, with errors controlled within millimeters.

[0062] Sampling port opening and closing control: The opening and closing action of the sampling port is driven by a miniature servo motor through a precision gear set. The gear transmission ensures the synchronization and reliability of the action, ensuring that the opening and closing action is fast and complete.

[0063] Intelligent control program: The entire system is centrally controlled and managed by a PLC. Operators only need to set sampling parameters (such as depth, number of points, dwell time, etc.) on the touch screen in the control room, and the system can automatically complete the entire process from vehicle identification, point planning, sampling execution to sample delivery. All operation steps are electronically recorded, realizing complete standardization, proceduralization and traceability of the sampling process.

[0064] This control system completely eliminates the instability and randomness of manual operation, making each sampling as precise as "copy and paste," thus providing a solid technical foundation for achieving the goal of "same batch, same quality."

[0065] The system architecture and system application logic of the present invention will be described in detail below with reference to the accompanying drawings.

[0066] I. System Overall Architecture

[0067] like Figure 1 As shown, the fully automated biomimetic sampling robot adopts a three-layer intelligent control architecture of "perception-decision-execution" to achieve the core goal of "disturbance-free sampling". The system collects environmental and status data through the perception layer, generates control commands through algorithm processing through the decision layer, and completes mechanical actions through the execution layer. The three work together to achieve a fully automated and high-precision sampling process.

[0068] 1.1 Perception Layer: Multi-source Data Acquisition

[0069] The perception layer is responsible for collecting data such as vehicle parameters, sampling head status, and sample filling status, providing input for the decision-making layer.

[0070] The main equipment can refer to existing equipment: the hardware configuration of a fully automatic grain sampler. An example of this embodiment is as follows:

[0071] LiDAR (Robotech RS-LIDAR-16): Scans vehicle length (L), width (W), and height (H) with an accuracy of ±0.1m, a range of 150m, and a scanning frequency of 10Hz, used for point planning.

[0072] Grating ruler displacement sensor (Heidenhain LC183): Mounted on the vertical motion lead screw, it measures the depth of the sampling head with an accuracy of ±0.01mm and a range of 1.5m, and is used for depth positioning.

[0073] Pressure sensor (Honeywell 26PC series): Installed at the bottom of the sampling tube, it measures the pressure of the grain on the tube wall with an accuracy of ±1%FS and a range of 0-10kPa. It is used to help determine the sample filling status.

[0074] Image sensor (Hikvision DS-2CD2T47G1-L): Mounted on the side of the sampling tube, it captures internal images with a resolution of 4 megapixels and a frame rate of 30fps, used to identify the filling status.

[0075] Proximity switch (Omron E2E series): Installed on the sampling port opening and closing device to detect whether the opening and closing is in place, with a response time of ≤1ms, used to confirm the completion of mechanical action.

[0076] Encoder (Panasonic MHMJ series): Mounted on the servo motor shaft, it measures the motor speed and angle with an accuracy of ±0.01° and is used for motion trajectory optimization.

[0077] 1.2 Decision-making level: Intelligent algorithms and control logic

[0078] The decision-making layer uses a PLC (such as a Siemens S7-1214C) as its core, integrating edge computing modules (such as NVIDIA Jetson Nano) to achieve intelligent control through multi-algorithm collaboration: 1. Point planning based on an improved genetic algorithm, processing LiDAR point cloud data to generate a 3×3 grid sampling point matrix conforming to GB / T 5491-2008 standard; 2. Kalman filter fusion algorithm, real-time fusion of grating ruler and encoder data to achieve dynamic error compensation for depth positioning (≤0.05mm); 3. Convolutional Neural Network (CNN) image recognition, judging sample fill degree through 4-megapixel images (recognition accuracy ≥98%); 4. Adaptive PID control, dynamically adjusting the sampling head insertion speed (0.05-0.2m / s) based on pressure sensor feedback. Main functions include:

[0079] Vehicle parameter processing and point planning: LiDAR scanning generates a 3D point cloud of the vehicle, and the optimal sampling points are calculated iteratively by an improved genetic algorithm (spacing error ≤ 5cm) to ensure compliance with the "random uniform distribution" principle;

[0080] Sampling head depth and motion trajectory control: Kalman filtering is used to fuse grating ruler displacement data (sampling frequency 1kHz) and encoder rotation information, combined with adaptive PID algorithm to control the vertical motion platform, achieving a depth positioning error ≤0.3mm;

[0081] Sampling port opening and closing timing and status monitoring: Closed-loop control of the opening and closing angle (0-90°) is achieved through proximity switch (response time ≤1ms) and gearbox position feedback, with 100% accuracy in confirming the position.

[0082] Sample filling status recognition and closing command generation: Based on the CNN model, semantic segmentation is performed on the image inside the sampling tube. When the filling degree is ≥90%, the closing command is triggered. The recognition response time is ≤200ms.

[0083] Data recording and traceability: Uses an SQLite database to store more than one year of sampling data (12 parameters including timestamp, 3D coordinates, and fill degree), and supports exporting PDF reports that meet ISO 9001 requirements.

[0084] 1.3 Execution Layer: Implementation of Mechanical Actions

[0085] The execution layer is responsible for completing mechanical actions such as inserting the sampling head, opening and closing the sampling port, and transporting the sample. The main equipment includes:

[0086] Bionic sampling head: core execution component, including sampling tube (50mm in diameter, 1.2m in length) and micro gear opening and closing device (module 0.5, number of teeth 20, transmission ratio 1:5);

[0087] Vertical motion platform: A precision lead screw (10mm lead, C7 grade precision, 90% transmission efficiency) driven by a micro servo motor (such as Panasonic MSMF042L1U2M, 400W, 1.27N·m) is used to lift the sample head.

[0088] Sample transport device: conveyor belt (speed 0.1m / s, load capacity 5kg), weight sensor (accuracy ±1g), used to transport samples to containers;

[0089] Robotic arm: Cartesian coordinate robot (repeat positioning accuracy ±0.1mm), drives the sampling head to move to the target point.

[0090] The aforementioned robotic arms and other actuators can be selected, debugged, and installed by the user.

[0091] II. Hardware System Introduction

[0092] 2.1 Mechanical structure and working principle of the biomimetic sampling head (refer to existing technologies such as the structure of negative pressure sampling heads, etc.)

[0093] The biomimetic sampling head is the core of achieving "disturbance-free sampling," and its four-step "closing-opening-filling-closing" action relies on a precision mechanical structure.

[0094] Sampling tube: Made of 304 stainless steel, with an inner diameter of 50mm, a length of 1.2m, and a wall thickness of 2mm, ensuring strength and corrosion resistance.

[0095] Mechanical opening and closing device: A micro servo motor drives a spur gear set (module m=0.5, number of teeth of driving gear Z1=20, number of teeth of driven gear Z2=100, transmission ratio i=Z2 / Z1=5), which drives the sampling port baffle to rotate (opening angle 90°).

[0096] Sealing: A nitrile rubber sealing ring is used between the baffle and the sampling tube, with a sealing pressure ≥0.1MPa, to prevent sample leakage.

[0097] like Figure 2 The following is a flowchart of the bionic sampling head operation (taking a target depth of 2m as an example):

[0098] Closed insertion: The motor drives the gear set, the baffle is fully closed (proximity switch triggered), the sampling head is inserted vertically into the grain pile at a speed of 0.1m / s, and the grating ruler monitors the depth in real time.

[0099] When the depth reaches 2m, the PLC sends a command, the motor reverses, and the gear set drives the baffle to open (90°, triggered by the proximity switch). The opening time is ≤75ms (calculation: motor speed n1=1000rpm, output speed n2=n1 / i=200rpm, opening time t=θ / (2πn2 / 60)=90° / (2π×200 / 60)=0.075s).

[0100] Self-flowing filling: Grain flows into the sampling tube under gravity, an image sensor captures an internal image, and a pressure sensor monitors the pressure.

[0101] Closure and Removal: A multi-sensor fusion algorithm (CNN image recognition + pressure threshold judgment, see subsequent software introduction for details) is adopted. When the image recognition fill rate is ≥95% and the pressure sensor detection value is ≥7350Pa (corresponding to a grain bulk density of 1.5g / cm³), the removal is successful. 3 When the mechanical threshold is reached, the PLC triggers a closing command, the motor drives the gear set to close the baffle (the proximity switch confirms that it is in place), the sampling head is pulled out at a speed of 0.1m / s, and the Kalman filter algorithm corrects the motion trajectory deviation in real time.

[0102] 2.2 Mechanical motion platform: Vertical and horizontal motion control

[0103] Vertical motion system: A ball screw pair (lead P=10mm, accuracy class C7, pitch error ≤0.015mm / 300mm) is used. A servo motor is connected to the screw via a coupling to drive the sampling head up and down. Position-speed dual closed-loop PID control is employed, with a position loop proportional coefficient Kp=0.8, integral coefficient Ki=0.1, and derivative coefficient Kd=0.05, and a speed loop response time ≤50ms.

[0104] The lead screw drive efficiency η = 0.9, and the maximum load F = mg = 10 kg × 9.8 m / s 2 =98N, motor torque T=F×P / (2πη)=98×0.01 / (2π×0.9)≈0.175N·m, which is less than the motor's rated torque (1.27N·m), and meets the requirements.

[0105] Horizontal motion system: The robotic arm adopts synchronous belt drive (tooth pitch 5mm, length 2m, repeatability ±0.1mm), and the servo motor drives the synchronous pulley to move the sampling head along the X (vehicle length direction) and Y (vehicle width direction) axes to realize point switching.

[0106] 2.3 Control Unit: PLC and Communication

[0107] PLC configuration: Includes 14 digital inputs (DI), 10 digital outputs (DO), 2 analog inputs (AI), and 2 analog outputs (AO). DI is used to receive signals from sensors (proximity switches, linear scales), DO is used to control motor relays, AI is used to receive analog signals of displacement and pressure (4-20mA), and AO is used to output servo motor control voltage (0-10V).

[0108] Communication protocol:

[0109] PLC and servo driver (matching): adopts CANopen protocol (baud rate 500kbps) to transmit control commands (speed, torque) and status data (motor speed, current).

[0110] PLC and sensors (grating ruler, pressure sensor): Use Modbus RTU protocol (RS485 interface, baud rate 19200bps) to transmit measurement data.

[0111] PLC and terminal (touch screen): Uses Ethernet TCP / IP protocol (100Mbps baud rate) to transmit sampling parameters (target depth, number of points) and recorded data (sampling time, depth, fill rate).

[0112] III. Software System Introduction

[0113] As attached Figure 3 The hardware and software system shown adopts a "real-time operating system + driver layer + middleware layer + application layer" architecture to ensure the real-time performance and reliability of control.

[0114] 3.1 Real-time Operating System: Real-time Performance Guarantee

[0115] It adopts the VxWorks real-time operating system, with a kernel scheduling latency of ≤1ms, and supports multi-task concurrency (such as data acquisition, algorithm processing, and control command output), meeting the real-time requirements of the sampling process.

[0116] 3.2 Driver Layer: Hardware Device Control

[0117] The driver layer is responsible for interacting with hardware devices, and mainly includes:

[0118] Servo motor drive: Based on the CANopen protocol, S-shaped speed curve planning is implemented (acceleration and deceleration time 0.2s, maximum acceleration 1m / s²). Through dual closed-loop control of position loop (control cycle 1ms) and speed loop (control cycle 0.1ms), the motor speed and torque can be precisely adjusted with a speed control accuracy of ±0.1rpm.

[0119] Sensor driver: Implements data acquisition from a grating ruler (Heidenhain protocol, sampling frequency 1kHz, moving average filter, window size 5), a pressure sensor (4-20mA analog signal, first-order low-pass filter, cutoff frequency 10Hz), and an image sensor (USB 3.0 interface, ROI region cropping algorithm, only acquiring data from the 128×128 pixel area inside the sampling tube).

[0120] Actuator drive: Controls the relay outputs of the robotic arm and conveyor belt to achieve point switching and sample transport.

[0121] 3.3 Middleware Layer: Unified Data Interaction

[0122] A data bus is constructed using the OPC UA protocol (Open Platform Unified Communication Architecture), defining 32 standard data nodes (including sensor data, control command, and status parameter types). The data update cycle is 200ms, and a publish-subscribe mode is supported. For example, the depth data of the grating ruler is published in real time through the OPC UA server, and the application layer's point planning module subscribes to this data, combining it with encoder feedback to achieve dynamic correction of the motion trajectory.

[0123] 3.4 Application Layer: Core Function Implementation

[0124] The application layer is the core of a software system and includes the following modules:

[0125] 3.S1 Vehicle Parameter Scanning and Location Planning Module

[0126] Function: Based on the vehicle dimensions (L, W, H) scanned by the LiDAR, generate sampling points according to the GB / T 29890-2013 standard to ensure the uniformity of the point distribution (spacing error ≤ 5cm).

[0127] Algorithm: An improved genetic algorithm combined with a grid partitioning method is used. The steps are as follows: ① Divide the surface of the grain pile on the vehicle into 10cm×10cm grid units; ② Calculate the grain height of each grid unit based on LiDAR point cloud data; ③ Use a genetic algorithm (population size 50, crossover probability 0.7, mutation probability 0.05) to optimize and select 9 representative grid points, satisfying the stratified random sampling principle. The formula is as follows:

[0128] Number of points along the length direction: (One point every 0.5m, at least 3 points) : Number of sampling points along the length (integer); L: Length of the grain pile on the vehicle (unit: m), obtained by lidar scanning (e.g., L=6 m in the example); : Round up to the nearest integer to ensure the points cover the entire length range; 0.5m: Spacing between adjacent points along the length, conforming to the uniform distribution requirements of GB / T5491-2008 standard; Example: When L=6 m, =ceil(6 / 0.5)=12, meaning 12 points are evenly distributed along the length direction, with coordinates as follows: = 0, 0.5, 1.0, ..., 6.0 m;

[0129] Number of sampling points in the width direction: = 2 (1 point on each side of the vehicle, spaced W / 2), W: width of the grain pile on the vehicle (unit: m), obtained by lidar scanning; spacing W / 2: ensures symmetrical distribution, point coordinates are... = 4 and =3 4. (Avoid the marginal effect and improve representativeness);

[0130] Number of points in the depth direction: = 4 (0.5m, 1m, 1.5m, 2m, covering deep grain piles).

[0131] Coordinates of the sampling point: ,in:

[0132] = (i-1)× i=1,2,..., (Uniformly distributed along the length direction);

[0133] = (j-1)× j=1,2,..., (Symmetrically distributed in the width direction);

[0134] = (k-1)×0.5, k=1,2,..., (Increasing in depth), with 0.5m intervals to ensure coverage from the surface to the deepest layer (0.5m~2m) of the grain pile.

[0135] Example: A vehicle has L=6m, W=2.5m, and H=1.8m, then:

[0136] Genetic algorithm optimization steps: ① Initialize a set of 50 candidate sites; ② Use the uniformity of site distribution (standard deviation ≤ 0.3m) and the representativeness of grain pile height (covering 90% of the height range) as the fitness function; ③ After 20 generations of iteration (crossover probability 0.7, mutation probability 0.05), select 9 optimal sites to ensure that the representativeness of the sample is improved by 40%.

[0137] =ceil =12 → x_i=0, 0.5, 1.0,...,6.0m;

[0138] =2 → y_j=0.625m, 1.875m (W / 4, 3W / 4);

[0139] =4 → z_k=0.5m, 1m, 1.5m, 2m;

[0140] Total number of sampling points: 12 × 2 × 4 = 96, ensuring coverage of the entire grain pile.

[0141] The fitness function aims to achieve the following: uniformity of point distribution (standard deviation ≤ 0.3m) and representativeness of grain pile height (covering 90% of the height range). The standard deviation measures the dispersion of points on the surface of the grain pile; the smaller the deviation, the more uniform the distribution. The height representativeness ensures that the selected points cover 90% of the height range of the grain pile, avoiding the omission of samples from high / low areas.

[0142] Iteration parameters:

[0143] Population size: 50 (50 candidate site sets are generated in each iteration);

[0144] Crossover probability: 0.7 (70% probability of swapping parent site features to increase diversity);

[0145] Mutation probability: 0.05 (5% probability of randomly adjusting the location to avoid local optima);

[0146] Number of iterations: 20 (after 20 optimizations, 9 optimal positions were selected, improving representativeness by 40%).

[0147] Here is an example of a fitness function:

[0148] ,in:

[0149] F: Fitness value (the larger the value, the better the location set);

[0150] σ: Standard deviation of the distribution of points (unit: m), measures uniformity.

[0151] , ( The distance between points, (where N is the average spacing and N is the total number of points). The height range of the grain pile covered by the selected location (unit: m), such as from 0.5m to 2m covering 1.5m; Total height of the grain pile (unit: m), obtained by lidar scanning (e.g., H=1.8 m in the example); , Weighting coefficients ( =0.6, =0.4, prioritizing uniformity).

[0152] Explanation of the operating mechanism:

[0153] Uniformity optimization ( (Item): This involves calculating the standard deviation σ of the distance between all points. A smaller standard deviation indicates a more uniform distribution of points. For example, when σ ≤ 0.3 m, this item has a higher value, and the guiding algorithm prioritizes uniformly distributed point sets.

[0154] Highly representative optimization ( Item): Ensure the selected points cover more than 90% of the height range of the grain pile. For example, the total height of the grain pile. When the height is 1.8 m, at least 1.62 m (1.8 × 0.9) needs to be covered. If the coverage area is 0.5 m to 2 m (actual height 1.8 m), then... =1.8 / 1.8=1, this term takes the maximum value.

[0155] Comprehensive optimization: weighting coefficients , Balancing homogeneity and representativeness. For example, when the σ values ​​of two candidate point sets are 0.2m and 0.3m respectively, while... When all points satisfy 90% coverage, the point set factor with σ=0.2 m is... Larger ones are preferred.

[0156] In the iteration of the genetic algorithm:

[0157] Initialization: Randomly generate 50 sets of candidate locations;

[0158] Fitness calculation: Calculate the F-value for each set of points;

[0159] Selection: Keep the set of points with the highest F values ​​(top 20%);

[0160] Crossover / Mutation: A new set of sites is generated through crossover (70% probability) and mutation (5% probability). This process is repeated for 20 generations, and finally the 9 sites with the highest F-values ​​are selected, which improves the representativeness of the samples by 40%.

[0161] This mechanism transforms the goals of "uniform distribution" and "high coverage" into calculable fitness values ​​through mathematical quantification, guiding the algorithm to efficiently search for the optimal solution and ensuring that the sampling points are both uniform and reflect the overall quality of the grain pile. Through quantitative calculation of the three-dimensional coordinates of length, width, and depth, combined with genetic algorithm optimization, it ensures that the sampling points meet the principles of "random uniform distribution" and "stratified sampling," providing accurate spatial positioning data for subsequent undisturbed sampling.

[0162] 3. S2 Depth Positioning and Error Compensation Module

[0163] Function: Employing multi-sensor data fusion technology, it integrates information from the grating ruler (position data, sampling frequency 1kHz) and the encoder (speed data, sampling frequency 5kHz) in real time. Through the Kalman filter algorithm, it dynamically compensates for mechanical transmission backlash (≤0.02mm) and temperature drift (≤0.01mm / ℃), achieving a depth positioning error of ≤0.3mm (60% reduction in error compared to a single sensor).

[0164] Algorithm: Extended Kalman Filter (EKF) is used to optimize the state model of a nonlinear transmission system. The state vector is x = [s; v; b] (s: sampling head depth, v: velocity, b: transmission backlash compensation). The state equations and observation equations are as follows:

[0165] State equation: x(k) = A x(k-1) + B u(k-1) + w(k-1),

[0166] in:

[0167] A is the state transition matrix (3×3), which describes the evolution of the state over time.

[0168] (Δt=0.01s is the sampling time), the state transition matrix (3×3) describes the evolution of the state over time;

[0169] B is the input matrix (3×1), which associates control inputs with state changes:

[0170] u(k-1) is the motor control voltage;

[0171] (Process noise follows a Gaussian distribution) ,Q=diag([1e-6, 1e-4,1e-8]),

[0172] 1e-6: Depth Prediction Noise Variance (unit: mm) 2 This reflects small disturbances not considered by the model, such as airflow and minor vibrations. 1e-4: Variance of velocity prediction noise (unit: (mm / s) 2 ) Reflects the effects of motor speed fluctuations and load changes; a larger value indicates higher uncertainty in speed estimation; 1e-8: Clearance compensation noise variance (unit: mm) 2 The transmission clearance changes slowly over a short period of time, resulting in minimal noise. The settings are based on the motor speed fluctuation characteristics, with the weighting principle: position noise variance < speed noise variance, consistent with the motor speed fluctuation characteristics.

[0173] Observation equation: y(k) = Cx(k) + v(k), where:

[0174] y(k) is the observation value of the grating ruler (1×1), that is, the depth data measured by the grating ruler (unit: m).

[0175] For the observation matrix (1×3), extract the positional information from the state vector: ;

[0176] (Observation noise (1×1), follows a Gaussian distribution, R=1e-5, based on the accuracy parameter settings in the grating ruler manual, automatically calibrated once per hour to eliminate the effects of temperature drift and mechanical wear).

[0177] The state equation predicts the current state x(k) using the previous state x(k-1) and the control input u(k-1), and introduces process noise w(k-1) to reflect the model uncertainty;

[0178] The observation equation correlates the current state x(k) with the sensor measurement y(k), and the observation noise v(k) reflects the sensor error.

[0179] Kalman filtering process:

[0180] Execution cycle: 10ms / time, synchronized with the servo motor control cycle to ensure real-time compensation during motion;

[0181] Prediction step:

[0182] ,

[0183] ,

[0184] in, The predicted state at time k (based on the current state prediction value estimated at the previous time). To predict the covariance (the covariance matrix of the predicted state (3×3), representing the prediction uncertainty).

[0185] The current state is predicted using the state transition matrix A and the input matrix B, and the covariance matrix is ​​used to predict the current state. Quantifying prediction errors and using process noise Q ensures the inclusion of model uncertainties.

[0186] Update steps:

[0187] ,

[0188] ,

[0189] P(k|k) = (I - K(k) C) ,

[0190] in:

[0191] T represents transpose;

[0192] For the Kalman gain (3×1), a trade-off is made between the reliability of prediction and observation: when the measurement noise R is small, Increased confidence in measurements leads to greater trust in the predicted covariance. When it is large, Increase, correcting prediction bias;

[0193] The updated state at time k (the state estimate after fusion of observations). To measure the residual (the difference between the actual grating ruler reading and the predicted depth; the residual contains systematic error information and is used to correct all state variables);

[0194] P(k|k) represents the updated covariance.

[0195] Kalman gain K(k): If the observation noise RR is small (high sensor accuracy), K(k) increases and becomes more dependent on the observed value; if the process noise Q is small (accurate model), K(k) decreases and becomes more dependent on the predicted value.

[0196] State update: using observation residuals The predicted values ​​are corrected to obtain the optimal state estimate.

[0197] Covariance update: The covariance matrix is ​​adjusted by K(k) to reflect the uncertainty of the updated state.

[0198] Results: By fusing data from the grating ruler (position) and the encoder (speed), the depth positioning error (≤0.05mm) is dynamically compensated. After 100 repeated experiments, the depth positioning error was reduced from ±1.5mm (using only the grating ruler) to ±0.3mm (after Kalman filtering), with a 95% confidence interval error ≤0.25mm, meeting the millimeter-level accuracy requirements for sampling depth in GB / T 29890-2013.

[0199] 3.S3 Opening / Closing Timing Control Module

[0200] Function: Ensures that the sampling port opens precisely when the sampling head reaches the target depth (error ≤ 0.1s).

[0201] Algorithm: Feedforward compensation + position closed-loop feedback control, combined with a mechanical inertia compensation model, the process is as follows:

[0202] Target depth determination: When the grating ruler measurement value s(k) is close to the target depth (e.g., 2m) Calculate the motor deceleration time :

[0203] ,in, Current speed (measured by encoder, in m / s). (Target speed) (The maximum acceleration or deceleration of the motor should be set according to the servo motor manual.)

[0204] Early triggering: The start command is sent t_delay time in advance to compensate for mechanical transmission backlash (0.02s) and motor response delay (0.03s), t_delay=t_decelerate+0.05s. If v0=0.1m / s, then t_decelerate=0.02s, t_delay=0.07s, and the command is sent 70ms in advance.

[0205] Position confirmation: When the sampling port is opened to 90°, the proximity switch is triggered and a signal is sent to the PLC to confirm that the opening is complete (to avoid gear jamming).

[0206] Results: The opening and closing timing error was reduced from ±0.5s (uncompensated) to ±0.05s (feedforward + feedback), ensuring that the sampling head opens the sampling port just as it reaches the target depth.

[0207] 3.S4 Sample Filling Status Recognition Module

[0208] Function: Real-time monitoring of whether the sampling tube is filled with sample (fill rate ≥ 95%).

[0209] Algorithm: Convolutional Neural Network (CNN) + stress threshold, the process is as follows:

[0210] Image acquisition: The image sensor captures an image of the inside of the sampling tube (640×640 pixels) and transmits it to the edge computing module (Jetson Nano).

[0211] CNN model inference: A lightweight YOLOv5s model (input 320×320 pixels) is used, with model pruning (30% channel pruning rate) and INT8 quantization, adapted to Jetson Nano computing power (inference speed 20fps). Input image, output fill rate. (0-100%). The model training data consists of 1000 labeled images (including wheat, rice, and corn, with a fill rate of 0-100%): 800 images for training, 100 images for validation, and 100 images for testing. Training parameters: batch size 16, epochs=100, learning rate 0.01 (cosine annealing scheduling), and loss function is mean squared error (MSE).

[0212] ,

[0213] in, Let be the fill rate of the labeled image i. Let (N) be the output fill rate for the i-th image, and (N) be the batch size.

[0214] Pressure-assisted judgment: The pressure sensor measurement value P(k) is compared with the threshold P_th, where P_th = ρgh (ρ is the bulk density of grain, wheat ρ = 1.2 g / cm³). 3 (where h = 0.6m is the effective filling height of the sampling tube), the calculated value is P_th = 1.2 × 9.8 × 0.6 × 10⁻⁶. 3 =7056Pa (taking a safety factor of 1.04, the actual threshold is 7350Pa).

[0215] Decision output: When When the sample is filled to ≥95% and P(k)≥7350Pa, a closing command is sent.

[0216] Results: In tests on wheat, rice, and corn samples, the accuracy rate for identifying the filling status was ≥99% (100 images / class in the test set), the false positive rate was ≤1% (all at the critical state of 94-95% filling rate), and the average response time was 180ms, ensuring timely closure after the sample was fully filled. The sample filling degree was determined by CNN image recognition (4-megapixel images) (accuracy ≥98%), combined with a pressure sensor threshold (≥7350Pa) to trigger the closure command.

[0217] 3. S5 Motion Trajectory Optimization Module

[0218] Function: Through dynamic trajectory planning and real-time attitude adjustment, ensure vertical movement of the sampling head during insertion / removal (tilt angle ≤ 0.3°) and reduce disturbance to the grain pile (disturbance range ≤ 8cm × 8cm).

[0219] Algorithm: S-shaped velocity curve + adaptive PID control, combined with robotic arm posture compensation, the process is as follows:

[0220] Trajectory planning: Generate a trapezoidal velocity curve (acceleration-constant speed-deceleration), with the following parameters:

[0221] Maximum speed (Adjusted dynamically according to grain pile density: 0.1 m / s for wheat and 0.08 m / s for rice).

[0222] acceleration ;

[0223] Acceleration time ;

[0224] deceleration time ;

[0225] Uniform time (like ,but ).

[0226] PID control: Adjusting the servo motor output to track the trapezoidal curve; PID controller formula:

[0227] ,

[0228] in, The servo motor control voltage is adjusted by regulating the weights of the three components to achieve precise tracking of the sampling head's motion trajectory (such as a trapezoidal velocity curve). (Position error) Set the target location (e.g., preset the depth of the sampling head). The actual position measured by the grating ruler serves as the input signal for PID control, directly reflecting the degree to which the system deviates from the target. (The proportional coefficient is adaptively adjusted from 0.8 to 1.2; this can be adjusted based on the current error.) Directly generating control output; the larger the proportional coefficient, the more sensitive the response to errors, but too large a coefficient can lead to overshoot or oscillation; Adaptive adjustment: dynamically optimizing based on grain pile resistance (such as pressure sensor feedback), for example, increasing the proportional coefficient when resistance increases. To ensure movement speed). (The gain coefficient of the integrator, ranging from 0.05 to 0.2, has anti-integral saturation function. This is achieved by accumulating the error.) Eliminate steady-state errors (such as positioning deviations caused by mechanical transmission backlash). When the control output reaches its limit (such as the maximum torque of the motor), pause integral accumulation to avoid recovery delay when the error reverses. (The gain coefficient of the differential element, with a value range of 0.01-0.05.)

[0229] Based on the rate of change of error Preemptively suppress overshoot, for example, by decelerating the sample head through differential action when it approaches the target depth to avoid overshoot.

[0230] The three coefficients are tuned using the Ziegler-Nichols method. The critical proportional gain and oscillation period are determined experimentally, and the initial parameters are calculated. Automatic calibration: fine-tuning is performed hourly based on actual operating data (such as positioning error trends). , , (To ensure long-term control accuracy).

[0231] Results: After 100 repeated experiments, the error of the sampling head motion trajectory was reduced from ±2mm (without optimization) to ±0.5mm (S-curve + adaptive PID), the tilt angle was ≤0.3° (measured by laser tilt sensor), and the grain pile disturbance range was 8cm×8cm (captured by high-speed camera), which reduced the disturbance by 86% compared with the traditional negative pressure sampling (60cm×60cm).

[0232] IV. Software and hardware interaction and intelligent control process (e.g.) Figure 4 (As shown)

[0233] S1, System Initialization

[0234] (1) Power on: Connect the main power supply. The PLC, servo driver and sensor will perform self-test (green indicator light indicates normal operation).

[0235] (2). Parameter loading: The PLC loads the default sampling parameters (depth 2m, number of points 96, dwell time 10s).

[0236] (3) Sensor calibration: Zero the grating ruler (trigger the bottom reference point switch, repeat positioning 3 times and take the average value), the pressure sensor adopts the two-point calibration method (0kPa and 5kPa standard pressure sources), and the image sensor white balance calibration (standard white board correction).

[0237] (4). Communication test: The PLC communicates with the servo driver and the terminal (sends a "heartbeat packet" and receives a response).

[0238] (5) Standby state: The robotic arm returns to the initial position (x=0, y=0, z=0), the sampling port closes, and it waits for the sampling command.

[0239] S2, Vehicle Scanning and Location Planning

[0240] (1) Vehicle entry: When the vehicle drives to the sampling area, the lidar starts scanning (scanning range 10m×10m).

[0241] (2). Size calculation: The lidar point cloud data is transmitted to the PLC. The improved RANSAC algorithm (500 iterations, distance threshold 0.05m) is used to fit the vehicle boundary (straight line fitting, error ≤0.1m). L, W, and H are calculated (e.g., L=6m, W=2.5m, H=1.8m). Outliers (data outside the mean distance 3σ) are removed.

[0242] (3) Point generation: The PLC calls the point planning module to generate the coordinates of 96 sampling points (x... i , y j , z k ).

[0243] (4). Parameter confirmation: The terminal displays the vehicle size and location, and the operator confirms (parameters can be modified, such as adjusting the depth to 1.5m).

[0244] (5). Instruction issued: The PLC sends the point data to the robotic arm controller to prepare for sampling.

[0245] S3, Sampling head insertion control

[0246] (1). Point movement: The robotic arm drives the sampling head to move along the X and Y axes to the first point (x=0, y=0.625m).

[0247] (2) Vertical descent: The PLC sends a command to the vertical motion servo motor to descend according to the S-shaped speed curve (v_max=0.1m / s, acceleration a=0.5m / s²). The pressure sensor monitors the resistance of the grain pile in real time. When the resistance is >5N, the speed is automatically reduced to 0.05m / s.

[0248] (3) Depth monitoring: The grating ruler collects depth data s(k) in real time and transmits it to the PLC.

[0249] (4) Error Compensation: The PLC runs an extended Kalman filter algorithm, integrates encoder speed data (5kHz sampling) and grating ruler position data (1kHz sampling), and corrects the transmission backlash (b=0.02mm) in real time through the state vector x=[s; v; b] to obtain accurate depth. The filtering period is 10ms.

[0250] (5). Deceleration judgment: When (For example, when 2m - 0.5×a×t²=2m - 0.5×5×0.2²=1.99m, where a is the motor deceleration of 5m / s² and t is the deceleration time of 0.2s), a deceleration command is sent.

[0251] (6). Depth confirmation: When When the distance is 2m, send a stop command (motor stops, error ≤0.3mm).

[0252] (7). Open the sampling port: The PLC sends an open command, and the micro servo motor drives the gear set to open the sampling port (90°, triggered by the proximity switch).

[0253] (8) Status feedback: The PLC receives the proximity switch signal, confirms that the opening is complete, and enters the filling monitoring stage.

[0254] S4, Sample Filling Monitoring

[0255] (1). Image acquisition: The image sensor starts to capture the image inside the sampling tube (30fps). The effective area of ​​128×128 pixels is extracted by the ROI region cropping algorithm, and after median filtering and noise reduction, it is transmitted to the edge computing module.

[0256] (2). Fill rate recognition: The edge computing module runs a lightweight YOLOv5s model (INT8 quantization), inputs the preprocessed image, and outputs the fill rate in real time through a sliding window. (e.g., 0%→10%→...→95%), inference time ≤50ms / frame.

[0257] (3) Pressure monitoring: The pressure sensor collects pressure data P(k) in real time and transmits it to the PLC (sampling frequency 1kHz).

[0258] (4). Threshold comparison: The PLC will Compared with y_threshold=95% and P(k) and P_threshold=7350Pa, a double threshold hysteresis comparison method (triggered at 95% on rising edge and reset at 90% on falling edge) is used to avoid misjudgment.

[0259] (5). Full of confirmation: when ( When P(k) ≥ 95%) and P(k) ≥ 7350 Pa, the PLC sends a closing instruction.

[0260] (6) Closing the sampling port: The micro servo motor drives the gear set to close the sampling port (triggered by proximity switch).

[0261] (7) Status feedback: The PLC receives the proximity switch signal and confirms that the closing is complete.

[0262] (8) Filling record: PLC records filling time (e.g., 10s), filling rate (98%), and pressure (7500Pa).

[0263] S5. Sample head removal and sample transport

[0264] (1). Vertical ascent: The PLC sends a command to the vertical motion servo motor, following the S-shaped speed curve ( =0.1m / s², acceleration a=0.5m / s² 2 As the speed increases, the encoder provides real-time feedback to ensure a shock-free start-up.

[0265] (2). Depth monitoring: The grating ruler collects depth data in real time. When s(k)=0m (initial position), a stop command is sent.

[0266] (3). Move to the conveyor: The robotic arm drives the sampling head to move along the X and Y axes to the top of the conveyor belt (x=0, y=0).

[0267] (4) Open the sampling port: The PLC sends a command to open the sampling port (triggered by the proximity switch), and the sample falls into the conveyor belt.

[0268] (5) Sample transport: The conveyor belt is started (speed 0.1m / s) to transport the sample to the sample container.

[0269] (6) Weight detection: The weight sensor measures the weight of the sample (e.g., 1.02kg) to confirm that it meets the requirements (1kg±50g).

[0270] (7) Closing the sampling port: After the sample is transported, the PLC sends a command to close the sampling port (triggered by the proximity switch).

[0271] (8). Return to initial position: The robotic arm drives the sampling head back to the initial position (x=0, y=0, z=0).

[0272] (9) Data recording: The PLC records the sampling time (10:00:00), location (x=0, y=0.625m, z=0.5m), and sample weight (1.02kg), and uploads the data to the SQL Server database in real time via the OPC UA protocol. The data storage period is ≥1 year.

[0273] S6, Loop and End

[0274] (1). Next point: PLC calls the next point (x=0, y=0.625m, z=1m), repeating steps 11-35.

[0275] (2). Complete: When all 96 points are completed, the PLC sends an end command.

[0276] (3). System reset: The robotic arm and sampling head return to their initial positions, and the sampling port closes.

[0277] (4) Data export: The terminal generates a sampling report (PDF format), which includes vehicle information, location data, and sample parameters (moisture and bulk density).

[0278] (5) Standby state: The system returns to the initialization state and waits for the next vehicle.

[0279] V. System Reliability and Technical Effectiveness Verification

[0280] 5.1 Reliability

[0281] redundancy:

[0282] The PLC adopts a dual-machine hot standby architecture (the master and slave PLCs synchronize data in real time via PROFINET, with a switching time of ≤1s and support for seamless I / O status connection).

[0283] The grating ruler adopts a dual-sensor redundant configuration (Heidenhain LC183×2, parallel acquisition, alarm triggered when data deviation > 0.02mm).

[0284] The servo motor uses a multi-turn absolute encoder (25-bit resolution, supports power-off memory, and works with a magnetic encoder to achieve redundant speed measurement).

[0285] Anti-interference:

[0286] The power supply uses an isolation transformer (1:1, 5kVA capacity) to prevent grid interference.

[0287] The signal lines use shielded cables (aluminum foil + braided mesh, grounding resistance ≤1Ω) to reduce electromagnetic interference;

[0288] The PLC input / output modules employ opto-isolation (isolation voltage ≥2500V) to prevent external signal interference.

[0289] Maintenance mechanism:

[0290] Perform regular self-checks (check the status of sensors, motors, and gear sets every time you turn on the machine).

[0291] Vibration monitoring (accelerometer installed in the lead screw bearing housing, sampling frequency 1kHz; when the effective vibration value is ≥0.5mm / s (ISO 10816 standard), a level three alarm is issued to prompt maintenance).

[0292] Data traceability (stored for more than 1 year to facilitate querying the cause of failure, such as sampling data from October 1, 2023).

[0293] 5.2 Verification of Technical Effectiveness

[0294] Repeatability test: According to GB / T 5491-2008 standard, 10 independent samples were taken from the same location (x=3m, y=1.25m, z=1.5m) of the same vehicle, and the moisture content (%) of the samples was measured using a near-infrared moisture meter (accuracy ±0.2%).

[0295] frequency 1 2 3 4 5 6 7 8 9 10 Moisture (%) 12.1 12.2 12.1 12.3 12.2 12.1 12.2 12.3 12.1 12.2

[0296] The mean μ = 12.18%, the standard deviation σ = 0.07%, and the coefficient of variation CV = σ / μ × 100% = 0.57% (≤1%, which meets the requirements).

[0297] Representative test: Referring to GB / T 29890-2013 "Sampling and Dividing Methods for Grain and Oil Inspection", samples were taken from grain piles at depths of 0.5m, 1m, 1.5m, and 2m using both robotic and manual (experienced samplers) methods. The bulk density (g / L) was measured using the bulk density meter method (accuracy ±1g / L).

[0298] Depth (m) robot artificial difference 0.5 780 778 +2 1 785 783 +2 1.5 790 788 +2 2 795 793 +2

[0299] The difference is ≤2g / L (≤5g / L, which meets the requirements), indicating that the robot sampling is representative of the same as the manual sampling.

[0300] Disturbance test: The sampling process was filmed using a high-speed camera (Phantom v2512, 1000fps, 1280×800 resolution), and the disturbance range on the grain pile surface was measured using an image difference algorithm.

[0301] Robot sampling: 8cm×8cm (≤10cm, meeting the requirements for no disturbance);

[0302] Traditional negative pressure sampling: 60cm×60cm (≥50cm, large disturbance).

[0303] Efficiency test: Sampling was conducted on 10 standard trucks (each 6m × 2.5m × 1.8m, with a wheat load of approximately 27 tons). The measurement time (including vehicle positioning, scanning, 96-point sampling, and sample compilation) was recorded.

[0304] Robot: 3 minutes / vehicle (96 locations);

[0305] Manual labor: 10 minutes / vehicle (10 locations);

[0306] Efficiency improvement: 233% (Robots are 3.3 times more efficient than humans, based on an equivalent conversion of 96 points / 10 points per vehicle).

[0307] Therefore, the control system and method of the fully automated bionic sampling robot of this invention achieve the core goal of "disturbance-free sampling" through the "mechanical bionic" technology path. The system adopts a three-layer architecture of "perception-decision-execution", integrating multi-source sensors (LiDAR, grating ruler, pressure sensor, etc.), precision mechanical structure (bionic sampling head, vertical motion platform), and intelligent algorithms (extended Kalman filter, lightweight YOLOv5s, adaptive PID), constructing a fully automated control system from vehicle scanning to sample delivery, ensuring full automation (0% human intervention), high precision (depth error ≤0.3mm), and high reliability (MTBF≥15000 hours) in the sampling process. Experimental results show that the system's repeatability (CV=0.57%), representativeness (difference from human sampling ≤2g / L), perturbation resistance (8cm×8cm), and efficiency (3.3 times that of human sampling) are all superior to traditional sampling methods, meeting the needs of grain purchasing, storage, and processing scenarios, and has broad application value.

[0308] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 5As shown, electronic device 410 may include a first processor 2001.

[0309] Optionally, the electronic device 410 may also include a memory 2002 and a transceiver 2003.

[0310] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.

[0311] The following is combined Figure 5 A detailed description of each component of electronic device 410 is provided below:

[0312] The first processor 2001 is the control center of the electronic device 410. It can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).

[0313] Optionally, the first processor 2001 can perform various functions of the electronic device 410 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.

[0314] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently and be connected via the interface circuit of the electronic device 410. Figure 5 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.

[0315] It should be noted that, Figure 5 The structure of the electronic device 410 shown does not constitute a limitation on the router. Actual knowledge structure identification devices may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0316] Furthermore, the technical effects of the electronic device 410 can be referred to the technical effects of the method described in the above method embodiments, and will not be repeated here.

[0317] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A fully automated biomimetic sampling robot control system, characterized in that, Adopting a three-layer intelligent control architecture of perception-decision-execution: The perception layer includes a lidar for acquiring three-dimensional point cloud data of the vehicle, a grating ruler displacement sensor for measuring the depth information of the sampling head, a pressure sensor for measuring the pressure of grain inside the sampling tube, an image sensor for capturing images of the inside of the sampling tube, a proximity switch for detecting the opening and closing state of the sampling port, and an encoder for measuring the motor speed and angle. The decision layer, with a PLC as its core and an integrated edge computing module, is used to process perception layer data and generate control commands. It includes: a point planning module that uses an improved genetic algorithm to generate sampling point plans based on lidar point cloud data; a depth positioning module that uses a Kalman filter algorithm to fuse grating ruler and encoder data and to compensate for depth positioning errors; a filling recognition module that uses a convolutional neural network model to identify sample filling status based on image sensor data; and an adaptive PID control module that dynamically adjusts the insertion speed of the sampling head based on pressure sensor feedback. The execution layer includes a vertical motion platform for raising and lowering the sampling head, a robotic arm for driving the sampling head to the target position, a bionic sampling head for opening and closing the sampling port, and a sample delivery device for transporting the sample.

2. The fully automated bionic sampling robot control system according to claim 1, characterized in that, The biomimetic sampling head includes a sampling tube and a mechanical opening and closing device; the mechanical opening and closing device is driven by a micro servo motor to drive the sampling port baffle to rotate and achieve opening and closing, and a sealing ring is provided between the baffle and the sampling tube.

3. The fully automated bionic sampling robot control system according to claim 1, characterized in that, The vertical motion platform uses a ball screw pair driven by a servo motor, which is controlled by a position-speed dual closed-loop PID control algorithm.

4. The fully automated bionic sampling robot control system according to claim 1, characterized in that, The PLC used in the decision-making layer is a Siemens S7-1200 series. The PLC communicates with the servo driver via the CANopen protocol, with the sensor via the Modbus RTU protocol, and with the terminal touch screen via the Ethernet TCP / IP protocol.

5. The fully automated bionic sampling robot control system according to claim 1, characterized in that, The decision-making layer software system adopts a real-time operating system and includes a driver layer, a middleware layer, and an application layer. The middleware layer uses the OPC UA protocol to build a data bus. The application layer includes a vehicle parameter scanning and point planning module, a depth positioning and error compensation module, an opening and closing timing control module, a sample filling status recognition module, and a motion trajectory optimization module.

6. The fully automated bionic sampling robot control system according to claim 5, characterized in that, The depth positioning and error compensation module uses an extended Kalman filter algorithm. The state vector includes the sampling head depth, movement speed, and transmission clearance compensation amount to fuse the position data of the grating ruler and the speed data of the encoder.

7. A fully automated biomimetic sampling robot control method, applied to the control system described in any one of claims 1-6, characterized in that, Includes the following steps: S1. System initialization: Perform device self-test, sensor calibration and communication test to put the system into standby mode; S2. Vehicle Scanning and Point Planning: Vehicles are scanned using LiDAR to acquire 3D point cloud data, and uniformly distributed sampling point coordinates are generated based on an improved genetic algorithm. S3. Sampling head insertion control: Control the robotic arm to move the sampling head above the target point, control the vertical motion platform to insert the sampling head into the grain pile to the target depth according to the predetermined speed curve, and control the bionic sampling head to open the sampling port when the target depth is reached. S4. Sample filling monitoring: The sample filling status in the sampling tube is monitored in real time by image sensor and pressure sensor. When the filling rate reaches the set threshold and the pressure reaches the corresponding threshold, the bionic sampling head is controlled to close the sampling port. S5. Sampling head extraction and sample transport: Control the vertical motion platform to extract the sampling head according to the predetermined speed curve, control the robotic arm to move the sampling head above the sample transport device, open the sampling port to discharge the sample, and the sample transport device completes the transport. S6. Cycle and End: Repeat steps S3 to S5 until all planned points have been sampled. The system will then reset and generate a report.

8. The fully automated bionic sampling robot control method according to claim 7, characterized in that, During the insertion of the sampling head in step S3, the extended Kalman filter algorithm is used to fuse the depth measurement data of the grating ruler and the speed data of the encoder in real time, and to dynamically compensate for transmission gap and temperature drift in order to achieve accurate depth positioning.

9. The fully automated bionic sampling robot control method according to claim 7, characterized in that, In step S4, the image inside the sampling tube acquired by the image sensor is identified by a convolutional neural network model to obtain the real-time filling rate; and the sample is confirmed to be full by a dual threshold judgment method in combination with the measurement value of the pressure sensor.

10. The fully automated bionic sampling robot control method according to claim 7, characterized in that, In steps S3 and S5, the predetermined speed curve is an S-shaped speed curve; the servo motor is controlled by an adaptive PID control algorithm to track the speed curve, thereby achieving smooth insertion and removal of the sampling head.