A fixed type rubber tapping machine multi-motor cooperative control method, system, medium and equipment
By predicting the trunk curvature through multi-frame data sliding filtering and least squares fitting, and combining stepper motor and DC motor coordinated control, the problem of cutting accuracy and adaptability of fixed rubber tappers under irregular trunk shapes was solved, achieving improved high precision, stability and environmental adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INFORMATION SCI & TECH UNIV
- Filing Date
- 2026-04-01
- Publication Date
- 2026-06-23
AI Technical Summary
Existing stationary rubber tapping machines suffer from low cutting precision and poor adaptability when cutting rubber trees. In particular, they cannot achieve precise adaptation and multi-motor coordination when facing irregular tree trunk shapes, resulting in a lagging tapping path, over-cutting of trees or under-cutting and reduced production. Furthermore, they lack the ability to resist interference.
Multi-frame data sliding filtering and least squares fitting are used to predict the change in tree trunk curvature. Combined with the coordinated control of stepper motors and DC motors, precise synchronization and emergency safety braking of stepper motors and DC motors are achieved through timed interrupts and external interrupts. With the help of historical error compensation and timing synchronization calibration, the accuracy of cutting depth and trajectory is ensured.
Significantly improves cutting accuracy, with cutting depth error controlled within 1mm, strong adaptability to tree trunk shape, response delay less than 10ms, strong environmental anti-interference ability, lower failure rate than existing equipment, smooth cutting surface, and improved latex flow efficiency by 15% to 20%.
Smart Images

Figure CN122268200A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural machinery automation technology, and in particular to a method, system, medium and equipment for multi-motor coordinated control of a stationary rubber tapper. Background Technology
[0002] As an industrial raw material, the automated harvesting of natural rubber is a key direction for solving labor shortages and improving production efficiency. Stationary rubber tappers, due to their simple structure and low deployment cost, have become an important technological route for automated rubber tapping. However, existing technologies have significant shortcomings in two core aspects: "precise adaptation to tree trunk shape" and "multi-motor coordination," resulting in insufficient tapping accuracy and practicality. Algorithm Level: Lack of Multi-Frame Data Fitting and Forward-Looking Control Capabilities. Existing fixed rubber tapping machines rely heavily on "single distance sampling + threshold comparison" or "basic PID adjustment" for distance feedback, without performing time-series processing on the distance data on the trunk surface. Rubber tree trunks have non-linear morphologies such as uneven thickness, protruding burls, and local depressions. Single sampling data is easily affected by environmental interference (such as bark humidity and dust), resulting in errors. Basic PID can only adjust based on the current error and cannot predict subsequent changes in trunk morphology. This causes the cutting path to lag behind the actual trunk outline, resulting in problems such as "overcutting and damaging the tree" or "undercutting and reducing yield." The depth error often exceeds 2mm, which does not meet agronomic requirements (≤1mm).
[0003] At the motor coordination level: poor motion synchronization and lack of precise linkage mechanism. In existing equipment, the control of radial feed and retraction (mostly stepper motors) and circumferential rotation / up and down feed (mostly DC motors) are independent: the feed amount of the stepper motor is adjusted only according to the current distance value, and the trajectory speed of the DC motor is a fixed preset value. There is no timing calibration or motion linkage between the two. When the tree trunk suddenly protrudes, the stepper motor's retraction action and the DC motor's deceleration action are not synchronized, which can easily lead to tool jamming or tree scratches. Moreover, there is a lack of periodic synchronous detection mechanism. After long-term operation, the motor displacement deviation accumulates, further reducing the cutting accuracy.
[0004] The existing system lacks anti-interference and adaptability. It does not optimize data processing logic for outdoor rubber tapping environments (humid and vibrating). Ultrasonic ranging data is easily affected by environmental noise and lacks filtering mechanisms such as sliding windows, which causes abnormal data to directly trigger motor action. At the same time, the motor control lacks "historical error compensation" and cannot correct feed deviations caused by mechanical wear and voltage fluctuations, resulting in a continuous decline in accuracy during continuous rubber tapping operations. Summary of the Invention
[0005] To address the problems of low cutting accuracy and poor adaptability caused by the lack of forward-looking prediction in algorithms and the lack of precise motor coordination in existing fixed rubber tapping machines, the purpose of this invention is to provide a multi-motor collaborative control method, system, medium, and equipment for fixed rubber tapping machines. This method can adapt to irregular shapes such as tree trunks, burls, and depressions, while also possessing environmental resistance to interference and long-term operational accuracy and stability.
[0006] To achieve the above objectives, in a first aspect, the technical solution adopted by the present invention is as follows: a multi-motor coordinated control method for a fixed rubber tapping machine, comprising: periodically collecting multiple frames of distance data on the trunk surface according to a set period, and filtering the collected data through a sliding window to remove interference to obtain a distance reference value; using the least squares method to fit the distance reference value data to a distance-tool position curve to predict the trend of trunk curvature change; calculating the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the tool according to the trend of trunk curvature change and combined with a preset tapping depth, and synchronously generating trajectory adjustment commands for a first DC motor used to control the circumferential rotation of the tool and a second DC motor used to control the up and down feed of the tool; sending the micro-feed amount and speed and the trajectory adjustment commands to the stepper motor and the two DC motors respectively within the same interruption period, and achieving precise synchronization and emergency safety braking of the stepper motor and the two DC motors through timed interrupt and external interrupt coordination.
[0007] Furthermore, based on the least squares method, distance-tool position curve fitting is performed on the distance reference data to predict the trend of trunk curvature change, including: Using "tool circumferential rotation angle and / or vertical feed displacement" as the abscissa and the distance reference value as the ordinate, the coordinate data of multiple interruption cycles are accumulated, and the distance-tool position curve of the trunk surface is obtained by fitting using the least squares method. The curvature change rate of the current region is calculated by using the second derivative of the curve, and the trunk shape trend of subsequent interruption cycles is predicted.
[0008] Furthermore, based on the trend of trunk curvature change and combined with the preset tapping depth, the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the cutting tool are calculated, including: When the curvature is positive, the predicted surface of the trunk is convex. In this case, the feed rate is reduced or a retraction command is generated. The retraction amount = predicted convex height + 0.2mm. When the curvature is negative, the predicted trunk surface is concave. Increase the feed rate, feed rate = concave depth + 0.1mm.
[0009] Furthermore, the stepper motor's micro-feed calculation also includes historical error compensation: the deviation between the actual cutting depth and the preset depth of the previous 3 interrupted cycles is accumulated. If the average deviation is >0.3mm, the compensation amount is added to the current feed amount to ensure depth control accuracy; compensation amount = average deviation × 0.5.
[0010] Furthermore, based on the trend of trunk curvature change and combined with the preset tapping depth, trajectory adjustment instructions are generated for the first DC motor for controlling the circumferential rotation of the tool and the second DC motor for controlling the up and down feed of the tool. These instructions include: adjusting the speed of the first DC motor and the feed step size of the second DC motor according to the rate of curvature change to ensure a smooth transition of the spiral trajectory. The speed adjustment range of the first DC motor is ≤5% or the interruption cycle; the step size adjustment range of the second DC motor is ≤0.5mm or the interruption cycle.
[0011] Furthermore, within the same interrupt cycle, the micro-feed amount, speed, and trajectory adjustment commands are sent to the stepper motor and the two DC motors respectively. Through the coordination of timed interrupts and external interrupts, precise synchronization of the stepper motor and the two DC motors' movements and emergency safety braking are achieved, including: Within the same interruption cycle, the micro-feed amount, speed and trajectory adjustment instructions are synchronously transmitted to the multi-motor drive unit of the fixed rubber tapping machine. The three motors are started and adjusted simultaneously according to a unified time base. The stepper motor is controlled to adjust the cutting depth, and the two DC motors adjust the trajectory synchronously. The instruction output delay is ≤1ms. If the photoelectric switch is triggered, an external interrupt is immediately triggered, forcibly cutting off the enable signal of the multi-motor drive unit and stopping all motor operation. The response time is ≤5ms.
[0012] Furthermore, multi-motor collaborative execution also includes timing synchronization calibration: every 10 interrupt cycles, the actual displacement of the dual DC motors and the actual feed of the stepper motor are checked. If the displacement deviation is greater than the set displacement deviation or the feed deviation is greater than the set feed deviation, the timing of the motor control signal output in the next interrupt cycle is adjusted to ensure that the three actions are synchronized.
[0013] Secondly, the technical solution adopted by this invention is as follows: a multi-motor collaborative control system for a fixed rubber tapping machine, comprising: a distance data acquisition module, which periodically acquires multiple frames of distance data on the trunk surface according to a set period, and filters the acquired data through a sliding window to remove interference and obtain a distance reference value; a trunk curvature prediction module, which performs distance-tool position curve fitting on the distance reference value data based on the least squares method to predict the trend of trunk curvature change; a motor control command acquisition module, which calculates the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the tool according to the trend of trunk curvature change and combined with the preset tapping depth, and synchronously generates trajectory adjustment commands for a first DC motor used to control the circumferential rotation of the tool and a second DC motor used to control the up and down feed of the tool; and a collaborative control module, which sends the micro-feed amount and speed and trajectory adjustment commands to the stepper motor and the two DC motors respectively within the same interrupt cycle, and achieves precise synchronization of the actions of the stepper motor and the two DC motors and emergency safety braking through timed interrupt and external interrupt collaboration.
[0014] Thirdly, the technical solution adopted by the present invention is: a computer-readable storage medium for storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any of the methods described above.
[0015] Fourthly, the technical solution adopted by the present invention is: a computing device comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for performing any of the methods described above.
[0016] Because of the above technical solutions, the core advantage of this invention lies in the improved accuracy and adaptability brought about by the fusion of "algorithm and motor," and it has the following advantages: 1. The cutting accuracy of this invention is significantly improved: through multi-frame data sliding filtering and quadratic polynomial fitting, the distance measurement data error is reduced from ±1.5mm to ±0.3mm; combined with the micro-feed accuracy of 0.05mm / pulse of the stepper motor and historical error compensation, the tapping depth error is stably controlled within 1mm, which fully complies with the agronomic standards of GB / T 35135-2023 "Technical Requirements for Automated Tapping of Rubber Trees".
[0017] 2. The tree trunk morphology of the present invention is highly adaptable: Based on the curvature prediction and forward control of the fitted curve, the system has a response delay of ≤10ms for tree burls (protrusion height ≤5mm) and local depressions (depth ≤3mm), which can realize the continuous action of "early retraction of the blade - avoidance - re-advance", avoiding blade jamming and tree damage. Compared with the "passive triggering of blade retraction" of the existing equipment, the tree protection rate is improved by more than 90%.
[0018] 3. The invention has superior multi-motor coordination: through timer synchronization control and periodic calibration, the action deviation between the dual DC motors and the stepper motor is reduced from ±0.5mm to ±0.1mm, the pitch error of the spiral wire cutting is ≤0.2mm, ensuring a smooth cutting surface and improving the latex flow efficiency by 15% to 20%.
[0019] 4. This invention has high environmental adaptability and stability: the sliding window filter can eliminate more than 95% of environmental interference data (such as ranging jumps caused by rainwater and tree bark dust); the 24V DC power supply + IP65 protection design is suitable for the high temperature and high humidity environment of tropical rubber plantations, and the failure rate of continuous operation (8 hours / day) is ≤0.5%, which is far lower than the 5% failure rate of existing equipment.
[0020] In summary, this invention solves the problems of low depth control accuracy and slow response caused by the inability of existing fixed rubber tapping machines to dynamically adapt the cutting path to the irregular shape of the tree trunk. Attached Figure Description
[0021] Figure 1 This is an overall flowchart of the multi-motor coordinated control method for a fixed rubber tapping machine in this embodiment of the invention; Figure 2 This is a detailed flowchart of the multi-motor coordinated control method for a fixed rubber tapping machine in an embodiment of the present invention; Figure 3 This is a flowchart of distance data processing and trunk morphology fitting when using this invention; Figure 4 This is a flowchart of the multi-motor cooperative control process when using this invention; Figure 5 This is a logic diagram for exception handling and emergency stop when using this invention. Detailed Implementation
[0022] The core bottleneck of existing stationary rubber tapping machines is not the "overall control process," but rather the lack of a "precise prediction algorithm for tree trunk morphology" and a "dynamic coordination mechanism for multiple motors." This invention provides a multi-motor coordinated control method, system, medium, and equipment for stationary rubber tapping machines. Through sliding filtering and quadratic polynomial fitting of multi-frame ranging data, it achieves forward prediction of tree trunk morphology. Through timer synchronization and deviation compensation, it achieves the linkage of the stepper motor (radial) and dual DC motors (circumferential / vertical). Ultimately, it controls the tapping depth error within 1mm, with a response delay ≤10ms, adapting to irregular tree trunk morphologies such as burls and depressions, while also possessing environmental resistance and long-term operational accuracy stability. This invention's control technology, which can fit the tree trunk contour based on multi-frame data and achieve precise linkage between the stepper and DC motors, is key to improving the operational accuracy and practicality of stationary rubber tapping machines and is also the core objective of this invention.
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention are within the scope of protection of the present invention.
[0024] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0025] In one embodiment of the present invention, a multi-motor collaborative control method for a stationary rubber tapping machine is provided. This method focuses on the high-precision trajectory control technology of stationary rubber tapping machines, particularly the fusion of an "adaptive curve fitting algorithm based on multi-frame ranging data" and a "stepper-DC hybrid motor collaborative control strategy." This method is used to solve the problems of constant cutting depth control and multi-motor synchronization in cases of irregular tree trunk shapes, and is suitable for the core control unit design of automated rubber tree tapping equipment. In this embodiment, as... Figure 1 , Figure 2 As shown, the method includes the following steps: 1) According to the set period, periodically collect multiple frames of distance data on the tree trunk surface, and filter the collected data through a sliding window to remove interference to obtain the distance reference value; specifically, the distance data refers to the instantaneous distance between the current position of the tool and the tree trunk surface measured by the ultrasonic sensor.
[0026] 2) Based on the least squares method, the distance-tool position curve is fitted to the distance reference value data to predict the trend of trunk curvature change; 3) Based on the trend of trunk curvature change and the preset tapping depth, calculate the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the tool, and simultaneously generate trajectory adjustment commands for the first DC motor used to control the circumferential rotation of the tool and the second DC motor used to control the up and down feed of the tool. 4) Within the same interrupt cycle, the micro-feed amount, speed, and trajectory adjustment commands are sent to the stepper motor and the two DC motors respectively. Through the coordination of timer interrupt and external interrupt, the precise synchronization of the stepper motor and the two DC motors and emergency safety braking are achieved, thereby enabling the stepper motor and the two DC motors to perform feed, rotation, and up and down movements synchronously, forming a consistent cutting trajectory.
[0027] In step 1) above, a DS1023 digital ultrasonic sensor is used to periodically collect multiple frames of distance data on the tree trunk surface. The DS1023 digital ultrasonic sensor has a measurement range of 20mm to 500mm, a measurement error ≤ ±0.5mm, and an IP65 waterproof rating. The serial port baud rate is set to 9600bps, and it outputs 3-5 frames of data within a single interrupt cycle (3-5ms). The frame format includes "start bit + distance value (16 bits) + checksum + stop bit," ensuring data integrity.
[0028] In this embodiment, the collected data is filtered by a sliding window to remove interference, reduce interference caused by single-frame jumps, and ensure fitting stability. The specific steps include: 1.1) Window configuration: A 5-frame sliding window is used (i.e., the distance reference value of the current and the previous 4 interrupt cycles is buffered) to balance filtering stability and response speed; 1.2) Anomaly Removal: Calculate the average value μ and standard deviation σ of the 5 frames of data within the window, and remove abnormal data that exceed "μ±2σ" (such as distance measurement jumps caused by tree bark reflection); if the effective data after removal is less than 3 frames, use the distance reference value of the previous window to avoid motor malfunction due to data interruption.
[0029] In step 2) above, the distance-tool position curve is fitted to the distance reference value data based on the least squares method to predict the trend of trunk curvature change. Specifically, the coordinate data of multiple interruption cycles are accumulated, and the distance-tool position curve of the trunk surface is obtained by fitting the least squares method. The curvature change rate of the current region is calculated by the second derivative of the curve, and the trunk shape trend of subsequent interruption cycles is predicted.
[0030] In this embodiment, the specific implementation process for predicting the trend of trunk curvature changes includes the following steps: 2.1) Data Accumulation: A fitting calculation is triggered every 10 interrupt cycles (accumulating 30-50 frames of effective distance data), with "tool circumferential rotation angle (unit: degrees)" as the x-axis. x (Converted from TIM2 pulse count), with "Distance reference value (unit: mm)" as the vertical axis. y , construct dataset {( x 1, y 1),( x 2, y 2),...,( x n , y n )} ( n ≥10); 2.2) Fitting Calculation: The coefficients a, b, and c of the quadratic polynomial y = ax² + bx + c are solved using the least squares method, where: the formula for solving the coefficient matrix is:
[0031] Σ represents a pair i =1 to n Summation; 2.3) Curvature determination: The formula for curvature k is:
[0032] Determining tree trunk shape using curvature k: k >0.02mm -1 At times, it is a significant bulge. k <-0.02mm -1The indentation is significant and serves as a guide for subsequent feed strategies.
[0033] In step 3) above, based on the trend of trunk curvature change and the preset tapping depth, the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the cutter are calculated, including the following steps: 3.1) When the curvature is positive, the predicted surface of the trunk is convex. Then reduce the feed rate or generate a retraction command. The retraction amount = predicted convex height + 0.2mm. 3.2) When the curvature is negative, the predicted trunk surface is concave. Increase the feed rate, feed rate = concave depth + 0.1 mm.
[0034] In this embodiment, the calculation of the micro-feed amount of the stepper motor also includes historical error compensation: the deviation value between the actual cutting depth and the preset depth of the previous 3 interrupted cycles is accumulated. If the average deviation value is > 0.3mm, the compensation amount is added to the current feed amount to ensure the depth control accuracy; the compensation amount = average deviation value × 0.5.
[0035] In step 3) above, based on the trend of the trunk curvature change and combined with the preset tapping depth, trajectory adjustment instructions are generated for the first DC motor for controlling the circumferential rotation of the tool and the second DC motor for controlling the up and down feed of the tool. This includes adjusting the speed of the first DC motor and the feed step size of the second DC motor according to the rate of curvature change to ensure a smooth transition of the spiral trajectory.
[0036] The speed adjustment range of the first DC motor is ≤5% or the interruption cycle; the step size adjustment range of the second DC motor is ≤0.5mm or the interruption cycle.
[0037] In step 4) above, within the same interrupt cycle, the micro-feed amount, speed, and trajectory adjustment commands are sent to the stepper motor and the two DC motors respectively. Through the coordination of timed interrupts and external interrupts, precise synchronization of the stepper motor and the two DC motors' movements and emergency safety braking are achieved, including the following steps: 4.1) Within the same interruption cycle, the micro-feed amount and speed and trajectory adjustment commands are synchronously transmitted to the multi-motor drive unit of the fixed rubber tapping machine to control the stepper motor to adjust the cutting depth, and the two DC motors to adjust the trajectory synchronously, with the command output delay ≤1ms. 4.2) If the photoelectric switch is triggered, an external interrupt is immediately triggered, forcibly cutting off the enable signal of the multi-motor drive unit and stopping all motor operation. The response time is ≤5ms.
[0038] In this embodiment, the multi-motor coordinated execution also includes timing synchronization calibration: every 10 interrupt cycles, the actual displacement of the dual DC motors and the actual feed of the stepper motor are detected. If the displacement deviation is greater than the set displacement deviation or the feed deviation is greater than the set feed deviation, the timing of the motor control signal output in the next interrupt cycle is adjusted to ensure that the three actions are synchronized. The set displacement deviation is 0.2 mm; the set feed deviation is 0.1 mm.
[0039] In this embodiment, "coordination" means treating the three motors (stepper motor and two DC motors) in the sensing-fitting-decision-execution chain as a whole control unit: the same set of sensing and calculation results generates unified control commands associated with the coordinates, and they are issued and executed synchronously in the same cycle, thereby ensuring that the cutting depth, spiral trajectory and timing are consistent, continuous and can be closed-loop calibrated.
[0040] The collaborative control of the present invention will be further illustrated by the following specific embodiments. The specific collaborative control process is as follows: (a) Look-ahead cycle: Based on the fitted curve, predict the trunk distance change in the next 3 interruption cycles (9-15ms) and generate motor control commands in advance; (b) Stepper motor feed calculation: feed rate ΔL =Preset tapping depth (1.5mm) - (current distance value - predicted distance value) + historical error compensation amount; where, historical error compensation amount = 0.5 × (average of actual depth of the previous 3 cycles - preset depth) to avoid the accumulation of deviations caused by mechanical wear; (c) Dual DC motor speed adjustment: When k >0.02mm -1 When (protruding), the speed of the first DC motor (circumferential) decreases by 5% per cycle, and the feed step of the second DC motor (up and down) decreases by 0.5mm per cycle; when k <-0.02mm -1 When the spiral path is concave, increase the rotation speed by 3% per cycle and increase the step size by 0.3mm per cycle to ensure a smooth spiral trajectory. (d) Synchronous calibration: Every 10 interrupt cycles, compare the "theoretical displacement of the motor" with the "actual displacement" (calculated by the photoelectric switch count). If the deviation is >0.2mm, adjust the instruction output timing of TIM1-TIM3 in the next cycle to ensure that the action delay of the three motors is ≤1ms.
[0041] In this embodiment, the micro-feed amount (Δ) of the stepper motor L (pulse count or millimeters) – used for radial feed / retract; speed of the circumferential DC motor ( ω circ The speed of the up and down feed DC motor is adjusted by changing the PWM duty cycle. ωax It can be adjusted by changing the PWM duty cycle.
[0042] In the above embodiments, the stepper motor is a 28HS45-1.8° type, equipped with an A4988 driver, with a microstepping setting of 16 microsteps. The minimum feed accuracy is 1.8° / 16 ÷ 360° × motor lead screw (4mm / r) = 0.05mm / pulse, meeting the micro-feed requirements. The dual DC motors are 12V / 50W brushed motors, equipped with L298N drivers, with a PWM duty cycle adjustment range of 0% to 100%, corresponding to a speed of 0-150rpm, ensuring smooth adjustment of the trajectory speed. The L298N driver and the L298N driver constitute a multi-motor drive unit.
[0043] The photoelectric switch uses Omron EESX673 slot-type photoelectric switch (extreme position detection) and EESX671 (zero-finding detection), with low-level active output, response time ≤10μs, and IP65 waterproof rating to ensure rapid triggering of emergency stop signals.
[0044] In summary, when using this invention, as follows: Figures 3 to 5 As shown, the specific implementation process is as follows: (1) Initialization phase: Control the multi-motor drive unit to perform zero-finding action: the first DC motor reverses to the left limit photoelectric switch trigger, the second DC motor reverses to the upper limit photoelectric switch trigger, the stepper motor reverses to the retraction limit photoelectric switch trigger, and after the initial position calibration is completed, each motor is reset to the "starting position to be cut"; Initialize the sliding window cache array (length 5) and the fitted dataset array (length 10), and clear the historical error compensation amount.
[0045] (2) Data acquisition and filtering stage: The system clock interrupt is triggered every 3ms. In the interrupt service routine: Read three frames of distance data from the ultrasonic sensor and analyze them to obtain the raw distance value. y 1. y 2. y 3; Store 3 frames of data into a sliding window buffer array, remove outliers exceeding "window mean ± 2σ", and calculate the distance of the current window to the baseline. y avg ; If the current system clock cycle is a multiple of 10 (e.g., the 10th, 20th, or 30th ms), then ( x , y avg ), x Store the current circumferential angle into the fitted dataset array.
[0046] (3) Curve fitting and look-ahead control stage: When the dataset array is full (10 data sets), quadratic polynomial fitting is triggered: coefficients are calculated using the least squares method. a , b , c Substitute into the curvature formula k Determine the shape of the tree trunk (protruding / concave / flat); based on k Predict the distance values for the next 3 periods (9ms) y pred1 , y pred2 , y pred3 ; Calculate the stepper motor feed rate: ΔL 1 = 1.5 - ( y avg - y pred1 ) + 0.5 × historical error ΔL 2 = 1.5 - ( y pred1 - y pred2 ) + 0.5 × historical error ΔL 3 = 1.5 - ( y pred2 - y pred3 ) + 0.5 × historical error according to k Adjust the speed of the dual DC motors: If k >0.02, the PWM duty cycle of the first DC motor decreases from 50% to 47.5%, and the step size of the second DC motor decreases from 2mm / cycle to 1.5mm / cycle; if k <-0.02, duty cycle increases to 51.5%, step size increases to 2.3mm / cycle.
[0047] (4) Motor Co-execution and Calibration Stage: The microcontroller synchronously outputs control commands: Generate corresponding stepper motors ΔL 1 PWM pulse (e.g.) ΔL 1 = 0.8mm, requiring 16 pulses: 0.8mm ÷ 0.05mm / pulse), outputting a direction signal to control the stepper motor; Based on the adjusted PWM duty cycle of the dual DC motors, output direction signals to control the dual DC motors; Synchronization calibration is triggered every 30ms (10 cycles): The actual displacement of the dual DC motors and the actual feed of the stepper motor are obtained by counting with photoelectric switches. If the displacement deviation is >0.2mm, the start time of the PWM output for the dual DC motors in the next cycle is adjusted; if the feed deviation is >0.1mm, the pulse frequency for the stepper motor is adjusted to ensure synchronization.
[0048] (5) Safety interruption response phase: When any photoelectric switch is triggered (e.g., the tool reaches its right limit), the interrupt service routine is immediately entered: Set the "emergency stop flag" to forcibly lower the cut-off enable of all motors; Stop the PWM output of all motors and clear the sliding window and the fitted dataset; The alarm message (such as "left limit triggered, emergency stop") is output through the human-computer interaction module, and the system waits for manual reset.
[0049] In one embodiment of the present invention, a multi-motor coordinated control system for a stationary rubber tapping machine is provided, comprising: The distance data acquisition module periodically acquires multiple frames of distance data from the tree trunk surface according to a set period, and removes interference by filtering the acquired data through a sliding window to obtain the distance reference value. The trunk curvature prediction module uses the least squares method to fit the distance-tool position curve to the distance reference value data and predicts the trend of trunk curvature change. The motor control command acquisition module calculates the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the tool based on the trend of the trunk curvature and the preset tapping depth. It also generates trajectory adjustment commands for the first DC motor used to control the circumferential rotation of the tool and the second DC motor used to control the up and down feed of the tool. The collaborative control module sends micro-feed amount, speed and trajectory adjustment commands to the stepper motor and two DC motors respectively within the same interrupt cycle. Through timed interrupt and external interrupt coordination, it achieves precise synchronization of the stepper motor and the two DC motors and emergency safety braking.
[0050] In the above embodiments, the method of fitting a distance-tool position curve to the distance reference data using the least squares method to predict the trend of trunk curvature change includes: Using "tool circumferential rotation angle and / or vertical feed displacement" as the abscissa and filtered distance data as the ordinate, the coordinate data of multiple interruption cycles are accumulated. The least squares method is used to fit the distance-tool position curve of the trunk surface. The curvature change rate of the current region is calculated by the second derivative of the curve, and the trunk shape trend of subsequent interruption cycles is predicted.
[0051] In the above embodiments, based on the trend of trunk curvature change and combined with a preset tapping depth, the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the cutting tool are calculated, including: When the curvature is positive, the predicted surface of the trunk is convex. In this case, the feed rate is reduced or a retraction command is generated. The retraction amount = predicted convex height + 0.2mm. When the curvature is negative, the predicted trunk surface is concave. Increase the feed rate, feed rate = concave depth + 0.1mm.
[0052] In the above embodiments, the calculation of the micro-feed amount of the stepper motor also includes historical error compensation: the deviation value between the actual cutting depth and the preset depth of the previous 3 interrupted cycles is accumulated. If the average deviation value is > 0.3mm, the compensation amount is added to the current feed amount to ensure the depth control accuracy; the compensation amount = average deviation value × 0.5.
[0053] In the above embodiments, based on the trend of trunk curvature change and combined with the preset tapping depth, trajectory adjustment instructions are generated for a first DC motor for controlling the circumferential rotation of the tool and a second DC motor for controlling the up and down feed of the tool, including: adjusting the speed of the first DC motor and the feed step size of the second DC motor according to the rate of curvature change to ensure a smooth transition of the spiral trajectory. The speed adjustment range of the first DC motor is ≤5% or the interruption cycle; the step size adjustment range of the second DC motor is ≤0.5mm or the interruption cycle.
[0054] In the above embodiments, within the same interrupt cycle, the micro-feed amount, speed, and trajectory adjustment commands are sent to the stepper motor and the two DC motors respectively. Through the coordination of timed interrupts and external interrupts, precise synchronization of the actions of the stepper motor and the two DC motors and emergency safety braking are achieved, including: Within the same interruption cycle, the micro-feed amount, speed and trajectory adjustment instructions are synchronously transmitted to the multi-motor drive unit of the fixed rubber tapping machine. The three motors are started and adjusted simultaneously according to the same time base. The stepper motor is controlled to adjust the cutting depth, and the two DC motors are synchronously adjusted to adjust the trajectory. The instruction output delay is ≤1ms. If the photoelectric switch is triggered, an external interrupt is immediately triggered, forcibly cutting off the enable signal of the multi-motor drive unit and stopping all motor operation. The response time is ≤5ms.
[0055] In the above embodiments, multi-motor collaborative execution also includes timing synchronization calibration: every 10 interrupt cycles, the actual displacement of the dual DC motors and the actual feed of the stepper motor are detected. If the displacement deviation is greater than the set displacement deviation or the feed deviation is greater than the set feed deviation, the timing of the motor control signal output in the next interrupt cycle is adjusted to ensure that the three actions are synchronized.
[0056] The system provided in this embodiment is used to execute the above-described method embodiments. For specific processes and details, please refer to the above embodiments, which will not be repeated here.
[0057] In this embodiment, a field test at a rubber plantation is used to further verify the effectiveness of the invention. Ten rubber trees, each 5 years old, with a trunk diameter of 15-20 cm and containing 1-3 burls (3-5 mm in diameter), were selected and tapped using the fixed tapping machine of this invention. The results are as follows: Accuracy indicators: average cutting depth 6mm, standard deviation 0.3mm, maximum error 0.8mm, fully meeting agronomic requirements.
[0058] Adaptability indicators: All the burls on the 10 trees were successfully avoided, there were no scratches on the tree body, and the cutting tools did not get stuck.
[0059] Efficiency metrics: Tapping time per tree is 8 minutes (including zeroing), which is 46.7% more efficient than manual tapping (15 minutes).
[0060] Stability indicators: After 10 consecutive days of operation (8 hours per day), there was only one downtime due to insufficient battery power, with a failure rate of 1%, which is lower than the 5% of existing equipment.
[0061] In one embodiment of the present invention, a computing device is provided. This computing device can be a terminal and may include a processor, a communication interface, memory, a display screen, and an input device. The processor, communication interface, and memory communicate with each other via a communication bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. When the computer programs are executed by the processor, they implement the methods described in the above embodiments. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals. Wireless communication can be achieved through Wi-Fi, a management network, NFC (Near Field Communication), or other technologies. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad mounted on the casing of the computing device, or an external keyboard, touchpad, or mouse. The processor can call logical instructions stored in the memory.
[0062] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0063] In one embodiment of the present invention, a computer program product is provided, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer is able to perform the methods provided in the above-described method embodiments.
[0064] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, which stores server instructions that cause a computer to perform the methods provided in the above embodiments.
[0065] The computer-readable storage medium provided in the above embodiments has a similar implementation principle and technical effect to the above method embodiments, and will not be described again here.
[0066] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0067] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0068] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-motor coordinated control method for a stationary rubber tapping machine, characterized in that, include: According to the set period, multiple frames of distance data on the tree trunk surface are periodically collected, and the collected data are filtered by a sliding window to remove interference, so as to obtain the distance reference value. The distance-tool position curve is fitted to the distance reference value data using the least squares method to predict the trend of trunk curvature change. Based on the trend of trunk curvature change and the preset tapping depth, the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the tool are calculated, and the trajectory adjustment commands of the first DC motor used to control the circumferential rotation of the tool and the second DC motor used to control the up and down feed of the tool are generated simultaneously. Within the same interrupt cycle, the micro-feed amount, speed, and trajectory adjustment commands are sent to the stepper motor and the two DC motors respectively. Through the coordination of timed interrupts and external interrupts, the precise synchronization of the stepper motor and the two DC motors and emergency safety braking are achieved.
2. The multi-motor coordinated control method for a fixed rubber tapping machine as described in claim 1, characterized in that, Based on the least squares method, distance-tool position curves are fitted to the distance reference data to predict the trend of trunk curvature change, including: Using "tool circumferential rotation angle and / or vertical feed displacement" as the abscissa and the distance reference value as the ordinate, the coordinate data of multiple interruption cycles are accumulated, and the distance-tool position curve of the trunk surface is obtained by fitting with the least squares method. The curvature change rate of the current region is calculated by the second derivative of the curve, and the trunk shape trend of subsequent interruption cycles is predicted.
3. The multi-motor coordinated control method for a fixed rubber tapping machine as described in claim 1, characterized in that, Based on the trend of trunk curvature variation and the preset tapping depth, the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the cutting tool are calculated, including: When the curvature is positive, the predicted surface of the trunk is convex. In this case, the feed rate is reduced or a retraction command is generated. The retraction amount = predicted convex height + 0.2mm. When the curvature is negative, the predicted trunk surface is concave. Increase the feed rate, feed rate = concave depth + 0.1mm.
4. The multi-motor coordinated control method for a fixed rubber tapping machine as described in claim 3, characterized in that, The stepper motor's micro-feed calculation also includes historical error compensation: the deviation between the actual cutting depth and the preset depth in the previous 3 interrupted cycles is accumulated. If the average deviation is >0.3mm, the compensation amount is added to the current feed amount to ensure depth control accuracy; compensation amount = average deviation × 0.
5.
5. The multi-motor coordinated control method for a fixed rubber tapping machine as described in claim 1, characterized in that, Based on the trend of trunk curvature change and combined with the preset tapping depth, trajectory adjustment instructions are generated for the first DC motor for controlling the circumferential rotation of the tool and the second DC motor for controlling the up and down feed of the tool. These instructions include: adjusting the speed of the first DC motor and the feed step size of the second DC motor according to the rate of curvature change to ensure a smooth transition of the spiral trajectory. The speed adjustment range of the first DC motor is ≤5% or the interruption cycle; the step size adjustment range of the second DC motor is ≤0.5mm or the interruption cycle.
6. The multi-motor coordinated control method for a fixed rubber tapping machine as described in claim 1, characterized in that, Within the same interrupt cycle, micro-feed amount, speed, and trajectory adjustment commands are sent to the stepper motor and two DC motors respectively. Through timed interrupts and external interrupts, precise synchronization of the stepper motor and the two DC motors' movements and emergency safety braking are achieved, including: Within the same interruption cycle, the micro-feed amount, speed and trajectory adjustment instructions are synchronously transmitted to the multi-motor drive unit of the fixed rubber tapping machine. The three motors are started and adjusted simultaneously according to a unified time base. The stepper motor is controlled to adjust the cutting depth, and the two DC motors adjust the trajectory synchronously. The instruction output delay is ≤1ms. If the photoelectric switch is triggered, an external interrupt is immediately triggered, forcibly cutting off the enable signal of the multi-motor drive unit and stopping all motor operation. The response time is ≤5ms.
7. The multi-motor coordinated control method for a fixed rubber tapping machine as described in claim 6, characterized in that, Multi-motor coordinated execution also includes timing synchronization calibration: every 10 interrupt cycles, the actual displacement of the dual DC motors and the actual feed of the stepper motor are checked. If the displacement deviation is greater than the set displacement deviation or the feed deviation is greater than the set feed deviation, the timing of the motor control signal output in the next interrupt cycle is adjusted to ensure that the three actions are synchronized.
8. A multi-motor coordinated control system for a stationary rubber tapping machine, characterized in that, include: The distance data acquisition module periodically acquires multiple frames of distance data from the tree trunk surface according to a set period, and removes interference by filtering the acquired data through a sliding window to obtain the distance reference value. The trunk curvature prediction module uses the least squares method to fit the distance-tool position curve to the distance reference value data and predicts the trend of trunk curvature change. The motor control command acquisition module calculates the micro-feed amount and speed of the stepper motor used to control the radial advance and retreat of the tool based on the trend of the trunk curvature and the preset tapping depth. It also generates trajectory adjustment commands for the first DC motor used to control the circumferential rotation of the tool and the second DC motor used to control the up and down feed of the tool. The collaborative control module sends micro-feed amount, speed and trajectory adjustment commands to the stepper motor and two DC motors respectively within the same interrupt cycle. Through timed interrupt and external interrupt coordination, it achieves precise synchronization of the stepper motor and the two DC motors and emergency safety braking.
9. A computer-readable storage medium for storing one or more programs, characterized in that, The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform any of the methods described in claims 1 to 7.
10. A computing device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the methods described in claims 1 to 7.