Special-shaped pipe contour recognition control method and system for pipe machine feeding detection

The 3D galvanometer camera obtains the point cloud data of the cross-section of the special tube and registers the point cloud with the DXF vector diagram, calculates the rotation angle and controls the automatic rotary chuck for adjustment, which solves the problem of difficult to determine the position and posture during the feeding process of the special tube, and improves the accuracy and efficiency of the special tube processing.

CN120147352APending Publication Date: 2025-06-13JINAN BODOR LASER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510197928.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

During the loading process of special-shaped tubes, due to irregular shapes, it is difficult to accurately determine its initial position and posture on the automatic rotating chuck, which affects the processing quality.

Method used

The point cloud data of the cross-sectional profile of the special tube is obtained through a 3D galvanometer camera, and the point cloud registration is carried out with the point cloud data converted from the DXF vector diagram drawn by the drawing software. The rotation angle required for the alignment of the two contours on the two-dimensional plane is calculated, and the automatic rotation chuck is controlled for corresponding rotation adjustments.

Benefits of technology

The precise contour identification and rotation adjustment of the special-shaped tube is realized, which improves the accuracy and efficiency of the special-shaped tube processing, reduces production costs, and ensures the consistency of the size and shape of the product.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147352A_ABST
    Figure CN120147352A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of laser processing, and particularly relates to a special-shaped pipe contour recognition control method and system for pipe machine feeding detection, and the method comprises the steps: obtaining the point cloud data of the section contour of a special-shaped pipe which is shot by a 3D galvanometer camera and is fixed on an automatic rotating chuck; obtaining a special pipe processing DXF vector diagram drawn through drawing software, and converting the drawn DXF vector diagram into point cloud data; performing point cloud registration on the point cloud data shot by the 3D galvanometer camera and the point cloud data converted by the DXF vector diagram; according to a point cloud registration result, calculating a rotation angle required by alignment of the two contours on the two-dimensional plane; and controlling the automatic rotating chuck to perform corresponding rotating adjustment according to the calculated rotating angle. The machining precision of the special-shaped pipe is improved, and the problems of cutting deviation, welding dislocation and the like are effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of laser processing, and particularly relates to a method and system for identifying and controlling the profile of special-shaped tubes for tube machine loading and detection. Background Art

[0002] In the field of pipe processing, special-shaped tubes are increasingly widely used. However, the processing of special-shaped tubes is more complex than that of ordinary tubes, and higher requirements are placed on processing accuracy and efficiency. During the loading process of special-shaped tubes, due to their irregular shapes, it is difficult to accurately determine their initial positions and postures on the automatic rotating chuck. This leads to the inability to ensure the precise alignment of the cross-sectional profile of the special-shaped tube with the processing drawing during subsequent processing, thereby affecting the processing quality and potentially causing problems such as cutting deviation and welding misalignment.

[0003] In addition, traditional detection and adjustment methods often rely on manual experience, which is not only inefficient but also difficult to achieve high-precision adjustment. Manual operation is easily affected by subjective factors, and there are differences in the operation levels and judgment criteria of different operators, resulting in unstable processing quality and inability to meet the requirements of modern industrial production for product consistency and high precision.

[0004] Therefore, there is an urgent need for a control method that can accurately identify the profile of special-shaped tubes and automatically perform rotational adjustment to improve the processing accuracy and efficiency of special-shaped tubes and reduce production costs. Summary of the Invention

[0005] Aiming at the problem that during the loading process of special-shaped tubes, due to their irregular shapes, it is difficult to accurately determine their initial positions and postures on the automatic rotating chuck, thereby affecting the processing quality, the present invention provides a method and system for identifying and controlling the profile of special-shaped tubes for tube machine loading and detection.

[0006] In a first aspect, the technical solution of the present invention provides a method for identifying and controlling the profile of special-shaped tubes for tube machine loading and detection. When processing special-shaped tubes, they are fixed by an automatic rotating chuck. The method includes: Obtaining point cloud data of the cross-sectional profile of the special-shaped tube fixed on the automatic rotating chuck captured by a 3D galvanometer camera; Obtaining a DXF vector drawing of the special-shaped tube processed by drawing software and converting the drawn DXF vector drawing into point cloud data; Performing point cloud registration on the point cloud data captured by the 3D galvanometer camera and the point cloud data converted from the DXF vector drawing; Calculating the rotation angle required for aligning the two profiles on a two-dimensional plane according to the point cloud registration result; Controlling the automatic rotating chuck to perform corresponding rotational adjustment according to the calculated rotation angle.

[0007] Using a 3D galvanometer camera to obtain point cloud data can adapt to the contour recognition of various special-shaped tubes with complex shapes. Whether it is a special-shaped tube with irregular curves or special structures, the contour can be recognized and rotationally adjusted through this method, with strong versatility and adaptability.

[0008] As an optimization of the technical solution of the present invention, the steps of obtaining the DXF vector drawing of the special-shaped tube processed by the drawing software and converting the drawn DXF vector drawing into point cloud data include: Obtain all entities that make up the DXF vector drawing in the model space; Check each entity in the model space and identify the vertices of the polyline; For each pair of adjacent vertices, perform a linear interpolation operation and generate a set number of interpolation points, that is, the point cloud data; Calculate the interpolation points between the last vertex and the first vertex, and add all the generated point cloud data to the point list; Save the point cloud data to a file in the specified point cloud format.

[0009] As an optimization of the technical solution of the present invention, define the point cloud data captured from the cross-section of the special-shaped tube as the source point cloud, and the point cloud data converted from the processing drawing as the target point cloud; the steps of performing point cloud registration on the point cloud data captured by the 3D galvanometer camera and the point cloud data converted by the DXF vector drawing include: S31: Initialize the total rotation matrix as a three-dimensional identity matrix, and initialize the total translation vector as a three-dimensional zero vector; S32: Find the nearest neighbor index of each point in the source point cloud in the target point cloud; S33: Obtain the point coordinate data in the corresponding target point cloud according to the nearest neighbor index, and calculate the rotation matrix and translation vector between the source point cloud and the corresponding target point cloud; S34: Rotate the source point cloud using the rotation matrix, translate the rotated source point cloud using the translation vector, and update the total rotation matrix and total translation vector; S35: Calculate the current iteration error, that is, the distance between the target point cloud and the source point cloud; at the same time, calculate the mean error of the current iteration; S36: Determine whether the difference between the previous iteration error and the current mean error is less than the set threshold; If so, stop the iteration; if not, update the previous error to the current mean error and execute S32.

[0010] As an optimization of the technical solution of the present invention, the steps of calculating the rotation angle required for aligning two contours on a two-dimensional plane according to the point cloud registration result include: Extract the first 2×2 submatrix of the total rotation matrix ; Calculate cos(θ) through the formula cos(θ) = (trace( )) - 1) / 2; Use the Clip operation to ensure that the value of cos(θ) is within the range of [-1, 1], that is, cos(θ) = clip(cos(θ), -1.0, 1.0); Calculate the rotation angle θ through the inverse cosine function, and the calculation formula is θ = arccos(cos(θ)); Among them, trace( ) represents the trace of the matrix , that is, the sum of the main diagonal elements of the matrix.

[0011] As a preference of the technical solution of the present invention, the steps of controlling the automatic rotating chuck to perform corresponding rotation adjustment according to the calculated rotation angle include: Compare the calculated rotation angle with the target angle to obtain the current error, substitute it into the PID controller formula for calculation and output a control signal to the servo motor of the automatic rotating chuck. The servo motor receives the control signal output by the PID controller and controls the rotation of the automatic rotating chuck according to the magnitude and direction of the control signal; Real-time monitor the rotation state of the automatic rotating chuck, obtain the new error generated by comparing the actual rotation angle with the target angle and input it into the PID controller until the deviation between the actual rotation angle and the target angle is less than the set value;

[0012] Among them, is the proportionality coefficient, is the integral coefficient, is the differential coefficient, represents the integral of the error from the initial moment to the current moment t.

[0013] The automatic rotating chuck can quickly and accurately perform rotation adjustment according to the calculated rotation angle, reducing the time for loading detection and adjustment, improving production efficiency, and meeting the requirements of large-scale and high-efficiency production in modern industry. Since this method is based on point cloud data processing and calculation, it is not affected by human subjective factors, and can ensure that the rotation adjustment of each special-shaped tube during the processing process has a high degree of consistency. This makes the produced special-shaped tube products have good consistency in terms of size, shape, etc., improving the overall quality and market competitiveness of the products.

[0014] As a preference of the technical solution of the present invention, the method further includes: Calculate the wall thickness of the special-shaped tube according to the point cloud data of the cross-section of the special-shaped tube taken by the 3D galvanometer camera; Automatically match the cutting process parameters according to the calculated wall thickness of the pipe material.

[0015] As an optimization of the technical solution of the present invention, the steps of calculating the wall thickness of the special-shaped pipe according to the point cloud data of the cross-section of the special-shaped pipe captured by the 3D galvanometer camera include: Calculate the normal vector n of each point based on at least three non-collinear points in the point cloud data of the cross-section of the special-shaped pipe captured by the 3D galvanometer camera; Use the point cloud data to construct a KDTree data structure and set a search radius; Traverse each point in the KDTree, perform a neighboring point search with each point as the current point, and obtain the neighboring points of each point; For each neighboring point, calculate the vector v between it and the current point, and then calculate the angle between the vector v and the normal vector n ; If the angle is less than the set angle threshold, it is considered that the neighboring point is in the normal vector direction, and the thickness counter is incremented by 1; Estimate the wall thickness of the special-shaped pipe according to the count of the thickness counter.

[0016] As an optimization of the technical solution of the present invention, the steps of estimating the wall thickness of the special-shaped pipe according to the count of the thickness counter include: Assign different weights to the thickness counter values of each point. The thickness counter value of the th point is , and the weight is ;

[0017] In the formula, t is the wall thickness of the pipe, m is the number of points participating in the wall thickness estimation, d is the point cloud density, unit: points / unit length. Among them, in the point cloud data, a region with a known length L is selected, and the number of points M in this region is counted, then the point cloud density d = M / L.

[0018] As an optimization of the technical solution of the present invention, the steps of automatically matching the cutting process parameters according to the calculated wall thickness of the pipe material include: Query in the process parameter database according to the calculated wall thickness of the pipe material and the known pipe material to find the data that best matches the current pipe material and wall thickness; Extract the corresponding cutting process parameters from the matching data; the cutting process parameters include cutting speed, cutting power, gas pressure, and focus position.

[0019] Input the cutting process parameters into the cutting equipment and start the cutting operation. The cutting equipment cuts the special-shaped pipe according to these parameters. During the cutting process, monitor the cutting quality and the operating status of the equipment in real time. Various indicators during the cutting process can be monitored through sensors, such as whether the cutting speed is stable, whether the cutting power is normal, etc. If it is found that the cutting quality does not meet the requirements, such as problems like rough cut surfaces or incomplete cutting, adjust the cutting process parameters in a timely manner according to the feedback information until a satisfactory cutting effect is achieved.

[0020] In a second aspect, the technical solution of the present invention also provides a special-shaped pipe contour recognition control system for tube machine loading detection, including a 3D galvanometer camera, a contour recognition module, a control module, and an automatic rotating chuck; The special-shaped pipe to be processed is fixed on the automatic rotating chuck. The 3D galvanometer camera and the control module are respectively connected to the contour recognition module, and the control module controls the rotation of the automatic rotating chuck through a servo motor; the 3D galvanometer camera is used to capture the cross-sectional contour of the special-shaped pipe to obtain point cloud data; The contour recognition module includes a data acquisition unit, a data conversion unit, a point cloud registration unit, and a calculation unit; The data acquisition unit is used to acquire the point cloud data of the cross-sectional contour of the special-shaped pipe fixed on the automatic rotating chuck captured by the 3D galvanometer camera; The data conversion unit is used to acquire the DXF vector drawing of the special-shaped pipe processed by the drawing software and convert the drawn DXF vector drawing into point cloud data; The point cloud registration unit is used to perform point cloud registration on the point cloud data captured by the 3D galvanometer camera and the point cloud data converted from the DXF vector drawing; The calculation unit is used to calculate the rotation angle required for the alignment of the two contours on the two-dimensional plane according to the point cloud registration result and output it to the control module; The control module controls the automatic rotating chuck to perform corresponding rotation adjustment according to the calculated rotation angle to the control module.

[0021] As a preference of the technical solution of the present invention, the data conversion unit includes an acquisition sub-module, a vertex recognition sub-module, and a point cloud data generation sub-module; The acquisition sub-module is used to acquire all entities constituting the DXF vector drawing in the model space; The vertex recognition sub-module is used to check each entity in the model space and identify the vertices of the polyline; The point cloud data generation sub-module is used to perform linear interpolation operations on each pair of adjacent vertices, generate a set number of interpolation points, that is, point cloud data; calculate the interpolation points between the last vertex and the first vertex, and add all the generated point cloud data to the point list; save the point cloud data to a file in the specified point cloud format.

[0022] Preferably, in the technical solution of the present invention, the point cloud data captured from the cross-section of the special-shaped tube is defined as the source point cloud, and the point cloud data obtained by converting the processing drawing is defined as the target point cloud; the specific implementation steps of the point cloud registration unit are as follows: S31: Initialize the total rotation matrix as a three-dimensional identity matrix and initialize the total translation vector as a three-dimensional zero vector; S32: Find the nearest neighbor index of each point in the source point cloud in the target point cloud; S33: Obtain the point coordinate data of the corresponding target point cloud according to the nearest neighbor index, and calculate the rotation matrix and translation vector between the source point cloud and the corresponding target point cloud; S34: Rotate the source point cloud using the rotation matrix, translate the rotated source point cloud using the translation vector, and update the total rotation matrix and total translation vector; S35: Calculate the current iteration error, that is, the distance between the target point cloud and the source point cloud; at the same time, calculate the mean error of the current iteration; S36: Determine whether the difference between the previous iteration error and the current mean error is less than the set threshold; If so, stop the iteration; if not, update the previous error to the current mean error and execute S32.

[0023] Preferably, the calculation unit is specifically used to extract the first 2×2 submatrix of the total rotation matrix ; calculate cos(θ) through the formula cos(θ) = (trace( )) - 1) / 2; use the Clip operation to ensure that the value of cos(θ) is within the range of [-1, 1], that is, cos(θ) = clip(cos(θ), -1.0, 1.0); calculate the rotation angle θ through the inverse cosine function, and the calculation formula is θ = arccos(cos(θ)); where, trace( ) represents the trace of the matrix , that is, the sum of the elements on the main diagonal of the matrix.

[0024] The control module compares the calculated rotation angle with the target angle to obtain the current error, substitutes it into the PID controller formula for calculation, and outputs a control signal to the servo motor of the automatic rotating chuck. The servo motor receives the control signal output by the PID controller and controls the rotation of the automatic rotating chuck according to the magnitude and direction of the control signal; real-time monitor the rotation state of the automatic rotating chuck, obtain the new error generated by comparing the actual rotation angle with the target angle, and input it into the PID controller until the deviation between the actual rotation angle and the target angle is less than the set value;

[0025] Among them, is the proportionality coefficient, is the integral coefficient, is the differential coefficient, represents the integral of the error from the initial time to the current time t.

[0026] As a preference of the technical solution of the present invention, the system further includes a wall thickness calculation module and a process parameter matching module; The wall thickness calculation module is used to calculate the wall thickness of the special-shaped tube according to the point cloud data captured by the 3D galvanometer camera of the cross-section of the special-shaped tube; The process parameter matching module is used to automatically match the cutting process parameters according to the calculated wall thickness of the tube.

[0027] As a preference of the technical solution of the present invention, the wall thickness calculation module is specifically used to calculate the normal vector n of each point based on at least three non-collinear points in the point cloud data captured by the 3D galvanometer camera of the cross-section of the special-shaped tube; construct a KDTree data structure using the point cloud data and set the search radius; traverse each point in the KDTree, perform a neighboring point search with each point as the current point to obtain the neighboring points of each point; for each neighboring point, calculate the vector v between it and the current point, and then calculate the included angle between the vector v and the normal vector n ; if the included angle is less than the set angle threshold, it is considered that the neighboring point is in the normal vector direction, and the thickness counter is incremented by 1; estimate the wall thickness of the special-shaped tube according to the count of the thickness counter.

[0028] As a preference of the technical solution of the present invention, the wall thickness calculation module is also used to assign different weights to the thickness counter values of each point. The thickness counter value of the th point is , and the weight is ;

[0029] In the formula, t is the wall thickness of the tube, m is the number of points participating in the wall thickness estimation, d is the point cloud density, unit: points / unit length. Among them, in the point cloud data, a region with a known length L is selected, and the number of points M in this region is counted, then the point cloud density d = M / L.

[0030] As a preference of the technical solution of the present invention, the process parameter matching module is specifically used to query in the process parameter database according to the calculated wall thickness of the tube and the known tube material to find the data that best matches the current tube material and wall thickness; extract the corresponding cutting process parameters from the matching data; the cutting process parameters include cutting speed, cutting power, gas pressure, and focus position.

[0031] Advantages of the technical solution of the present invention: By using a 3D galvanometer camera to capture the point cloud data of the cross-sectional contour of the special-shaped pipe and accurately registering it with the point cloud data converted from the DXF vector diagram drawn by the drawing software, the rotation angle required for aligning the two contours on the two-dimensional plane can be accurately calculated. According to this angle, the automatic rotating chuck is controlled to rotate and adjust, which can ensure that the cross-sectional contour of the special-shaped pipe is accurately aligned with the processing drawing during the processing, greatly improving the processing accuracy of the special-shaped pipe, effectively reducing problems such as cutting deviation and welding misalignment, reducing the scrap and defective product rates, and improving the product quality. Description of the Drawings

[0032] To more clearly illustrate the technical solution of the present invention, the drawings required for description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0033] Figure 1 It is a schematic flowchart of the method provided by an embodiment of the present invention.

[0034] Figure 2 It is a schematic diagram of the principle of structured light three-dimensional vision.

[0035] Figure 3 It is a schematic diagram of the principle of multi-line structured light.

[0036] Figure 4 It is a structure diagram of a three-jaw chuck.

[0037] Figure 5 It is a schematic flowchart of the method provided by another embodiment of the present invention.

[0038] Figure 6 It is a schematic connection block diagram of the system provided by an embodiment of the present invention. Detailed Embodiments

[0039] To make the objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the present invention will be clearly and completely described below in conjunction with the drawings in the specific embodiments of the present invention. Obviously, the embodiments described below are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.

[0040] As Figure 1 shown, an embodiment of the present invention provides a method for identifying and controlling the contour of a special-shaped pipe for tube machine feeding. When the special-shaped pipe is processed, it is fixed by an automatic rotating chuck. The method includes: S1: Obtain the point cloud data of the cross-sectional profile of the special-shaped tube fixed on the automatic rotating chuck captured by the 3D galvanometer camera; Using a 3D galvanometer camera to obtain point cloud data can adapt to the recognition of the profiles of various special-shaped tubes with complex shapes. Whether it is a special-shaped tube with irregular curves or a special structure, the profile can be recognized and rotationally adjusted through this method, with strong versatility and adaptability.

[0041] It should be noted that structured light three-dimensional vision is based on the principle of optical triangulation, as Figure 2 shown. The optical projector 1 projects a certain pattern of structured light onto the surface of the object, forming a three-dimensional image of the light strip modulated by the surface shape of the object to be measured. This three-dimensional image is detected by the camera 2 at another position, thereby obtaining a two-dimensional distorted image of the light strip. The distortion degree of the light strip depends on the relative position between the optical projector and the camera and the surface shape profile (height) of the object. Intuitively, the displacement (or offset) shown along the light strip is proportional to the height of the object surface, the kink indicates a change in the plane, and the discontinuity indicates a physical gap on the surface. When the relative position between the optical projector and the camera is fixed, the three-dimensional shape profile of the object surface can be reconstructed from the coordinates of the distorted two-dimensional light strip image. The optical projector, the camera, and the computer system constitute a structured light three-dimensional vision system.

[0042] The 3D galvanometer camera is a high-precision imaging device that can quickly capture the three-dimensional contour information of an object. Its working principle is to obtain the depth information of the object surface in real time through laser scanning and a galvanometer system. The camera emits a laser beam and receives the reflected light, and calculates the three-dimensional coordinates of the object 4 to be measured using the time difference and phase difference. The advantage of this technology lies in its high resolution and fast imaging ability, which can obtain a large amount of data in a short time and is suitable for the detection of the complex shapes of special-shaped tubes. Compared with traditional two-dimensional imaging technology, the 3D galvanometer camera adopts a multi-line structured light mode, which can provide more comprehensive object information. Especially when dealing with complex geometric shapes, it can effectively avoid detection blind spots caused by perspective limitations. In addition, the real-time data processing ability of the 3D galvanometer camera enables the system to perform dynamic adjustments during the production process to ensure that each production link can achieve the best effect. The multi-line structured light mode is an extension of the light band mode. As Figure 3 shown, the optical projector 1 projects multiple light strips 3 onto the surface of the object 4 to be measured. On the one hand, the purpose is to be able to process multiple light strips in one image to improve the image processing efficiency. On the other hand, it is to achieve multi-light strip coverage of the object surface to increase the amount of measurement information and obtain depth information of a larger range of the object surface. That is the so-called "grating structure mode". Multiple light strips can be generated by projecting a grating pattern with a projector or realized using a laser scanner.

[0043] S2: Obtain the DXF vector drawing of the special-shaped pipe processed by the drawing software, and convert the drawn DXF vector drawing into point cloud data; Computer-Aided Design (CAD) software plays an important role in modern manufacturing. Through CAD software, designers can create precise part models and generate corresponding 2D or 3D drawings. In the present invention, the vector drawing drawn by CAD is converted into a point cloud drawing, which facilitates subsequent point cloud registration, and then realizes the control of the rotation of the special-shaped pipe and the angular alignment of the drawing. The point cloud drawing is a three-dimensional data set composed of a large number of discrete points, which can effectively represent the geometric shape of an object. This process involves coordinate transformation and data format conversion to ensure that the point cloud data can be effectively matched with the contour data obtained by the 3D galvanometer camera. Through this transformation, designers can not only perform more intuitive visualization in the design stage, but also use the point cloud data for precise quality control and defect detection in the subsequent production process. This combination makes the communication between design and production smoother and reduces errors caused by poor information transmission.

[0044] It should be noted that the steps of S1 and S2 in the embodiments of the present invention do not necessarily need to be executed in sequence, and can also be executed in parallel or adjusted before and after. Only one situation is shown in the drawings.

[0045] S3: Perform point cloud registration on the point cloud data captured by the 3D galvanometer camera and the point cloud data converted from the DXF vector drawing; S4: Calculate the rotation angle required for the alignment of the two contours on the two-dimensional plane according to the point cloud registration result; S5: Control the automatic rotating chuck to perform corresponding rotation adjustment according to the calculated rotation angle.

[0046] In some embodiments, the steps of obtaining the DXF vector drawing of the special-shaped pipe processed by the drawing software and converting the drawn DXF vector drawing into point cloud data include: S21: Obtain all entities that make up the DXF vector drawing in the model space; these entities are the basic elements that make up the DXF vector drawing; S22: Check each entity in the model space to identify the vertices of the polyline; the polyline vertices are the key nodes for constructing the point cloud data, and determining these vertices helps the generation of subsequent interpolation points.

[0047] S23: For each pair of adjacent vertices, perform linear interpolation operations and generate a set number of interpolation points, that is, point cloud data; by linear interpolation, the number of points is increased to make the point cloud data more accurately represent the shape of the object.

[0048] S24: Calculate the interpolation points between the last vertex and the first vertex, and add all the generated point cloud data to the point list to ensure the integrity of the point cloud data of the closed figure.

[0049] S25: Save the point cloud data to a file in the specified point cloud format.

[0050] In some embodiments, the point cloud data captured from the cross-section of the special-shaped pipe is defined as the source point cloud, and the point cloud data obtained by converting the processing drawing is defined as the target point cloud. The steps of performing point cloud registration on the point cloud data captured by the 3D galvanometer camera and the point cloud data converted from the DXF vector map include: S31: Initialize the total rotation matrix as a three-dimensional identity matrix , and initialize the total translation vector as a three-dimensional zero vector , in a line-by-line writing form . Initialize the value of the previous error variable as infinity, set the threshold of the maximum number of iterations as max_iterations, and start the following iteration: S32: Find the nearest neighbor index of each point in the source point cloud in the target point cloud; Use KDTree to find the nearest neighbor point of each point in the source point cloud in the target point cloud and obtain the corresponding index. KDTree is an efficient data structure that can accelerate the search for the nearest neighbor point and improve the calculation efficiency.

[0051] S33: Obtain the point coordinate data of the corresponding target point cloud according to the nearest neighbor index, and calculate the rotation matrix and translation vector between the source point cloud and the corresponding target point cloud; S34: Rotate the source point cloud using the rotation matrix and translate the rotated source point cloud using the translation vector to update the position of the source point cloud, making it gradually approach the target point cloud. And accumulate the current rotation matrix R and translation vector t into the total transformation, continuously correcting the total rotation matrix and the total translation vector , recording the overall transformation process; S35: Calculate the current iteration error, that is, the distance between the target point cloud and the source point cloud; at the same time, calculate the mean error of the current iteration ; where N is the smaller value between the number of source point clouds and the number of target point clouds. is the longitudinal coordinate value on the plane of the source point cloud , is the longitudinal coordinate value on the plane of the target point cloud , is the longitudinal coordinate value on the plane of the source point cloud , is the longitudinal coordinate value on the plane of the target point cloud .

[0052] S36: Determine whether the difference between the previous iteration error and the current mean error is less than a set threshold value; If so, stop the iteration; if not, update the previous error to the current mean error and execute S32.

[0053] It should be noted that the steps for calculating the rotation angle required for aligning two contours on a two-dimensional plane according to the point cloud registration result include: Extract the first 2×2 sub-matrix of the total rotation matrix ; which represents the rotation on the XY plane. The reason is that the pipe is rotated along its center, so the cross-section of the pipe rotates on the XY plane and the Z-axis remains unchanged.

[0054]

[0055] Calculate cos(θ) through the formula cos(θ) = (trace( )) - 1) / 2; Use the Clip operation to ensure that the value of cos(θ) is within the range of [-1, 1]. The Clip operation ensures that the value of cos(θ) is within the range of [-1, 1]. The clip function will limit the input value between the specified minimum and maximum values. If the input value is less than the minimum value, the minimum value will be output; if the input value is greater than the maximum value, the maximum value will be output; if the input value is between the minimum and maximum values, the value itself will be output. That is, cos(θ) = clip(cos(θ), -1.0, 1.0); Calculate the rotation angle θ through the inverse cosine function, and the calculation formula is θ = arccos(cos(θ)); Among them, trace( ) represents the trace of the matrix , that is, the sum of the elements on the main diagonal of the matrix.

[0056] In some embodiments, the automatic rotating chuck and the 3D galvanometer camera are respectively at both ends of the cross-section of the special-shaped pipe. The chuck is responsible for clamping the pipe and controlling the rotation and movement of the pipe, and the 3D galvanometer camera is responsible for photographing the cross-section contour of the (special-shaped pipe) pipe. Specifically, the automatic rotating chuck is on one side of the cutting bed and has the functions of rotation and horizontal forward and backward movement. The automatic rotating chuck in the embodiment of the present invention is a three-jaw chuck 5, which includes a chuck jaw 51, a fixture core 52, a fixture outer sleeve 53, and a clamping hole 54. The three-jaw chuck is as Figure 4The existing structure is shown as follows. The 3D galvanometer camera is positioned on the gantry of the cutting head, and the 3D camera can move through the support arm of the gantry. The system software controls the automatic rotating chuck to make corresponding rotational adjustments according to the calculated rotation angle. The system achieves high-precision angle control through the servo motor to ensure the correct positioning of the special-shaped pipe.

[0057] Specifically, the steps of controlling the automatic rotating chuck to make corresponding rotational adjustments according to the calculated rotation angle include: Compare the calculated rotation angle with the target angle to obtain the current error, substitute it into the PID controller formula for calculation and output a control signal To the servo motor of the automatic rotating chuck, the servo motor receives the control signal output by the PID controller and controls the rotation of the automatic rotating chuck according to the magnitude and direction of the control signal; Real-time monitor the rotation state of the automatic rotating chuck, obtain the new error generated by comparing the actual rotation angle with the target angle and input it into the PID controller until the deviation between the actual rotation angle and the target angle is less than the set value;

[0058] Among them, is the proportional coefficient, is the integral coefficient, is the differential coefficient, represents the integral of the error from the initial moment to the current moment t.

[0059] The automatic rotating chuck can quickly and accurately make rotational adjustments according to the calculated rotation angle, reducing the time for loading detection and adjustment, improving production efficiency, and meeting the requirements of large-scale and high-efficiency production in modern industry. Since this method is based on point cloud data processing and calculation, it is not affected by human subjective factors and can ensure a high degree of consistency in the rotational adjustment of each special-shaped pipe during the processing. This makes the produced special-shaped pipe products have good consistency in dimensions, shapes, etc., improving the overall quality and market competitiveness of the products.

[0060] In some embodiments, as Figure 5 shown, this method further includes: SS1: Calculate the wall thickness of the special-shaped pipe according to the point cloud data of the cross-section of the special-shaped pipe captured by the 3D galvanometer camera; This step specifically includes: SS11: Calculate the normal vector n of each point based on at least three non-collinear points in the point cloud data of the cross-section of the special-shaped pipe captured by the 3D galvanometer camera; To calculate the wall thickness of the pipe, first control the 3D galvanometer camera to align with the cross-section of the (special-shaped pipe) pipe, take a clear point cloud map, and then calculate the normal vector of each point. The normal vector is important information describing the local geometric features of the point cloud surface.

[0061] The calculation of the normal vector is based on at least three non-collinear points. Given three points (p0, p1, p2), the normal vector can be calculated by the following formula:

[0062] where, represents the cross product of vectors, represents the norm of the vector.

[0063] SS12: Construct a KDTree data structure using the point cloud data and set the search radius; In this embodiment, the search radius is set to 2; SS13: Traverse each point in the KDTree, perform a neighboring point search with each point as the current point, and obtain the neighboring points of each point; Use the KDTree data structure to accelerate the search for neighboring points. For each point (pi), its neighboring points are found by setting a radius.

[0064] Through the search_radius_vector_3d method of the KDTree, all points within the specified radius can be quickly found.

[0065] SS14: For each neighboring point, calculate the vector v between it and the current point, and then calculate the angle between the vector v and the normal vector n ; For each neighboring point pj, calculate the vector v = pj - pi between it and the point pi.

[0066] Calculate the angle between the vector v and the normal vector n : .

[0067] SS15: If the angle is less than the set angle threshold, it is considered that the neighboring point is in the direction of the normal vector, and the thickness counter is incremented by 1; SS16: Estimate the wall thickness of the special-shaped pipe according to the count of the thickness counter.

[0068] In this step, different weights are assigned to the thickness counter values of each point. The thickness counter value of the th point is , and the weight is ;

[0069] In the formula, t is the wall thickness of the pipe, m is the number of points participating in the estimation of the wall thickness, d is the point cloud density, with the unit: points / length unit. Among them, in the point cloud data, a region with a known length L is selected, and the number of points M in this region is counted. Then the point cloud density d = M / L.

[0070] SS2: Automatically match the cutting process parameters according to the calculated wall thickness of the pipe.

[0071] Specifically, it includes: querying in the process parameter database according to the calculated wall thickness of the pipe and the known pipe material to find the data that best matches the current pipe material and wall thickness; Extracting the corresponding cutting process parameters from the matched data; the cutting process parameters include cutting speed, cutting power, gas pressure, and focus position.

[0072] Input the cutting process parameters into the cutting equipment and start the cutting operation. The cutting equipment cuts the special-shaped pipe according to these parameters. During the cutting process, the cutting quality and the operating state of the equipment are monitored in real time. Various indicators during the cutting process can be monitored through sensors, such as whether the cutting speed is stable, whether the cutting power is normal, etc. If it is found that the cutting quality does not meet the requirements, such as problems like rough cut surfaces or incomplete cutting, adjust the cutting process parameters in a timely manner according to the feedback information until a satisfactory cutting effect is achieved.

[0073] As Figure 6 shown, the embodiment of the present invention also provides a special-shaped pipe contour recognition control system for tube machine loading detection, including a 3D galvanometer camera, a contour recognition module, a control module, and an automatic rotating chuck; The special-shaped pipe to be processed is fixed on the automatic rotating chuck. The 3D galvanometer camera and the control module are respectively connected to the contour recognition module. The control module controls the rotation of the automatic rotating chuck through a servo motor; the 3D galvanometer camera is used to photograph the cross-sectional contour of the special-shaped pipe to obtain point cloud data; The contour recognition module includes a data acquisition unit, a data conversion unit, a point cloud registration unit, and a calculation unit; The data acquisition unit is used to acquire the point cloud data of the cross-sectional contour of the special-shaped pipe fixed on the automatic rotating chuck photographed by the 3D galvanometer camera; The data conversion unit is used to acquire the DXF vector drawing of the special-shaped pipe processing drawn by drawing software and convert the drawn DXF vector drawing into point cloud data; The point cloud registration unit is used to perform point cloud registration on the point cloud data photographed by the 3D galvanometer camera and the point cloud data converted from the DXF vector drawing; A calculation unit, configured to calculate the rotation angle required for aligning two contours on a two-dimensional plane according to the point cloud registration result and output it to the control module; The control module controls the automatic rotation chuck to perform corresponding rotation adjustment according to the calculated rotation angle.

[0074] In some embodiments, the data conversion unit includes an acquisition sub-module, a vertex recognition sub-module, and a point cloud data generation sub-module; The acquisition sub-module is configured to acquire all entities constituting the DXF vector graph in the model space; The vertex recognition sub-module is configured to check each entity in the model space and identify the vertices of the polyline; The point cloud data generation sub-module is configured to perform linear interpolation operations for each pair of adjacent vertices, generate a set number of interpolation points, i.e., point cloud data; calculate the interpolation points between the last vertex and the first vertex, and add all the generated point cloud data to the point list; save the point cloud data to a file in a specified point cloud format.

[0075] In some embodiments, the point cloud data captured from the cross-section of the special-shaped pipe is defined as the source point cloud, and the point cloud data obtained by converting the processing drawing is defined as the target point cloud; the specific implementation steps of the point cloud registration unit are as follows: S31: Initialize the total rotation matrix as a three-dimensional identity matrix and initialize the total translation vector as a three-dimensional zero vector; S32: Find the nearest neighbor index of each point in the source point cloud in the target point cloud; S33: Obtain the point coordinate data in the corresponding target point cloud according to the nearest neighbor index, and calculate the rotation matrix and translation vector between the source point cloud and the corresponding target point cloud; S34: Rotate the source point cloud using the rotation matrix, translate the rotated source point cloud using the translation vector, and update the total rotation matrix and total translation vector; S35: Calculate the current iteration error, i.e., the distance between the target point cloud and the source point cloud; at the same time, calculate the mean error of the current iteration; S36: Determine whether the difference between the previous iteration error and the current mean error is less than a set threshold; If so, stop the iteration; if not, update the previous error to the current mean error and execute S32.

[0076] In some embodiments, the calculation unit is specifically configured to extract the first 2×2 sub-matrix of the total rotation matrix ; through the formula cos(θ)=(trace( ) - 1) / 2 to calculate cos(θ); use the Clip operation to ensure that the value of cos(θ) is within the range [-1, 1], i.e., cos(θ) = clip(cos(θ), -1.0, 1.0); calculate the rotation angle θ through the inverse cosine function, and the calculation formula is θ = arccos(cos(θ)); where, trace( ) represents the trace of the matrix , that is, the sum of the elements on the main diagonal of the matrix.

[0077] The control module includes a calculation processing unit, a monitoring unit, and a PID controller; The calculation processing unit compares the calculated rotation angle with the target angle to obtain the current error, substitutes it into the PID controller formula for calculation, and outputs a control signal to the servo motor of the automatic rotating chuck. The servo motor receives the control signal output by the PID controller and controls the rotation of the automatic rotating chuck according to the magnitude and direction of the control signal; The monitoring unit monitors the rotation state of the automatic rotating chuck in real time to obtain the real-time rotation angle and inputs it to the calculation processing unit; The calculation processing unit compares the actual rotation angle with the target angle to generate a new error and inputs it to the PID controller;

[0078] where, is the proportionality coefficient, is the integral coefficient, is the differential coefficient, represents the integral of the error from the initial moment to the current moment t.

[0079] In some embodiments, the system further includes a wall thickness calculation module and a process parameter matching module; The wall thickness calculation module is used to calculate the wall thickness of the special-shaped pipe according to the point cloud data captured by the 3D galvanometer camera of the cross-section of the special-shaped pipe; The process parameter matching module is used to automatically match the cutting process parameters according to the calculated wall thickness of the pipe.

[0080] In some embodiments, the wall thickness calculation module is specifically used to calculate the normal vector n of each point based on at least three non-collinear points in the point cloud data captured by the 3D galvanometer camera of the cross-section of the special-shaped pipe; use the point cloud data to construct a KDTree data structure and set the search radius; traverse each point in the KDTree, perform a neighboring point search with each point as the current point to obtain the neighboring points of each point; for each neighboring point, calculate the vector v between it and the current point, and then calculate the angle between the vector v and the normal vector n ; if the angle If it is less than the set angle threshold, it is considered that the adjacent point is in the normal vector direction, and the thickness counter is incremented by 1; the wall thickness of the special-shaped pipe is estimated according to the count of the thickness counter.

[0081] Specifically, the wall thickness calculation module is also used to assign different weights to the thickness counter values of each point. The thickness counter value of the th point is , and the weight is ;

[0082] In the formula, t is the wall thickness of the pipe, m is the number of points participating in the wall thickness estimation, d is the point cloud density, unit: points / length unit. Among them, in the point cloud data, a region with a known length L is selected, and the number of points M in this region is counted, then the point cloud density d = M / L.

[0083] The process parameter matching module is specifically used to query in the process parameter database according to the calculated wall thickness of the pipe and the known pipe material to find the data that best matches the current pipe material and wall thickness; extract the corresponding cutting process parameters from the matching data; the cutting process parameters include cutting speed, cutting power, gas pressure, and focus position.

[0084] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine, characterized in that: The special-shaped tube is fixed by an automatic rotating chuck during processing, and the method includes: Obtain point cloud data of the cross-section profile of the special-shaped tube fixed on the automatic rotating chuck captured by a 3D galvanometer camera; Obtain the DXF vector diagram of the special-shaped tube processing drawn by the drawing software, and convert the drawn DXF vector diagram into point cloud data; Perform point cloud registration between the point cloud data captured by the 3D galvanometer camera and the point cloud data converted by the DXF vector map; The rotation angle required to align two contours on the two-dimensional plane is calculated based on the point cloud registration results; According to the calculated rotation angle, the automatic rotating chuck is controlled to perform corresponding rotation adjustment.

2. The method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine according to claim 1 is characterized in that: The steps of obtaining the DXF vector diagram of the special-shaped tube processing drawn by drawing software and converting the drawn DXF vector diagram into point cloud data include: Get all entities that make up the DXF vector image in the model space; Each entity in the model space is examined to identify the vertices of the polylines; For each pair of adjacent vertices, perform linear interpolation operations and generate a set number of interpolation points, i.e. point cloud data; Calculate the interpolation point between the last vertex and the first vertex, and add all the generated point cloud data to the point list; Save the point cloud data to a file in the specified point cloud format.

3. The method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine according to claim 2, characterized in that: The point cloud data captured by the cross section of the special-shaped pipe is defined as the source point cloud, and the point cloud data converted from the processing drawing is defined as the target point cloud; the steps of performing point cloud registration between the point cloud data captured by the 3D galvanometer camera and the point cloud data converted from the DXF vector map include: S31: Initialize the total rotation matrix to be a three-dimensional unit matrix, and initialize the total translation vector to be a three-dimensional zero vector; S32: Find the nearest neighbor index of each point in the source point cloud in the target point cloud; S33: Obtaining point coordinate data in the corresponding target point cloud according to the nearest neighbor index, and calculating the rotation matrix and translation vector between the source point cloud and the corresponding target point cloud; S34: Use the rotation matrix to rotate the source point cloud, use the translation vector to translate the rotated source point cloud and update the total rotation matrix and the total translation vector; S35: Calculate the current iteration error, that is, the distance between the target point cloud and the source point cloud; and calculate the mean error of the current iteration; S36: Determine whether the difference between the previous iteration error and the current mean error is less than a set threshold; If yes, stop the iteration; if no, update the previous error to the current mean error and execute S32.

4. The method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine according to claim 3 is characterized in that: The steps of calculating the rotation angle required to align two contours on a two-dimensional plane based on the point cloud registration results include: Extract the first 2×2 submatrix of the total rotation matrix ; By the formula cos (θ) = (trace ( )-1) / 2calculate cos (θ); Use Clip operation to ensure that the value of cos (θ) is in the range of [-1, 1], that is, cos (θ) = clip (cos (θ), -1.0, 1.0); The rotation angle θ is calculated using the arccosine function. The calculation formula is θ = arccos (cos (θ)). Among them, trace ( ) represents the matrix The trace of , which is the sum of the elements on the main diagonal of the matrix.

5. The method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine according to claim 4, characterized in that: According to the calculated rotation angle, the steps of controlling the automatic rotation chuck to perform corresponding rotation adjustment include: Compare the calculated rotation angle with the target angle to get the current error, substitute it into the PID controller formula to calculate and output the control signal To the servo motor of the automatic rotating chuck, the servo motor receives the control signal output by the PID controller, and controls the rotation of the automatic rotating chuck according to the size and direction of the control signal; Monitor the rotation state of the automatic rotating chuck in real time, obtain the actual rotation angle and compare it with the target angle to generate a new error input into the PID controller until the deviation between the actual rotation angle and the target angle is less than the set value; in, is the proportionality coefficient, is the integration coefficient, is the differential coefficient, Represents the integral of the error from the initial time to the current time t.

6. The method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine according to claim 5, characterized in that: The method further includes: Calculate the wall thickness of the special-shaped tube based on the point cloud data of the special-shaped tube section taken by the 3D galvanometer camera; Automatically match cutting process parameters according to calculated pipe wall thickness.

7. The method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine according to claim 5, characterized in that: The steps of calculating the wall thickness of the special-shaped tube according to the point cloud data taken by the 3D galvanometer camera on the cross section of the special-shaped tube include: Calculate the normal vector n of each point based on at least three non-collinear points in the point cloud data taken by the 3D galvanometer camera on the cross section of the special-shaped pipe; Use point cloud data to build KDTree data structure and set the search radius; Traverse each point in KDTree, use each point as the current point to search for neighboring points, and obtain the neighboring points of each point; For each neighboring point, calculate the vector v between it and the current point, and then calculate the angle between the vector v and the normal vector n ; If the angle If the angle is less than the set angle threshold, the neighboring point is considered to be in the normal vector direction, and the thickness counter increases by 1; Estimate the wall thickness of special-shaped pipes based on the counts of the thickness counter.

8. The method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine according to claim 7, characterized in that: The steps for estimating the wall thickness of the special-shaped pipe according to the count of the thickness counter include: Different weights are given to the thickness counter value of each point. The thickness counter value of the point is , the weight is ; Where t is the wall thickness of the pipe, m is the number of points involved in estimating the wall thickness, and d is the point cloud density, with the unit of point / length unit. In the point cloud data, an area of ​​known length L is selected, and the number of points M in the area is counted, then the point cloud density d=M / L.

9. The method for identifying and controlling the contour of a special-shaped pipe for feeding detection of a pipe machine according to claim 7, characterized in that: The steps of automatically matching cutting process parameters according to the calculated pipe wall thickness include: Based on the calculated pipe wall thickness and known pipe material, query the process parameter database to find the data that best matches the current pipe material and wall thickness; Corresponding cutting process parameters are extracted from the matched data; the cutting process parameters include cutting speed, cutting power, gas pressure, and focal position.

10. A special-shaped pipe contour recognition control system for pipe machine feeding detection, characterized in that: include: 3D galvanometer camera, contour recognition module, control module and automatic rotating chuck; The special-shaped tube to be processed is fixed on the automatic rotating chuck. The 3D galvanometer camera and the control module are respectively connected to the contour recognition module. The control module controls the rotation of the automatic rotating chuck through the servo motor. The 3D galvanometer camera is used to shoot the cross-sectional contour of the special-shaped tube to obtain point cloud data. The contour recognition module includes a data acquisition unit, a data conversion unit, a point cloud registration unit and a calculation unit; A data acquisition unit, used to acquire point cloud data of the cross-section profile of the special-shaped tube fixed on the automatic rotating chuck photographed by a 3D galvanometer camera; A data conversion unit is used to obtain the DXF vector diagram of the special-shaped tube processing drawn by the drawing software, and convert the drawn DXF vector diagram into point cloud data; A point cloud registration unit, used for performing point cloud registration between the point cloud data captured by the 3D galvanometer camera and the point cloud data converted by the DXF vector graph; A calculation unit, used for calculating the rotation angle required for aligning two contours on a two-dimensional plane according to the point cloud registration result and outputting it to the control module; The control module controls the automatic rotating chuck to make corresponding rotation adjustment according to the calculated rotation angle.