Workpiece butt joint control method and system based on visual recognition and storage medium

CN122666518APending Publication Date: 2026-09-01SHANGHAI ELECTRICAL APPLIANCES RES INSTGROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611082385.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-09-01

AI Technical Summary

Technical Problem

[0005]本申请的主要目的在于提供一种基于视觉识别的工件对接控制方法、系统及存储介质,旨在解决现有的对接控制方法因时序错位而干扰PID控制调节效果,影响工件对接精度的技术问题

Benefits of technology

1、以各运动轴编码器输出的脉冲信号作为硬件触发信号同步采集工件端面图像,同步记录图像的采集时刻与各运动轴编码器位置数值,建立图像数据与各运动轴位置数值一一对应的时序关系;通过控制图像数据与各运动轴位置数值的时序同步精度,削减因时序错位而引发的工件虚假位姿测量偏差,避免时序误差影响工件的对接精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122666518A_ABST
    Figure CN122666518A_ABST
Patent Text Reader

Abstract

This application discloses a workpiece docking control method, system, and storage medium based on vision recognition. The control method includes: Step 1, synchronously acquiring images of the workpiece end face and establishing a one-to-one temporal relationship between image data and the position values ​​of each motion axis; Step 2, processing the acquired images and calculating the pose deviation of the actual pose relative to the pose of the docking target; if the pose deviation does not exceed the tolerance range, the workpiece docking is completed; if it exceeds the tolerance range, proceed to the next step; Step 3, superimposing feedforward compensation components and feedback correction components to correct the multi-axis cooperative motion command; Step 4, based on the corrected multi-axis cooperative motion command, controlling the multi-axis drive mechanism to adjust the workpiece pose; Step 5, after entering the next image acquisition cycle, repeating steps 1 to 4 until the workpiece docking is completed. The control method proposed in this application can improve the workpiece docking accuracy and avoid workpiece docking accuracy failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of workpiece docking, and in particular to a workpiece docking control method, system and storage medium based on vision recognition. Background Technology

[0002] In the fields of precision manufacturing and automated assembly, the relative orientation alignment between the end effector of a multi-axis drive mechanism and the workpiece is a core factor in determining the quality of the processed and assembled finished products. Typical scenarios such as aerospace engine pipeline docking, automotive precision parts assembly, and solid rocket engine propellant loading all place stringent requirements on docking accuracy.

[0003] The current mainstream docking control method in the industry is as follows: using a camera to acquire images of the workpiece end face, relying on the timestamp comparison mechanism of the operating system software to complete the time synchronization matching of visual image data and multi-axis motion data, and then calculating the real-time pose of the workpiece, the motion adjustment command output by the single proportional integral derivative (PID) feedback control is used to drive the multi-axis drive mechanism to achieve workpiece docking.

[0004] However, software timestamp synchronization is susceptible to system scheduling delays and communication fluctuations, resulting in timing misalignments, which in turn interfere with the PID control adjustment effect and affect the workpiece docking accuracy. Summary of the Invention

[0005] The main objective of this application is to provide a workpiece docking control method, system, and storage medium based on vision recognition, aiming to solve the technical problem that existing docking control methods interfere with the PID control adjustment effect due to timing misalignment, thus affecting the workpiece docking accuracy.

[0006] In a first aspect, embodiments of this application provide a workpiece docking control method based on vision recognition, applied to a multi-axis drive mechanism, the method comprising: Step 1: Based on the pulse signals output by the encoders of each motion axis of the multi-axis drive mechanism, synchronously acquire images of the workpiece end face, synchronously record the acquisition time of the images and the position values ​​of each motion axis encoder, and establish a one-to-one time sequence relationship between image data and the position values ​​of each motion axis. Step 2: Process the acquired images to calculate the actual pose of the workpiece and the pose deviation of the actual pose relative to the pose of the docking target; if the pose deviation does not exceed the tolerance range, the workpiece docking is completed; if it exceeds the tolerance range, proceed to the next step. Step 3: Generate feedforward compensation components based on the kinematic model of the multi-axis drive mechanism, and generate feedback correction components based on the pose deviation input PID controller; superimpose the feedforward compensation components and feedback correction components to correct the multi-axis cooperative motion command. Step 4: Based on the modified multi-axis cooperative motion command, control the multi-axis drive mechanism to adjust the workpiece's posture; Step 5: After entering the next image acquisition cycle, repeat steps 1 to 4 until the workpiece docking is completed.

[0007] Optionally, the method for processing the acquired image in step two to calculate the actual pose of the workpiece includes: preprocessing the image, edge detection and feature point extraction, identifying the workpiece end face features and the position information of the feature points, the workpiece end face features include circular holes, slots, planes and curved surfaces; based on the position information of the feature points, adaptively selecting the pose solving algorithm corresponding to the workpiece end face features, and solving the actual pose of the current workpiece end face.

[0008] Optionally, the pose solving algorithm corresponding to the workpiece end face feature is adaptively selected. The actual pose of the current workpiece end face is calculated as follows: when the workpiece end face feature is a circular hole, the actual pose is calculated using the Hough circle detection algorithm; when the workpiece end face feature is a groove, the actual pose is calculated using the contour extraction and corner detection algorithm; when the workpiece end face feature is a plane, the actual pose is calculated using the least squares plane fitting algorithm; and when the workpiece end face feature is a curved surface, the actual pose is calculated using the point cloud registration algorithm.

[0009] Optionally, the method for correcting the multi-axis cooperative motion command in step three includes: completing the interpolation timing matching of the visual pose update cycle and the control cycle of the multi-axis drive mechanism through an interpolation algorithm, subdividing the incremental command interpolation obtained by superimposing the feedforward compensation component and the feedback correction component, and correcting the multi-axis cooperative motion command in each control cycle.

[0010] Optionally, the method for synchronously acquiring workpiece end face images in step one includes: adaptively configuring the corresponding camera, lens, and shooting position based on the workpiece size; and synchronously acquiring workpiece end face images based on the pulse signals output by the encoders of each motion axis of the multi-axis drive mechanism.

[0011] Optionally, the adaptive configuration of the camera, lens, and shooting position based on the workpiece size includes: when the workpiece diameter D is 10mm≤D<100mm, at least two cameras with a resolution of not less than 5 megapixels and a microscope lens with a magnification of 0.5x to 2x are adaptively configured; one camera is the main camera positioned directly above the workpiece end face, and the other is an auxiliary camera, with the optical axis angle between the main camera and the auxiliary camera being 30° to 60°; when the workpiece diameter D is 100mm≤D<300mm, two cameras with a resolution of 2 million to 5 million pixels are adaptively configured; the two cameras are symmetrically arranged above the workpiece end face with the workpiece central axis as the axis of symmetry, and the optical axis angle between the two cameras is 60° to 120°; when the workpiece diameter D is 300mm≤D≤2000mm, multiple cameras are adaptively configured, with the multiple cameras evenly arranged circumferentially above the workpiece end face around the workpiece central axis, and the overlap area of ​​the field of view between adjacent cameras being 15% to 25%.

[0012] Optionally, the workpiece is a propellant grain. During the docking operation, the multi-axis coordinated motion command first controls the multi-axis drive mechanism to adjust the deviation of the propellant grain in the horizontal direction, the horizontal direction, and the rotation angle. Then, it controls the propellant grain to feed in the vertical direction at a preset rate and corrects the deviation synchronously until the docking is completed.

[0013] Secondly, embodiments of this application provide a workpiece docking system based on vision recognition, applied to a multi-axis drive mechanism, the system comprising: The clamping mechanism is installed at the end of the multi-axis drive mechanism and is used to clamp the workpiece. A camera array is used to adaptively configure the corresponding camera model according to the workpiece size to acquire images of the workpiece end face; Adjustable focus lens group, corresponding to the camera array, is used to configure the corresponding lens according to each camera; The controller is communicatively connected to the multi-axis drive mechanism and the camera array. The controller is used to execute a workpiece docking control method based on vision recognition in the first aspect of the embodiments of this application.

[0014] Optionally, it also includes a ring light source, which is located on the side of the camera array near the end face of the workpiece.

[0015] Thirdly, embodiments of this application provide a storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute a workpiece docking control method based on vision recognition as described in the first aspect of embodiments of this application.

[0016] Compared with the prior art, this application has the following beneficial effects: 1. The pulse signals output by each motion axis encoder are used as hardware trigger signals to synchronously acquire workpiece end face images, and the acquisition time of the images and the position values ​​of each motion axis encoder are recorded synchronously to establish a one-to-one timing relationship between image data and the position values ​​of each motion axis. By controlling the timing synchronization accuracy of image data and the position values ​​of each motion axis, the false pose measurement deviation of the workpiece caused by timing misalignment is reduced, and the timing error is avoided from affecting the docking accuracy of the workpiece.

[0017] 2. By superimposing feedforward compensation components and feedback correction components, the multi-axis coordinated motion command is corrected. On the one hand, the feedforward component is used to offset deterministic errors such as transmission backlash and inertia drift. On the other hand, the feedback component is used to suppress random disturbances such as load and friction. Under the dual compensation effect, the adjustment error is greatly reduced and the docking accuracy is improved.

[0018] 3. By repeating steps one to four after entering the next image acquisition cycle until the workpiece docking is completed, continuous iterative correction can be carried out during the dynamic feeding process of the workpiece, gradually converging the pose deviation, and synchronously compensating for various dynamic errors generated during the motion. Non-contact real-time detection is achieved throughout the process, which not only greatly improves the workpiece docking accuracy, but also avoids the squeezing damage caused by the accumulation of deviations in brittle energetic workpieces such as propellant grains. Attached Figure Description

[0019] Figure 1 A flowchart illustrating a workpiece docking control method based on vision recognition proposed in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the multi-axis drive mechanism according to an embodiment of this application; The attached figures are labeled as follows: 1. Linear motion mechanism; 2. Robotic arm; 3. Base; 4. Clamping mechanism; 5. Motion axis; 6. Rotating arm. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0021] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.

[0022] In this application, unless otherwise expressly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0023] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0024] Reference Figure 1 This application provides a vision-based workpiece docking control method applied to a multi-axis drive mechanism. The method includes: Step 1: Based on the pulse signals output by the encoders of each motion axis of the multi-axis drive mechanism, synchronously acquire images of the workpiece end face, synchronously record the acquisition time of the images and the position values ​​of each motion axis encoder, and establish a one-to-one time sequence relationship between image data and the position values ​​of each motion axis. Step 2: Process the acquired images to calculate the actual pose of the workpiece and the pose deviation of the actual pose relative to the pose of the docking target; if the pose deviation does not exceed the tolerance range, the workpiece docking is completed; if it exceeds the tolerance range, proceed to the next step. Step 3: Generate feedforward compensation components based on the kinematic model of the multi-axis drive mechanism, and generate feedback correction components based on the pose deviation input PID controller; superimpose the feedforward compensation components and feedback correction components to correct the multi-axis cooperative motion command. Step 4: Based on the modified multi-axis cooperative motion command, control the multi-axis drive mechanism to adjust the workpiece's posture; Step 5: After entering the next image acquisition cycle, repeat steps 1 to 4 until the workpiece docking is completed.

[0025] Specifically, in step one, before acquiring the workpiece end face image, the multi-axis drive system, camera, and controller are started, and the default settings in the parameter configuration library are loaded. Then, the camera is calibrated with intrinsic parameters, extrinsic parameters, and hand-eye calibration to establish the transformation relationship between the image coordinate system, camera coordinate system, base coordinate system of each motion axis, and workpiece coordinate system. Then, the image is acquired. The encoders of each motion axis in the multi-axis drive mechanism output real-time position pulses. When the pulse count of each motion axis encoder reaches the set value or trigger point, the workpiece end face image is acquired synchronously. Then, a time sequence relationship is established between the image data and the position values ​​of each motion axis.

[0026] In step two, the acquired images are first preprocessed, the workpiece end face features are extracted, and the corresponding algorithm is matched to calculate the current six-dimensional actual pose of the workpiece. Then, the difference calculation is performed with the preset docking target pose to obtain the position and attitude deviation. Then, the deviation is compared with the preset process tolerance. If all deviations are within the limit, the docking process ends directly. If any deviation exceeds the limit, the process proceeds to the compensation and attitude adjustment step.

[0027] In step three, the kinematic model of the multi-axis drive mechanism is built using the DH parameter method. By configuring DH parameters such as link length and torsion angle for each linear and rotary axis, a mathematical mapping relationship between the motion of each axis and the six-dimensional pose of the end workpiece is established. The multi-axis drive mechanism pre-calibrates and stores deterministic inherent errors such as transmission clearance, inertia, and friction. The target trajectory is output by trajectory planning and then input into the kinematic model to deduce the ideal motion command for each axis. Combined with real-time motion calculation, the position lag and attitude offset that the mechanical structure will inevitably produce are calculated. The offset correction amount obtained by this pre-calculation is the feedforward compensation component, which can be superimposed on the motion command in advance to pre-cancele fixed mechanical errors. In addition, superimposing the feedforward compensation component and the feedback correction component to correct the multi-axis cooperative motion command is as follows: the controller directly adds the feedforward compensation amount calculated in advance by the kinematic model and the feedback correction component calculated by the PID controller to obtain the total incremental command for each axis. Then, the control cycle of each axis is split and adapted to update the original motion command to complete the correction.

[0028] In step four, the controller sends the corrected motion increment commands for each axis to the corresponding motion axis drivers via real-time industrial Ethernet. Each motion axis driver synchronously drives the linear axis to link with the robotic arm's rotation axis, causing the workpiece held at the end to translate and rotate synchronously, and correcting the workpiece's position and posture deviations in real time.

[0029] In step five, the camera automatically triggers a new round of image acquisition at a fixed cycle of 8~16ms, and cyclically executes the entire process of synchronous image acquisition, pose calculation, composite compensation command generation, and multi-axis pose adjustment, continuously iterating to reduce the pose deviation until the workpiece position and attitude deviation are all within the process tolerance. The system then automatically terminates the loop and determines that the docking is complete.

[0030] Currently, existing technologies typically synchronize image data and the position values ​​of each motion axis using software-level timestamp comparison. Synchronization accuracy is affected by operating system scheduling delays and communication jitter, generally ranging from 5ms to 20ms. This low-precision synchronization leads to a time misalignment between the visually calculated pose and the actual motion state of the axis, directly impacting the accuracy of dynamic control. By using the pulse signals output by each motion axis encoder as hardware trigger signals to synchronously acquire workpiece end-face images, and synchronously recording the image acquisition time and the encoder position values ​​of each motion axis, a one-to-one timing relationship between image data and motion axis position values ​​is established, achieving a synchronization accuracy of less than 0.1ms. By controlling the timing synchronization accuracy between image data and motion axis position values, the false pose measurement deviation of the workpiece caused by timing misalignment is reduced, preventing timing errors from affecting the workpiece's docking accuracy.

[0031] Most existing technologies employ only a single proportional-integral-derivative (PID) feedback control without considering feedforward compensation. For multi-axis drive mechanisms with large inertia and transmission backlash, single feedback control results in slow dynamic response and large steady-state error, making it difficult to meet the requirements of precise dynamic docking. By superimposing feedforward compensation components and feedback correction components, the multi-axis cooperative motion command is corrected. On the one hand, the feedforward component offsets deterministic errors such as transmission backlash and inertia drift; on the other hand, the feedback component suppresses random disturbances such as load and friction. This dual compensation significantly reduces adjustment errors and improves docking accuracy.

[0032] Furthermore, in step two, the method for processing the acquired image and calculating the actual pose of the workpiece includes: preprocessing the image, edge detection and feature point extraction, identifying the workpiece end face features and the position information of the feature points, the workpiece end face features include circular holes, slots, planes and curved surfaces; based on the position information of the feature points, adaptively selecting the pose solving algorithm corresponding to the workpiece end face features, and solving the actual pose of the current workpiece end face.

[0033] Specifically, the acquired images are first preprocessed by noise reduction and grayscale normalization, and then edge detection is performed to extract the contours, from which the coordinates of the feature points corresponding to the circular holes, slots, planes, and curved surfaces are extracted. Then, the feature type of the current workpiece end face is automatically identified, and the corresponding algorithms of Hough circle, corner detection, plane fitting, and point cloud registration are matched and called. Combined with the camera calibration parameters, the six-dimensional actual pose of the workpiece end face is calculated.

[0034] By accurately separating effective features of the workpiece end face through image preprocessing, edge detection, and feature point extraction, including four common end face shapes: circular holes, slots, planes, and curved surfaces, and adapting to workpieces of all sizes from 10 to 2000 mm, the system avoids the problem of poor adaptability of a single algorithm by adaptively selecting the pose solving algorithm corresponding to the workpiece end face features. Therefore, it can improve the accuracy of six-dimensional pose solving and reduce the adjustment deviation introduced by feature recognition errors, thus reducing the impact on docking accuracy.

[0035] Specifically, the pose calculation algorithm is adaptively selected according to the workpiece end face features. The actual pose of the current workpiece end face is calculated as follows: when the workpiece end face feature is a circular hole, the actual pose is calculated using the Hough circle detection algorithm; when the workpiece end face feature is a groove, the actual pose is calculated using the contour extraction and corner detection algorithm; when the workpiece end face feature is a plane, the actual pose is calculated using the least squares plane fitting algorithm; and when the workpiece end face feature is a curved surface, the actual pose is calculated using the point cloud registration algorithm.

[0036] Furthermore, the method for correcting the multi-axis cooperative motion command in step three includes: completing the interpolation timing matching of the visual pose update cycle and the control cycle of the multi-axis drive mechanism through an interpolation algorithm, subdividing the incremental command interpolation obtained by superimposing the feedforward compensation component and the feedback correction component, and correcting the multi-axis cooperative motion command in each control cycle.

[0037] Specifically, by comparing the visual pose update cycle with the control cycle of the multi-axis drive mechanism, the total incremental command after being superimposed is split by linear interpolation. The compensation amount calculated in a single operation is evenly distributed to multiple control cycles, with each control cycle receiving a small correction amount. This continuously fine-tunes the motion commands of each axis, smoothly eliminating motion jitter caused by cycle time difference.

[0038] Currently, existing control methods typically employ visual feedback frequencies no higher than 30Hz (feedback cycle approximately 33ms), while the motion control cycle of multi-axis drive mechanisms is usually 1ms to 2ms, representing a significant order-of-magnitude difference. The lack of effective data interpolation and fusion mechanisms makes it difficult for visual information to directly participate in real-time motion compensation, severely limiting dynamic response performance. This paper addresses the mismatch between the two cycle magnitudes by using interpolation algorithms to achieve timing matching between the visual update cycle (8~16ms) and the multi-axis control cycle (1~2ms). Further subdividing the incremental commands generated by the superposition of feedforward and feedback through interpolation can smoothly compensate for dynamic deviations during motion, suppress overshoot and jitter caused by inertia and transmission backlash in multi-axis systems, improve motion stability, and enhance docking accuracy.

[0039] Furthermore, the method for synchronously acquiring workpiece end face images in step one includes: adaptively configuring the corresponding camera, lens, and shooting position based on the workpiece size; and synchronously acquiring workpiece end face images based on the pulse signals output by the encoders of each motion axis of the multi-axis drive mechanism.

[0040] Specifically, the controller first identifies the workpiece diameter and end face features, automatically matches the corresponding pixel camera and lens, and plans the placement angle and spacing of multiple cameras; each axis encoder outputs pulses in real time, and outputs a hardware trigger signal when the preset sampling point is reached, synchronously controlling all cameras to instantly capture the workpiece end face image, and binding the current encoder position value to complete the timing binding.

[0041] By automatically matching the workpiece size with the corresponding camera and microscope lens specifications, the time for camera and lens changeover and debugging can be shortened. At the same time, the pulse signals output by each motion axis encoder synchronously acquire images, establishing a one-to-one time sequence relationship between the image and the axis position. The synchronization accuracy is better than software timestamp synchronization, providing reliable deviation input for composite control strategies, effectively suppressing docking position and attitude deviations, and improving the dynamic docking accuracy of the workpiece.

[0042] Furthermore, the adaptive configuration of cameras, lenses, and shooting positions based on workpiece size includes: when the workpiece diameter D is 10mm ≤ D < 100mm, at least two cameras with a resolution of no less than 5 megapixels and a microscope lens with a magnification of 0.5x to 2x are adaptively configured; one camera is the main camera positioned directly above the workpiece end face, and the other is an auxiliary camera, with the optical axis angle between the main camera and the auxiliary camera being 30° to 60°; when the workpiece diameter D is 100mm ≤ D < 300mm, two cameras with a resolution of 2 million to 5 million pixels are adaptively configured; the two cameras are symmetrically arranged above the workpiece end face with the workpiece central axis as the axis of symmetry, and the optical axis angle between the two cameras is 60° to 120°; when the workpiece diameter D is 300mm ≤ D ≤ 2000mm, multiple cameras are adaptively configured, and the multiple cameras are evenly arranged circumferentially above the workpiece end face around the workpiece central axis, with the overlap area of ​​the field of view between adjacent cameras being 15% to 25%.

[0043] Specifically, the camera can be a 2D camera, a 3D depth camera, a high-resolution camera, a high-speed camera, an infrared camera, or a line scan camera; in addition, when selecting the shooting angle for irregularly shaped workpieces, the angle is adaptive to ensure that the end face features can be captured; for workpieces with precise end face docking, a microscope lens is used to achieve sub-pixel positioning; during dynamic docking, a high-speed camera is selected and feedforward compensation and feedback correction are performed.

[0044] By segmenting and matching the corresponding camera, lens, and shooting layout according to the workpiece diameter, an adaptive imaging solution can be provided for workpieces of different sizes, providing clear and complete image data for subsequent pose calculation, thereby reducing measurement errors and improving the contact position and attitude accuracy of various workpiece end faces.

[0045] Specifically, the workpiece is a propellant grain. During the docking operation, the multi-axis coordinated motion command first controls the multi-axis drive mechanism to adjust the deviation of the propellant grain in the horizontal direction, the horizontal direction, and the rotation angle. Then, it controls the propellant grain to feed in the vertical direction at a preset rate and corrects the deviation synchronously until the docking is completed.

[0046] Specifically, the controller first outputs coordinated commands for the horizontal X-axis, Y-axis and rotational A / B-axis to adjust the lateral, longitudinal and rotational deviations of the drug cartridge. After reaching the target position, it then issues a uniform speed Z-axis pressing and feeding command. During the feeding process, it continuously receives visual feedback to fine-tune the horizontal and rotational axes in real time and dynamically correct the offset until the position and posture meet the target and the pressing and docking is completed.

[0047] In the field of propellant grain press-fitting for solid rocket engines, the propellant grain material is an energetic material, characterized by high brittleness, susceptibility to damage, and uneven surface texture. A two-stage correction strategy can be adapted to the propellant grain press-fitting process. First, coarse adjustments to the horizontal, longitudinal, and rotational attitudes are completed through multi-axis linkage, pre-converging large positional deviations to a smaller range and preventing the deviation from continuously amplifying during vertical feeding. During the propellant grain feeding stage, continuous synchronous correction compensates for dynamic offsets generated during feeding in real time. This staged control avoids overshoot oscillations caused by large-scale attitude adjustments in a single operation. Simultaneously, real-time non-contact visual correction throughout the process prevents measurement distortion caused by propellant grain compression and impact, keeping positional errors within process tolerances and improving the yield rate of press-fitted products.

[0048] For precision end-face mating of small-diameter workpieces, this embodiment takes the end-face mating of a cylindrical workpiece with a diameter of 80mm as an example: the main camera is a Basler acA2500 series (5 megapixels), with a lens magnification of 1x and a working distance of 150mm; the auxiliary camera is a 2-megapixel camera, at a 45-degree angle to the vertical direction; a 12-row, 9-column checkerboard calibration board is used, and 80 calibration images are used to calculate intrinsic parameters and hand-eye transformation matrix; three 5mm diameter positioning holes are machined on the end face, and the Hough circle detection algorithm is used to extract the center coordinates; the six-dimensional pose is calculated using the EPnP algorithm; the position tolerance is 0.02mm, and the attitude tolerance is 0.01 degrees; the PID parameters are Kp=2.0, Ki=0.1, Kd=0.5, and the S-curve jerk is limited to 1000mm / s^3; instructions are distributed through the EtherCAT bus, and after 3-5 iterations, the position error converges to below 0.008mm.

[0049] For the press-fitting of propellant grains, this embodiment takes the press-fitting of a 350mm diameter solid rocket motor propellant grain to the combustion chamber shell partition as an example: the propellant grain end face has a 50mm diameter central through hole and four rectangular process grooves (10mm wide and 5mm deep); the main camera is a Basler acA2500-14gm (5 megapixels), and the lens focal length is a 16mm C-mount lens with a 5mm adapter ring. The working distance is 400mm. The ring light source has an outer diameter of 300mm and an inner diameter of 200mm. During calibration, white checkerboard calibration paper (low-adhesive backing) is temporarily pasted onto the end face of the propellant grain, and removed after calibration. First, adaptive grayscale normalization is performed on a 32x32 sub-region. Then, Hough circle detection is used to extract the center of the central through-hole, and contour extraction and Shi-Tomasi corner detection are used to extract the corner points of the slot. The position is calculated using the center of the central through-hole, and the rotational attitude is calculated using the corner points of the slot. The position tolerance is 0.03mm, and the attitude tolerance is 0.015 degrees. The multi-axis coordinated motion command first controls the multi-axis drive mechanism to adjust the deviation of the propellant grain in the horizontal lateral direction, horizontal longitudinal direction, and rotation angle. Then, it controls the propellant grain to feed vertically at a preset rate and simultaneously corrects deviations until docking is completed. Actual measurements show a press-fit coaxiality of 0.018~0.035mm, a cycle time of 25 seconds, and a pass rate of no less than 98%, as shown in the table below.

[0050] Compared with the prior art, the control method of the present invention significantly improves the docking accuracy, as shown in the table below:

[0051] Therefore, the control method of the present invention (1) improves docking accuracy: the docking position accuracy reaches ±0.02mm and the attitude accuracy reaches ±0.005 degrees. In the case of drug cartridge pressing, the measured coaxiality is 0.018~0.035mm, which meets the process requirement of not more than 0.05mm; (2) improves production efficiency: the closed-loop feedback cycle is 8~16ms, which is 3~10 times faster than the 50~200ms of contact measurement; the drug cartridge pressing cycle time is about 25 seconds, and the pressing qualification rate is increased from about 85% to no less than 98%, which greatly reduces the rework rate and scrap loss.

[0052] This application also provides a vision-based workpiece docking system applied to a multi-axis drive mechanism. The system includes: a clamping mechanism installed at the end of the multi-axis drive mechanism for clamping a workpiece; a camera array for adaptively configuring corresponding camera models according to the workpiece size to acquire images of the workpiece end face; an adjustable lens group configured correspondingly to the camera array for configuring corresponding lenses according to each camera; and a controller communicatively connected to the multi-axis drive mechanism and the camera array for executing a vision-based workpiece docking control method described in the method embodiment of this application.

[0053] Reference Figure 2 Specifically, the multi-axis drive mechanism includes a linear motion mechanism 1 and a robotic arm 2. The base 3 of the robotic arm 2 is set on the slider of the linear motion mechanism 1. The linear motion mechanism 1 has three linear guide rails, which drive the robotic arm 2 to move in the horizontal, vertical, and transverse directions. The robotic arm 2 has six rotating arms 6 connected in series. Adjacent rotating arms 6 are connected by motion shafts 5. Each motion shaft 5 is connected to a corresponding driver. The driver drives the corresponding rotating arm 6 by driving the corresponding motion shaft 5. A clamping mechanism 4 is installed on the end of the rotating arm 6. The clamping mechanism 4 can be a vacuum adsorption clamp or a pneumatic three-jaw chuck. In this solution, it is a vacuum adsorption clamp, and the ratio of the adsorption surface diameter to the drug cartridge end face diameter is 0.6~0.9.

[0054] Specifically, the camera array includes multiple cameras of different sizes, as well as brackets for mounting the cameras. The brackets are existing technology and can be electrically controlled programmable multi-camera motion platforms (independent multi-axis electrically controlled modules). Each camera has a corresponding mounting position, and each mounting position can move in the horizontal, vertical, and longitudinal directions.

[0055] Specifically, the adjustable focus lens assembly includes multiple lens bodies and multiple mechanical supports. Each lens body is mounted on a corresponding mechanical support, and each mechanical support can drive the lens body to move in the horizontal, vertical, and other directions.

[0056] Furthermore, it also includes a ring light source, which is located on the side of the camera array near the end face of the workpiece.

[0057] The ring light source is mounted on the end rotating arm of the multi-axis drive mechanism via a connecting structure. By setting the ring light source, uniform and controllable illumination can be provided to the camera.

[0058] Specifically, the camera array, adjustable focus lens group, ring light source, vision processor and encoders of each motion axis together constitute the vision acquisition unit, and the controller is responsible for trajectory planning, pose calculation and control command generation.

[0059] This application also provides a storage medium, which includes a stored computer program, wherein the computer program controls the device where the storage medium is located to execute a workpiece docking control method based on vision recognition described in the method embodiment of this application when it is running.

[0060] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A workpiece butt joining control method based on visual recognition, characterized by, Applied to multi-axis drive mechanisms, the method includes: Step 1: Based on the pulse signals output by the encoders of each motion axis of the multi-axis drive mechanism, synchronously acquire images of the workpiece end face, synchronously record the acquisition time of the images and the position values ​​of each motion axis encoder, and establish a one-to-one time sequence relationship between image data and the position values ​​of each motion axis. Step 2: Process the acquired images to calculate the actual pose of the workpiece and the pose deviation of the actual pose relative to the pose of the docking target; if the pose deviation does not exceed the tolerance range, the workpiece docking is completed; if it exceeds the tolerance range, proceed to the next step. Step 3: Generate feedforward compensation components based on the kinematic model of the multi-axis drive mechanism, and generate feedback correction components based on the pose deviation input PID controller; superimpose the feedforward compensation components and feedback correction components to correct the multi-axis cooperative motion command. Step 4: Based on the modified multi-axis cooperative motion command, control the multi-axis drive mechanism to adjust the workpiece's posture; Step 5: After entering the next image acquisition cycle, repeat steps 1 to 4 until the workpiece docking is completed.

2. The workpiece butt joining control method based on visual recognition according to claim 1, wherein The method for processing the acquired image and calculating the actual pose of the workpiece in step two includes: The image is preprocessed, edge detected, and feature points extracted to identify the workpiece end face features and the position information of the feature points. The workpiece end face features include circular holes, slots, planes, and curved surfaces. Based on the position information of feature points, an adaptive pose solving algorithm corresponding to the features of the workpiece end face is selected to solve the actual pose of the current workpiece end face.

3. The workpiece butt joining control method based on visual recognition according to claim 2, wherein Adaptively select the pose solving algorithm corresponding to the workpiece end face features, and solve the actual pose of the current workpiece end face including: When the end face feature of the workpiece is a circular hole, the actual pose is calculated using the Hough circle detection algorithm. When the end face feature of the workpiece is a groove, the actual pose is calculated by contour extraction and corner detection algorithms. When the end face of the workpiece is planar, the actual pose is calculated using the least squares plane fitting algorithm. When the end face of the workpiece is a curved surface, the actual pose is calculated using a point cloud registration algorithm.

4. The workpiece docking control method based on vision recognition as described in claim 1, characterized in that, The method for correcting the multi-axis cooperative motion command in step three includes: Interpolation algorithms are used to achieve interpolation timing matching between the visual pose update cycle and the control cycle of the multi-axis drive mechanism. The incremental command obtained by superimposing the feedforward compensation component and the feedback correction component is subdivided by interpolation, and the multi-axis cooperative motion command is corrected in each control cycle.

5. The workpiece docking control method based on vision recognition as described in claim 1, characterized in that, The method for synchronously acquiring workpiece end face images in step one includes: adaptively configuring the corresponding camera, lens, and shooting position based on the workpiece size; and synchronously acquiring workpiece end face images based on the pulse signals output by the encoders of each motion axis of the multi-axis drive mechanism.

6. The workpiece docking control method based on vision recognition as described in claim 5, characterized in that, The camera, lens, and shooting position are configured adaptively based on the workpiece size, including: When the workpiece diameter D is 10mm≤D<100mm, at least two cameras with a resolution of not less than 5 million pixels and a microscope lens with a magnification of 0.5x to 2x are adaptively configured; one of the cameras is the main camera, which is arranged directly above the end face of the workpiece, and the other is an auxiliary camera. The optical axis angle between the main camera and the auxiliary camera is 30° to 60°. When the workpiece diameter D is 100mm≤D<300mm, two cameras with a resolution of 2 million to 5 million pixels are adaptively configured; the two cameras are symmetrically arranged above the workpiece end face with the workpiece center axis as the axis of symmetry, and the optical axis angle between the two cameras is 60°~120°. When the workpiece diameter D is 300mm≤D≤2000mm, multiple cameras are adaptively configured. The multiple cameras are evenly arranged around the workpiece central axis above the workpiece end face, and the overlap area of ​​the field of view between adjacent cameras is 15% to 25%.

7. The workpiece docking control method based on vision recognition as described in claim 1, characterized in that, The workpiece is a propellant grain. During the docking operation, the multi-axis coordinated motion command first controls the multi-axis drive mechanism to adjust the deviation of the propellant grain in the horizontal direction, the horizontal direction, and the rotation angle. Then, it controls the propellant grain to feed in the vertical direction at a preset rate and corrects the deviation synchronously until the docking is completed.

8. A workpiece docking system based on vision recognition, characterized in that, The system, applied to a multi-axis drive mechanism, includes: The clamping mechanism is installed at the end of the multi-axis drive mechanism and is used to clamp the workpiece. A camera array is used to adaptively configure the corresponding camera model according to the workpiece size to acquire images of the workpiece end face; Adjustable focus lens group, corresponding to the camera array, is used to configure the corresponding lens according to each camera; A controller, communicatively connected to a multi-axis drive mechanism and a camera array, is used to execute the workpiece docking control method based on vision recognition as described in any one of claims 1 to 7.

9. The workpiece docking system based on vision recognition as described in claim 8, characterized in that, It also includes a ring light source, which is located on the side of the camera array near the end face of the workpiece.

10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform the workpiece docking control method based on vision recognition as described in any one of claims 1 to 7.