Welding seam feature extraction and welding seam error compensation algorithm based on laser sensor

Through the weld feature extraction and error compensation algorithm based on laser sensor, the problems of low feature extraction efficiency and difficulty in error compensation in weld tracking technology are solved, and the rapid precise positioning and real-time tracking of welds of welding robots are realized, which improves welding automation efficiency.

CN119016970APending Publication Date: 2024-11-26XUZHOU BOHUI SHITONG HEAVY IND MASCH CO LTD +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411437434.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the existing weld tracking technology, weld feature extraction efficiency is low and error compensation is difficult, especially under the conversion conditions of multiple welding interfaces, which leads to low welding automation efficiency.

Method used

Weld feature extraction and error compensation algorithm based on laser sensors are adopted, through noise processing, contour binarization, differential cycle calculation and key discrete point screening, weld features are accurately positioned and tracked in real time, and the welding gun position is adjusted by PLC control to realize Precise tracking of welds.

Benefits of technology

It improves the automation level of welding robot weld tracking, is suitable for a variety of welding conditions, realizes rapid and accurate positioning and real-time tracking of welds, and improves welding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119016970A_ABST
    Figure CN119016970A_ABST
Patent Text Reader

Abstract

The invention discloses a welding seam feature extraction and welding seam error compensation algorithm based on a laser sensor. The welding seam feature extraction and welding seam error compensation algorithm comprises the following steps: acquiring a welding seam image through the laser sensor, deleting an identified contour of the welding seam image, and searching a turning point of a contour trend; setting a number threshold value of key discrete points of a final fitting contour, respectively extracting the fitting contours, acquiring position information of the key points according to differential operation, comparing the position information of the key points with welding seam position information stored by a robot, and sending a position coordinate difference value to a welding seam tracker of the robot for real-time tracking welding of the welding seam. A foundation can be laid for a real-time welding seam tracking technology of the welding robot, and the automation level of the welding robot is improved; the algorithm can be applied to various welding working conditions such as butt welding seams, lap welding seams, V-shaped welding seams and internal and external fillet welding seams; the welding seam can be quickly and accurately positioned, welding seam characteristics can be identified, and a theoretical basis is provided for welding seam scanning in a welding seam tracking technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a weld feature extraction and weld error compensation algorithm, in particular to a weld feature extraction and weld error compensation algorithm based on a laser sensor, and belongs to the technical field of weld real-time tracking. Background Art

[0002] With the development of the manufacturing industry, the intelligence and automation in the field of welding are also gradually improving. However, there are still some companies or fields that are still in the traditional industrial robot welding operation, using manual teaching mode for welding production. Every time a workpiece is welded, it is necessary to manually preset the trajectory for repetitive work, which is inefficient and has high welding costs. At present, with the gradual maturity of laser vision technology, weld tracking based on laser sensors has also gradually developed automatically. Among them, if you want to achieve highly automated welding, the focus must be on solving the error compensation of automatic tracking of welds. In weld tracking technology, that is, the weld is scanned and welded at the same time, and the accurate extraction and error compensation of weld features are the research focus.

[0003] In the prior art, a weld defect detection method based on the fusion of ultrasonic waveform and ultrasonic image features disclosed in publication number CN115294376A extracts the three-layer wavelet packet features of the ultrasonic waveform, calculates the sample entropy of the characteristic signal of each node, and obtains the energy feature vector; uses the improved InceptionV2 network to extract the multi-scale convolution features of the ultrasonic image, and then performs global averaging and full connection to obtain the multi-scale convolution feature vector; constructs a feature adaptive fusion method to fuse the wavelet packet feature vector and the multi-scale convolution feature vector to obtain a fused feature vector; inputs the fused feature vector into the SoftMax classifier to identify the weld defect type; the existing detection method mainly adopts the following method: It involves ultrasonic testing, which uses the internal burrs left on the back of the weld to change the amplitude of the ultrasonic bottom echo signal to identify the weld center. It is mainly suitable for the field of non-destructive testing of welds, and each identification requires a complete mechanical lateral sweep, which is inefficient: one is the diffraction time difference method, which uses the diffraction signal of the defect of the test piece to be tested for detection, and is also used in the field of non-destructive testing of welds; the other is a weld tracking method based on time series information fusion, which combines vision with deep learning, and realizes weld tracking by training the weld tracking model. This method requires a large amount of training data, and when the weld model or welding interface changes, a large amount of data needs to be collected again to train a new model, which is a large workload.

[0004] Based on this, in order to improve the efficiency of welding automation and flexibly respond to robot welding tracking under various welding interface conversion conditions, it is urgent to develop an algorithm for accurate extraction of weld features and error compensation to improve the efficiency of the welding robot's weld tracking automation technology. Summary of the invention

[0005] The purpose of the present invention is to provide a weld feature extraction and weld error compensation algorithm based on a laser sensor in order to solve at least one of the above technical problems.

[0006] The present invention achieves the above-mentioned purpose through the following technical scheme: a weld feature extraction and weld error compensation algorithm based on laser sensor, comprising the following steps:

[0007] Step 1: Acquire a weld image through a laser sensor, perform noise processing and binarization processing on the contour of the weld image, and use differential cycle calculation to search and extract key discrete points of the contour;

[0008] Step 2: Delete the identified contour of the weld image after noise processing and binarization, and then perform a differential calculation on the horizontal and vertical coordinates of adjacent discrete points to identify the coordinate points that deviate from the contour range or the contour that is not related to the weld contour;

[0009] Step 3: Find the turning point of the contour trend according to the difference calculation results;

[0010] Step 4: further screen all discrete points with a difference value less than 0, delete points that are very close, and obtain a simplified combination of discrete key points of the contour;

[0011] Step 5: Compare the horizontal and vertical coordinate ranges of the discrete points before and after each difference, and store the discrete points in the horizontal and vertical coordinate ranges that disappear after each difference, merge the stored discrete points with the discrete points selected by the last difference calculation, and the result is the key discrete points of the fitting contour. Compare the number of its discrete points with the number threshold of the key discrete points of the final fitting contour to obtain the final result;

[0012] Step 6: Set the number threshold of the key discrete points of the final fitting contour. When the number of the key discrete points of the contour is less than or equal to the number threshold, the differential calculation ends. Otherwise, return to step 2 and perform a differential calculation on the horizontal and vertical coordinates of adjacent discrete points respectively.

[0013] Step 7: Rearrange the key discrete points of the final fitting contour in a clockwise order and connect them in sequence, and connect the first and last discrete points to obtain the final fitting contour;

[0014] Step 8. Extract the fitted contours separately, and obtain the key point position information again based on the differential operation. Based on this, obtain the precise position information of the weld, compare it with the weld position information stored by the robot, send the position coordinate difference to the robot weld tracker, and adjust the welding gun position after position error compensation through PLC control to perform real-time tracking welding of the weld.

[0015] As a further solution of the present invention: in step 1, the pixel points of the key discrete points of the contour are extracted by the bwperim function, and the weld contour pixel points extracted by the bwperim function are respectively composed of two-dimensional arrays 2×X and 2×Y, that is, the original contour is composed of X and Y discrete pixel points, respectively, and each discrete point is represented by its horizontal and vertical coordinates (x n ,y n ; n=1,...,X / Y) represents.

[0016] As a further solution of the present invention: in step 2, a difference calculation is performed on the horizontal and vertical coordinates of adjacent discrete points using the following formula:

[0017] Xdiff=x n+1 -x n (n=1,...X)

[0018] Ydiff=y n+1 -y n (n=1,...X)

[0019] Xdiff=x n+1 -x n (n=1,...Y)

[0020] Ydiff=y n+1 -y n (n=1,...Y).

[0021] As a further solution of the present invention: in step three, the differential result of the differential calculation includes the differential values ​​of the horizontal and vertical coordinates. At this time, regardless of the horizontal and vertical coordinates, as long as one of the differential results is a negative value, the discrete point is the turning point, and the find function in Matlab is used to return the horizontal and vertical coordinates of the discrete points whose differential values ​​are less than 0.

[0022] As a further solution of the present invention: in step 4, the screening of discrete points is carried out by merging two points whose adjacent distance is less than 0.4 into the same point, and then deleting the duplicate discrete points, so as to obtain the discrete key points of the contour.

[0023] As a further solution of the present invention: in step 7, the sequential connection of key discrete points specifically includes:

[0024] First, find the center point (x0, y0) of all discrete points, store the discrete points with abscissas less than x0 in array 1, and store the discrete points with abscissas greater than x0 in array 2;

[0025] Secondly, calculate the tangent value of each discrete point and the center point in array 1 and array 2 respectively;

[0026] Finally, the discrete points in array 1 and array 2 are sorted from small to large according to the tangent value, and the sorting of all discrete points is completed. The discrete points are connected in sequence, and the first and last discrete points are connected to obtain the final fitting contour.

[0027] As a further solution of the present invention: the tangent value calculation formula of each discrete point in array 1 and array 2 and the center point is:

[0028] x0=(x max +x min ) / 2

[0029] y0=(y max +y min ) / 2

[0030]

[0031] Where n is the number of final contour discrete points.

[0032] The beneficial effects of the present invention are:

[0033] 1) The weld feature extraction and error compensation algorithm proposed in the present invention can lay the foundation for the real-time tracking technology of the weld of the welding robot and improve the automation level of the welding robot;

[0034] 2) The algorithm can be applied to various welding conditions such as butt welds, lap welds, V-welds, internal and external fillet welds, etc.

[0035] 3) The weld feature extraction and error compensation algorithm based on the laser sensor of the present invention can quickly and accurately locate the weld and identify the weld features, providing a theoretical basis for scanning and welding in weld tracking technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a schematic diagram of the algorithm flow of the present invention;

[0037] Figure 2 It is a schematic diagram of the V-groove weld structure of the present invention;

[0038] Figure 3 It is a schematic diagram of the lap weld structure of the present invention;

[0039] Figure 4 The V-groove weld image obtained by the laser sensor of the present invention;

[0040] Figure 5 The lap weld image obtained by the laser sensor of the present invention;

[0041] Figure 6 The image is the one after the noise of the V-groove weld contour is removed and binarized in the present invention;

[0042] Figure 7 This is the image after the overlap weld contour noise is removed and binarized in the present invention;

[0043] Figure 8 This is a V-groove weld profile extraction diagram of the present invention;

[0044] Fig. 9 This is the overlap weld contour extraction diagram of the present invention;

[0045] Fig.10 Deleting redundant images for the V-groove weld contour extraction image of the present invention;

[0046] Fig.11 Deleting redundant images for the overlap weld contour extraction image of the present invention;

[0047] Fig.12 Identify the contour and extract the contour map for the V-groove weld of the present invention;

[0048] Fig.13 Identifying contours and extracting contour maps for lap welds of the present invention;

[0049] Fig.14 It is a diagram for extracting the contour of the V-groove weld and determining key point information of the present invention;

[0050] Fig.15 This is a diagram for extracting the lap weld contour and determining key point information according to the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Embodiment 1, as Figure 1 As shown, a weld feature extraction and weld error compensation algorithm based on a laser sensor includes the following steps:

[0053] Step 1: Acquire a weld image through a laser sensor, perform noise processing and binarization processing on the contour of the weld image, and use differential cycle calculation to search and extract key discrete points of the contour;

[0054] Step 2: Delete the identified contour of the weld image after noise processing and binarization, and then perform a differential calculation on the horizontal and vertical coordinates of adjacent discrete points to identify the coordinate points that deviate from the contour range or the contour that is not related to the weld contour;

[0055] Step 3: Find the turning point of the contour trend according to the difference calculation results;

[0056] Step 4: further screen all discrete points with a difference value less than 0, delete points that are very close, and obtain a simplified combination of discrete key points of the contour;

[0057] Step 5: Compare the horizontal and vertical coordinate ranges of the discrete points before and after each difference, and store the discrete points in the horizontal and vertical coordinate ranges that disappear after each difference, merge the stored discrete points with the discrete points selected by the last difference calculation, and the result is the key discrete points of the fitting contour. Compare the number of its discrete points with the number threshold of the key discrete points of the final fitting contour to obtain the final result;

[0058] Step 6: Set the number threshold of the key discrete points of the final fitting contour. When the number of the key discrete points of the contour is less than or equal to the number threshold, the differential calculation ends. Otherwise, return to step 2 and perform a differential calculation on the horizontal and vertical coordinates of adjacent discrete points respectively.

[0059] Step 7: Rearrange the key discrete points of the final fitting contour in a clockwise order and connect them in sequence, and connect the first and last discrete points to obtain the final fitting contour;

[0060] Step 8. Extract the fitted contours separately, and obtain the key point position information again based on the differential operation. Based on this, obtain the precise position information of the weld, compare it with the weld position information stored by the robot, send the position coordinate difference to the robot weld tracker, and adjust the welding gun position after position error compensation through PLC control to perform real-time tracking welding of the weld.

[0061] Embodiment 2, a weld feature extraction and weld error compensation algorithm based on laser sensor, respectively Figure 2 and Figure 3 Taking two typical welds as examples, weld feature extraction and error compensation calculation are performed. Weld feature extraction is to find the key points to determine the weld orientation, such as Figure 2 A, B, C and Figure 3 Points A and B in the middle. Obtained by laser sensor Figure 2 and Figure 3 The weld images in Figure 4 and Figure 5 As shown. The key points extracted are the discrete points with large changes in contour direction. The core of the algorithm is: first obtain the changes between adjacent discrete points, and then filter out the discrete points with large changes. Differential operation is a tool for studying discrete mathematics, and its calculation results reflect a change between discrete variables. The weld contour extracted by the bwperim function is composed of a series of discrete pixel points, so differential loop calculation can be used to search and extract key discrete points of the contour. The specific calculation process is as follows:

[0062] Step 1: First, Figure 4 and Figure 5 The contours in are processed by noise and binarization respectively, and the results are as follows Figure 6 and Figure 7 As shown, contour extraction is performed on this basis. Figure 8 and Fig. 9 The weld contour pixel points are composed of two-dimensional arrays of 2×28084 and 2×13890, that is, the original contour is composed of 28084 and 13890 discrete pixel points, respectively. Each discrete point is represented by its horizontal and vertical coordinates (x n ,y n ; n=1,...,28084 / 13890). Figure 6 and Figure 7 Original contour, when obtaining the original contour discrete points, due to unknown reasons, there will be coordinate points that deviate from the contour range or contours that are not related to the weld contour being identified, as follows Figure 8 and Fig. 9 Therefore, it is necessary to compare the original image. Figure 6 and Figure 7 To delete the identified contours, Fig.10 and Fig.11 , and then continue with the next step of differential calculation;

[0063] Step 2: Perform a difference calculation on the horizontal and vertical coordinates of adjacent discrete points respectively;

[0064] Xdiff=x n+1 -x n (n=1,...,28084)(1)

[0065] Ydiff=y n+1 -y n (n=1,...,28084)(2)

[0066] Xdiff=x n+1 -x n (n=1,...,13890)(3)

[0067] Ydiff=y n+1 -y n (n=1,...,13890)(4)

[0068] Step 3: Find the turning point of the contour direction based on the difference calculation results. From the difference calculation process, we can know that the difference result includes the difference value of the horizontal and vertical coordinates. At this time, no matter the horizontal and vertical coordinates, as long as one of the difference results is negative, the discrete point is the turning point. Use the find function in matlab to return the horizontal and vertical coordinates of the discrete points whose difference values ​​are less than 0;

[0069] Step 4: Further screen all discrete points with a difference value less than 0, in order to delete points that are very close to each other and obtain a streamlined combination of discrete key points of the contour. Fig.10 and Fig.11 It is found that if two adjacent points with a distance less than 0.4 (especially the distance between two points with the same horizontal coordinate and different vertical coordinates) are retained, the extracted contour is a closed contour with a small gap, which is inconsistent with the actual line contour, has little significance for contour fitting and increases the simulation time of contour fitting. Therefore, it is necessary to merge two points with a distance less than 0.4 into the same point, and then delete the duplicate discrete points to obtain the discrete key points of the contour;

[0070] Step 5: Compare the horizontal and vertical coordinate ranges of the discrete points before and after each difference, and store the discrete points in the horizontal and vertical coordinate ranges that disappear after each difference, merge the stored discrete points with the discrete points selected by the last difference calculation, and the result is the key discrete points of the fitting contour. Compare the number of its discrete points with the number threshold of the key discrete points of the final fitting contour to obtain the final result;

[0071] Step 6: To fit the contour more effectively, it is necessary to control the number of key discrete points of the contour. This paper takes 50 as the threshold of the number of key discrete points of the final fitting contour. When the number of discrete key points of the contour is less than or equal to 50, the differential calculation ends, otherwise, return to the second step (to reduce the number of differential cycles, the differential threshold for screening turning points in the first differential calculation can be set to a smaller value such as -20 or -15);

[0072] Step 7: Connect the key discrete points of the final fitting contour in sequence. The core of the algorithm is clockwise rearrangement. First, find the center point (x0, y0) of all discrete points, store the discrete points with abscissas less than x0 in array 1, and store the discrete points with abscissas greater than x0 in array 2. Secondly, calculate the tangent value of each discrete point and the center point in array 1 and array 2 respectively, as shown in formula 5-9 (where 32 is the number of discrete points of the final contour, taking the V-groove weld as an example). Then, sort the discrete points in arrays 1 and 2 from small to large according to the tangent value, complete the sorting of all discrete points, connect the discrete points in sequence, and connect the first and last discrete points to obtain the final fitting contour, as shown in the following formulas: Fig.12 and Fig.13 .

[0073] x0=(x max +xmin ) / 2 (5)

[0074] y0=(y max +y min ) / 2 (6)

[0075]

[0076] Step 8: Extract the fitted contours separately, and obtain the key point position information again through differential operation, as follows: Fig.14 and Fig.15 As shown in the circled points, the precise position information of the weld is obtained based on this, which is compared with the weld position information stored by the robot, and the position coordinate difference is sent to the robot weld tracker. After position error compensation is performed through PLC control, the welding gun position is adjusted at the same time to perform real-time weld tracking welding.

[0077] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0078] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A weld feature extraction and weld error compensation algorithm based on laser sensor, characterized in that: The weld feature extraction and weld error compensation algorithm comprises the following steps: Step 1: Acquire a weld image through a laser sensor, perform noise processing and binarization processing on the contour of the weld image, and use differential cycle calculation to search and extract key discrete points of the contour; Step 2: Delete the identified contour of the weld image after noise processing and binarization, and then perform a differential calculation on the horizontal and vertical coordinates of adjacent discrete points to identify the coordinate points that deviate from the contour range or the contour that is not related to the weld contour; Step 3: Find the turning point of the contour trend according to the difference calculation results; Step 4: further screen all discrete points with a difference value less than 0, delete points that are very close, and obtain a simplified combination of discrete key points of the contour; Step 5: Compare the horizontal and vertical coordinate ranges of the discrete points before and after each difference, and store the discrete points in the horizontal and vertical coordinate ranges that disappear after each difference, merge the stored discrete points with the discrete points selected by the last difference calculation, and the result is the key discrete points of the fitting contour. Compare the number of its discrete points with the number threshold of the key discrete points of the final fitting contour to obtain the final result; Step 6: Set the number threshold of the key discrete points of the final fitting contour. When the number of the key discrete points of the contour is less than or equal to the number threshold, the differential calculation ends. Otherwise, return to step 2 and perform a differential calculation on the horizontal and vertical coordinates of adjacent discrete points respectively. Step 7: Rearrange the key discrete points of the final fitting contour in a clockwise order and connect them in sequence, and connect the first and last discrete points to obtain the final fitting contour; Step 8. Extract the fitted contours separately, and obtain the key point position information again based on the differential operation. Based on this, obtain the precise position information of the weld, compare it with the weld position information stored by the robot, send the position coordinate difference to the robot weld tracker, and adjust the welding gun position after position error compensation through PLC control to perform real-time tracking welding of the weld.

2. The weld feature extraction and weld error compensation algorithm based on laser sensor according to claim 1, characterized in that: In the step 1, the pixel points of the key discrete points of the contour are extracted by the bwperim function, and the weld contour pixel points extracted by the bwperim function are respectively composed of two-dimensional arrays 2×X and 2×Y, that is, the original contour is composed of X and Y discrete pixel points, respectively, and each discrete point is represented by its horizontal and vertical coordinates (x n ,y n ; n=1,...,X / Y) represents.

3. The weld feature extraction and weld error compensation algorithm based on laser sensor according to claim 1, characterized in that: In the step 2, the horizontal and vertical coordinates of adjacent discrete points are subjected to a differential calculation using the following formula: Xdiff=x n+1 -x n (n=1,...X) Ydiff=y n+1 -y n (n=1,...X) Xdiff=x n+1 -x n (n=1,...Y) Ydiff=y n+1 -y n (n=1,...Y)。 4. The weld feature extraction and weld error compensation algorithm based on laser sensor according to claim 1, characterized in that: In the step three, the differential result of the differential calculation includes the differential values ​​of the horizontal and vertical coordinates. At this time, regardless of the horizontal and vertical coordinates, as long as one of the differential results is a negative value, the discrete point is the turning point, and the find function in MATLAB is used to return the horizontal and vertical coordinates of the discrete points whose differential values ​​are less than 0.

5. The laser sensor-based weld feature extraction and weld error compensation algorithm according to claim 1, characterized in that: In the step 4, the discrete points are screened by merging two points whose adjacent distance is less than 0.4 into the same point, and then deleting the duplicate discrete points, so as to obtain the discrete key points of the contour.

6. The laser sensor-based weld feature extraction and weld error compensation algorithm according to claim 1, characterized in that: In step 7, the sequential connection of key discrete points specifically includes: First, find the center point (x0, y0) of all discrete points, store the discrete points with abscissas less than x0 in array 1, and store the discrete points with abscissas greater than x0 in array 2; Secondly, calculate the tangent value of each discrete point and the center point in array 1 and array 2 respectively; Finally, the discrete points in array 1 and array 2 are sorted from small to large according to the tangent value, and the sorting of all discrete points is completed. The discrete points are connected in sequence, and the first and last discrete points are connected to obtain the final fitting contour.

7. The laser sensor-based weld feature extraction and weld error compensation algorithm according to claim 6, characterized in that: The calculation formula of the tangent value of each discrete point and the center point in array 1 and array 2 is: x0=(x max +x min ) / 2 y0=(y max +y min ) / 2 Where n is the number of final contour discrete points.

Citation Information

Cited By

  • Welding task execution method, device and equipment and storage medium

    CN119897871A

  • Welding seam detection method based on one-dimensional ordered laser stripe key point straight line fitting

    CN121213572A

  • Weld detection method based on one-dimensional ordered laser stripe key point straight line fitting

    CN121213572B