Method and system for extracting welding seam features of special-shaped component and automatically generating welding track

By collecting and analyzing weld data of complex special-shaped components and generating welding trajectories, the problems of automation and intelligence of complex special-shaped components are solved, and an efficient and automated welding process is achieved.

CN119426873AActive Publication Date: 2025-02-14SHANGHAI JIAOTONG UNIV

Patent Information

Application Number
CN202411881358.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-02-14
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The prior art is difficult to achieve the automation and intelligence of welding complex special-shaped components, resulting in the difficulty of improving production efficiency and consistency of welding quality.

Method used

By establishing a three-dimensional coordinate system, using a linear laser sensor to collect weld data, perform secondary differential extraction of the weld bevel feature points, calculate the posture angle of the welding gun, and generate the welding trajectory.

Benefits of technology

The autonomous generation of welding trajectories and welding parameters of complex special-shaped components is achieved, the degree of automation of welding is improved, the operation is simplified, and the consistency of production efficiency and welding quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119426873A_ABST
    Figure CN119426873A_ABST
Patent Text Reader

Abstract

The invention provides a method and system for extracting welding seam features of a special-shaped component and automatically generating a welding track, and the method comprises the steps: S1, building a three-dimensional coordinate system, and carrying out the calculation to obtain an initial scanning position coordinate of a sensor; s2, enabling a sensor to move to an initial scanning position coordinate, and carrying out the collection of workpiece data; s3, secondary difference is carried out on the collected workpiece data, and weld groove feature points are extracted; s4, a welding gun attitude angle is obtained through calculation according to the weld groove feature points; and S5, welding path coordinates are obtained based on the welding gun attitude angle, and a welding track is generated. According to the method, automatic generation of matching of the welding track and the welding parameters of the complex special-shaped component is achieved, the problems that a traditional method depends on manual teaching, efficiency is low, precision is poor, and welding quality cannot be guaranteed are solved, and the automation degree of welding is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent welding manufacturing of small batches of complex parts and components, and in particular to a method and system for extracting weld features of special-shaped components and automatically generating welding trajectories. Background Art

[0002] In the manufacturing fields of aerospace, shipbuilding and energy, welding automation and intelligent technology play a key role and effectively improve production efficiency. However, current welding automation can only adapt to workpieces with simple and specific shapes. For some complex special-shaped components in actual production, it is difficult to realize the automation and intelligence of welding due to their complex geometric shapes and the gradual change of welding depth with the shape of the workpiece. At present, welding still relies on manual work, which greatly limits the improvement of production efficiency and the consistency of welding quality. Therefore, there is a need for a method to collect data for complex components through a certain sensing method, analyze and process the data to autonomously generate welding paths, realize autonomous positioning and welding of complex structures, and effectively improve the efficiency and quality of welding of complex components.

[0003] In the Chinese patent document with the publication number CN113814528A, a method for extracting weld curves and automatically generating trajectories based on interaction is disclosed. The robot vision system is calibrated to establish a mathematical mapping relationship between the pixel coordinates of the RGB-D image of the welded part and the three-dimensional coordinates of the world coordinate system; based on the calibrated robot vision system, the phase field distribution of the grating fringe image is extracted, the object point height of the object point on the welded part is calculated, and a mathematical mapping relationship between the object point height and the phase is established; the weld position on the welded part is continuously annotated; the region of interest is set, the minimum bounding box of the welding area is obtained according to the annotated traces of the weld, and the center line of the annotated traces is extracted to form a characteristic curve; the characteristic curve is discretized to generate a set of path points, and the set of path points is fitted to generate a welding trajectory. However, this patent document requires manual annotation of the welding position, and cannot solve the problem of spatial weld curve extraction and trajectory generation of complex special-shaped components.

[0004] In the Chinese patent document with publication number CN117921670A, a method for autonomous operation of welding robots without teaching based on data model and visual system is disclosed, which is used to realize intelligent autonomous welding operation of robots on a complete set of robot systems including a six-axis industrial robot supporting computer programming control interface, external axis ground rail, supporting robot welding machine, welding gun, line laser sensor, and 3D structured light camera. However, this method relies on the ideal model of the workpiece, and it is difficult to make up for the deviation between the imported ideal model and the actual workpiece weld. Moreover, the process is cumbersome and cannot solve the problem of autonomous generation of welding paths for complex space welds.

[0005] The article DOI: 10.1016 / j.jmapro.2019.02.010 proposes a method to reconstruct a three-dimensional curved weld spatial model through line laser scanning and plan the welding path based on the model. However, due to the blind spot of the field of view, it is difficult to obtain weld information in all positions, and it is also not suitable for the complex spatial welds mentioned above. Summary of the invention

[0006] In view of the defects in the prior art, the object of the present invention is to provide a method and system for extracting weld features of special-shaped components and automatically generating welding trajectories.

[0007] A method for extracting weld features of a special-shaped component and automatically generating a welding trajectory according to the present invention comprises:

[0008] Step S1: Establish a three-dimensional coordinate system and calculate the initial scanning position coordinates of the sensor;

[0009] Step S2: Move the sensor to the initial scanning position coordinates and collect workpiece data;

[0010] Step S3: performing secondary difference on the collected workpiece data to extract weld groove feature points;

[0011] Step S4: Calculate the welding gun posture angle according to the weld groove feature points;

[0012] Step S5: Obtain welding path coordinates based on the welding gun posture angle and generate a welding trajectory.

[0013] Preferably, step S1 includes the following sub-steps:

[0014] Step S1.1: Scan the top area of ​​the workpiece; drive the robot so that the laser sensor is located directly above the workpiece, project the laser stripe at the center of the weld groove, and make the laser sensor scan a distance along the y-axis direction to obtain point cloud data of the weld groove in the top area;

[0015] Step S1.2: Calculate the vertex coordinates of the weld by combining secondary difference with filtering and denoising;

[0016] Step S1.3: Calculate the height of the weld center of each row, and then use the random sampling consistency method to fit the height of the weld center of all rows, and obtain the coordinate of the highest point of the fitting curve in the y-axis direction as y t , the corresponding weld center coordinates are the initial scanning position coordinates of the sensor (x t ,y t , z t ).

[0017] Preferably, the step S1.2 includes the following sub-steps:

[0018] Step S1.2.1: Perform moving average filtering on the collected point cloud data row by row to remove noise, obtain the first-order difference, and perform median filtering and Gaussian filtering on the differenced data again;

[0019] Step S1.2.2: obtaining the second-order difference of the differential filtering data again, and performing median filtering and Gaussian filtering;

[0020] Step S1.2.3: Find the minimum value of the second-order difference data of the groove;

[0021] The minimum value corresponding point is the left and right characteristic points of the upper edge of the weld groove;

[0022] The center of the left and right characteristic points is the center of the weld;

[0023] Based on this, the weld center position x of each row of weld contour is obtained. j , and the corresponding height z j .

[0024] Preferably, step S2 includes the following sub-steps:

[0025] Step S2.1: Move the sensor to the initial scanning position; t ,y t , z t ) is sent to the robot, and the robot is controlled to move so that the center of the sensor laser stripe is aligned with the center of the weld at the highest point and at a certain height from the workpiece;

[0026] Step S2.2: The rotary positioner rotates the workpiece around the x-axis until the rotation angle is greater than 360°;

[0027] The sensor collects the groove contour point cloud data when the positioner starts to rotate, and ends the data collection synchronously when the positioner stops rotating.

[0028] Preferably, step S3 includes the following sub-steps:

[0029] Step S3.1: Perform moving average filtering on the collected point cloud data row by row to remove noise, obtain the first-order difference, and perform median filtering and Gaussian filtering on the differenced data;

[0030] Step S3.2: Calculate the second-order difference of the differential filtering data, and perform median filtering and Gaussian filtering again;

[0031] Step S3.3: finding the minimum value of the second-order difference data of the groove;

[0032] The minimum value corresponding point is the left and right characteristic points of the upper edge of the weld groove;

[0033] The center of the left and right characteristic points is the center of the weld;

[0034] Based on this, the center position x of each row of weld is obtained i , and the height corresponding to this position is z i .

[0035] Preferably, step S4 includes the following sub-steps:

[0036] Step S4.1: Calculate the relative height p of the weld center at 90° and 180° relative to the initial scanning position 1 , p 2 :

[0037] p 1 =z round(n*0.25) -z 1

[0038] p 2 =z round(n*0.5) -z 1

[0039] Among them, n represents the number of rows scanned in all positions, round represents rounding up, and z i Represents the weld center height value of the i-th row, z round(n*0.5) Indicates the weld center height when i = round (n * 0.5); z 1 Indicates the weld center height value of the data in row 1;

[0040] Step S4.2: Use Newton's iteration method to solve the equations to calculate the rotation center (y 0 , z 0 ):

[0041]

[0042] Among them, a and b represent the actual size information of the workpiece, b is the length of the major axis, and a is the length of the minor axis;

[0043] Step S4.3: Make the welding gun always in the normal direction of the workpiece contour, and the welding gun posture angle β at any contour position i The calculation method is as follows:

[0044]

[0045] Among them, t represents the data point taken at intervals of t rows, θ represents the angle corresponding to the adjacent t rows, and α i represents the rotation angle, ρ i It indicates the distance from the workpiece rotation center to the scanning position when the i-th row of data is obtained by scanning;

[0046] The obtained welding posture data is filtered by moving median and fitted with cubic smoothing spline curve to obtain the welding posture angle of each feature point of the entire welding path.

[0047] Preferably, step S5 includes the following sub-steps:

[0048] Step S5.1: Set the center position x of the weld i As the x-coordinate of the path point, the height z of the weld at the center i As the z coordinate of the path point, the x and z coordinates of the path point of the entire weld are obtained along with the rotation angle α. i The change curve of i and rotation angle α i The relationship is:

[0049]

[0050] Among them, n represents the number of rows scanned in the entire weld circle; the data is filtered using the segmented data fitting method to finally form the complete welding path coordinates (x i , z i , α i );

[0051] Step S5.2: Use the Douglas-Peukcer algorithm or take points according to the planned rotation angle interval to compress the number of key points and obtain the coordinates of the key points of the welding path: the rotation angle α and the x, z coordinate point pair (x k , z k , α k );

[0052] Step S5.3: According to the number of rows corresponding to the compressed key points, find the welding gun posture angle corresponding to the corresponding rotation angle, and obtain the welding gun posture angle β corresponding to the welding path feature point k ;

[0053] Step S5.4: According to the obtained position and posture data of the characteristic points of the welding path (x k , z k , α k ,β k ), forming a robot program; the generated (x k , z k , α k ,β k ) array is sent to the programmed robot welding path program to replace the position and posture of the corresponding position data point. When the workpiece rotates α k Angle, the welding gun should be adjusted accordingly (x k , z k , β k ).

[0054] Preferably, in step S5.4, if the welding parameters at each position are different, the process parameters at the corresponding position are searched and replaced according to the set process database to complete the autonomous matching generation of the welding path and process parameters.

[0055] A system for extracting weld features of special-shaped components and automatically generating welding trajectories according to the present invention comprises:

[0056] Robots, robot control cabinets, positioners, line laser sensors, sensor controllers and industrial computers;

[0057] The line laser sensor is fixed to the end of the robot in an eye-on-hand manner, and is used to collect weld groove contour point cloud data;

[0058] The industrial computer completes the collection and transmission of point cloud data based on the sensor controller;

[0059] After the data is transmitted to the industrial computer, it is processed by the algorithm to generate trajectory posture control points and transmitted to the robot control cabinet;

[0060] The robot control cabinet is used to control the robot and the positioner to perform welding.

[0061] Preferably, the positioner can drive the workpiece to rotate along the x-axis, and the workpiece is fixed thereon with the axis of symmetry pointing vertically downward.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] 1. The present invention realizes the autonomous generation of welding trajectory and welding parameter matching of complex special-shaped components, solves the problems of traditional methods relying on manual teaching, low efficiency, poor precision, and inability to guarantee welding quality, and greatly improves the degree of automation of welding.

[0064] 2. The present invention can complete welding only by rotating the workpiece while the sensor remains basically stationary. Compared with the method of fixing the workpiece and moving the sensor to scan and generate welding, the operation of the present invention is simpler and more reliable, and has better practicality.

[0065] 3. The present invention adopts the Douglas-Peukcer algorithm to greatly compress data points, greatly reducing the number of welding feature points without sacrificing path tracking accuracy, while reducing the complexity of the robot program, improving the generation efficiency of the robot welding program, and has good application prospects.

[0066] The present invention automatically obtains the position information and groove information of the weld through sensors and generates the welding trajectory autonomously, so that the programming and parameter matching of complex welds no longer rely on manual labor, significantly improving the production efficiency of welding and ensuring the consistency of product welding quality.

[0067] Other beneficial effects of the present invention will be explained in the specific implementation manner through the introduction of specific technical features and technical solutions. Through the introduction of these technical features and technical solutions, those skilled in the art should be able to understand the beneficial technical effects brought about by the technical features and technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0069] Figure 1 Schematic diagram of the scanning method for calculating the highest point of a workpiece in the present invention.

[0070] Figure 2 It is a schematic diagram of weld groove feature point extraction based on secondary difference in the present invention.

[0071] Figure 3 It is a schematic diagram of the all-position weld groove scanning method in the present invention.

[0072] Figure 4 Schematic diagram of scanning position when calculating the rotation center in the present invention.

[0073] Figure 5 This is a schematic diagram of the calculation of the rotation center in the present invention.

[0074] Figure 6 It is a schematic diagram of the change of welding gun posture angle in the present invention.

[0075] Figure 7 It is a schematic diagram of the change of the center position of the weld in the z direction in the present invention.

[0076] Figure 8 It is a schematic diagram of the change of the center position of the weld in the x direction in the present invention.

[0077] Fig. 9 This is a schematic diagram of the welding path and posture changes generated in the present invention.

[0078] Fig.10 It is a schematic diagram of the overall process of the present invention. DETAILED DESCRIPTION

[0079] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0080] The experimental device of the present invention is composed of: a six-axis industrial robot, a robot control cabinet, a positioner, a line laser sensor, a sensor controller, an industrial computer, etc. The connection relationship is: the line laser sensor is fixed to the end of the robot in an "eye on hand" manner. The industrial computer collects and transmits point cloud data through the sensor controller. After the data is transmitted to the industrial computer, it is processed by an algorithm to generate trajectory posture control points, which are transmitted to the robot control cabinet. The robot control cabinet controls the robot and the positioner to achieve welding. For the convenience of expression, the following is established: Figure 1 The coordinate system is used to illustrate the x, y, and z directions, with the direction perpendicular to the workpiece fixing plane and outward as the x-axis, the horizontal axis perpendicular to the x-axis and to the right as the positive direction of the y-axis, and the y-axis perpendicular to the x-axis and upward as the positive direction of the z-axis. The workpiece is fixed on the positioner with the symmetry axis pointing vertically downward, and can be rotated along the x-axis driven by the positioner.

[0081] A method for extracting weld features of special-shaped components and automatically generating welding trajectories, comprising:

[0082] Step S1: The initial scanning position of the sensor is determined.

[0083] Step S1.1: Scan the top area of ​​the workpiece: First, the driving robot drives the laser sensor to be located directly above the workpiece, and the laser stripes are projected near the center of the weld groove. Then the sensor scans a distance along the y-axis direction (weld direction) to obtain point cloud data of the weld groove in the top area.

[0084] Step S1.2: Calculation of weld center point: Calculate the weld vertex by quadratic difference combined with filtering and denoising.

[0085] Step S1.2.1: Perform moving average filtering on the collected point cloud data row by row (rows of weld point cloud data represent cross-sectional profile information of the weld) to remove noise, then calculate the first-order difference, and perform median filtering and Gaussian filtering on the differenced data again;

[0086] Step 1.2.2: On this basis, the second-order difference of the differential filter data is calculated, and median filtering and Gaussian filtering are performed;

[0087] Step 1.2.3: Find the minimum value of the second-order difference data of the groove. The corresponding point of the minimum value is the left and right feature points of the upper edge of the weld groove. The center of the left and right feature points is the center of the weld. In this way, the weld center position x of each row of weld contour is obtained. j , and the corresponding height z j .

[0088] Step 1.3: Calculate the coordinates of the center of the highest weld: Calculate the height of the center of each row of welds, and then use the random sampling consensus method (RANSAC) to fit the height of the center of all rows of welds. The coordinate of the highest point of the fitting curve in the y-axis direction is y t , the corresponding weld center coordinates are (x t ,y t , z t ), which is the initial position of the sensor scanning.

[0089] Step S2: scanning the complete contour of the workpiece weld;

[0090] Step S2.1: Move the sensor to the initial scanning position.

[0091] The coordinates of the highest point of the weld center (x t ,y t , z t ) is sent to the robot, which controls the robot's movement so that the center of the sensor laser stripe is aligned with the center of the weld at the highest point and at a certain height from the workpiece.

[0092] Step S2.2: Data acquisition.

[0093] The positioner is rotated to make the workpiece rotate around the x-axis. At the same time, the system triggers the sensor to start collecting the groove contour point cloud data. When the workpiece rotates > 360°, the positioner stops rotating and the sensor ends data collection synchronously.

[0094] Step S3: Extracting groove feature points;

[0095] Step S3.1: Perform moving average filtering on the collected point cloud data row by row (rows of weld point cloud data represent cross-sectional profile information of the weld) to remove noise, then calculate the first-order difference, and perform median filtering and Gaussian filtering on the differenced data again;

[0096] Step 3.2: On this basis, the second-order difference of the differential filter data is calculated, and median filtering and Gaussian filtering are performed;

[0097] Step 3.3: Find the minimum value of the second-order difference data of the groove. The point corresponding to the minimum value is the left and right feature points of the upper edge of the weld groove. The center of the left and right feature points is the center of the weld. In this way, the weld center position x of each row is obtained. i , the height corresponding to this position is z i .

[0098] Step S4: Calculation of welding gun posture angle:

[0099] Step S4.1: Calculate the relative height of the weld center at 90° and 180°:

[0100] Calculate the relative height p of the weld center at 90° and 180° relative to the scanning start position respectively 1 , p 2 .

[0101] p 1 =z round(n*0.25) -z 1

[0102] p 2 =z round(n*0.5) -z 1

[0103] Among them, n represents the number of rows scanned in all positions, round represents rounding up, and z i Represents the weld center height value of the i-th row, z round(n*0.5) Indicates the weld center height when i = round (n * 0.5); z 1 Indicates the weld center height value of the data in row 1.

[0104] Step S4.2: Calculate the rotation center. Use Newton's iteration method to solve the equations and calculate the rotation center (y 0 , z 0 ). The calculation formula is as follows:

[0105]

[0106] Among them, a and b represent the actual size information of the workpiece, b is the length of the major axis, and a is the length of the minor axis.

[0107] Step S4.3: Calculation of welding gun posture. In order to ensure the welding quality, the welding gun should always be in the normal direction of the workpiece contour. The welding gun posture angle β at any contour position is i The calculation method is as follows:

[0108]

[0109] Among them, t represents the data point taken at intervals of t rows, θ represents the angle corresponding to the adjacent t rows, and α i represents the rotation angle, ρ i It indicates the distance from the workpiece rotation center to the scanning position when the i-th row of data is obtained by scanning, such as Figure 5 shown.

[0110] Furthermore, for the obtained welding posture data, moving median filtering is first used, and then cubic smoothing spline curve fitting is used to obtain the welding posture angle of each feature point of the entire complete welding path.

[0111] Step S5: generating welding trajectory.

[0112] Step 5.1: Generation of welding path points. Take the central position x of the weld seam (i.e., the center of the left and right feature points extracted in step S3) as the x coordinate of the path points, and the weld height z at the central position as the z coordinate of the path points. Thus, the variation curves of the x and z coordinates of the path points of the entire circle of weld seams with the rotation angle α can be obtained respectively. The relationship between i and the rotation angle α is as follows: i where n represents the number of rows of the entire circle of weld seam scanning i Use the method of piecewise data fitting to filter the data. Specifically: in the middle part with large curvature changes, use median filtering + cubic smoothing spline fitting; in the small range at both ends with small curvature changes, the random sample consensus method can be used for fitting. Finally, form the complete welding path coordinates (x i , z i , α

[0113]

[0114]

[0115] i i , z i , α max ).

[0116] Step 5.2: Compression of welding path points. To facilitate the autonomous formation of robot programs, the number of data points should be compressed as much as possible without affecting the trajectory accuracy. Two methods can be used to compress the path points:

[0117] Method 1: Use the Douglas - Peukcer algorithm (hereinafter referred to as the DP algorithm) to compress the data;

[0118] Method 2: Take points at the planned rotation angle intervals, such as taking a path point every 6°, so as to compress the number of key points.

[0119] In Method 1, the DP algorithm is a classic algorithm for thinning linear features. Using it to process a large number of redundant geometric data points can not only achieve the purpose of reducing the data volume, but also retain the skeleton of the geometric shape to a large extent. The basic idea of the algorithm is as follows: Connect the first point and the last point of the curve to form a straight line, and calculate the maximum distance D from all intermediate points to this straight line max ; if D max < D (preset threshold), then only the first and last points of this segment are retained, and the processing of this segment ends; otherwise, use the intermediate point corresponding to D max to divide the curve into two segments, and repeat the previous two steps for these two segments. After the recursion ends, connect the retained points in sequence to form the simplified curve. It can be seen that the DP algorithm realizes curve compression by presetting the threshold D.

[0120] After compression, the coordinates of the key points of the welding path can be obtained: the rotation angle α and the x, z coordinate pairs (x​k , z k , α k ).

[0121] Step S5.3: Extract the posture angle corresponding to the feature point: According to the number of rows corresponding to the key points after compression in step S5.1, find the welding gun posture angle corresponding to the corresponding rotation angle, and obtain the welding gun posture angle β corresponding to the welding path feature point k .

[0122] Step S5.4: Generate robot program.

[0123] According to the obtained position and posture data of the characteristic points of the welding path (x k , z k , α k ,β k ), forming a robot program. k , z k , α k ,β k ) array is sent to the programmed robot welding path program, and the position and posture of the corresponding position data point are replaced to realize the workpiece rotation α k Angle, the welding gun should be adjusted accordingly (x k , z k , β k ).

[0124] If the welding parameters at each position are different, the process parameters at the corresponding position are searched and replaced according to the set process database, ultimately achieving autonomous matching and generation of welding paths and process parameters.

[0125] The present invention realizes the autonomous generation of welding trajectory and welding parameter matching for complex special-shaped components, solves the problems of traditional methods relying on manual teaching, low efficiency, poor precision, and inability to guarantee welding quality, and greatly improves the degree of automation of welding.

[0126] The above is a basic embodiment of the present invention. The technical solution of the present invention is further described below through a preferred embodiment.

[0127] Example 1

[0128] Reference Fig.10 As shown, a method for extracting weld feature points of complex special-shaped components and generating welding gun trajectories comprises the following steps:

[0129] Step S1: The initial scanning position of the sensor is determined.

[0130] Step S1.1: Scan the top area of ​​the workpiece. The workpiece is kept still with the axis of symmetry pointing vertically downward. The position of the line laser sensor is adjusted so that it is directly above the workpiece and the line laser range can cover the weld area. The sensor moves along the y-axis to complete the scan, such as Figure 1 As shown. In this embodiment, the laser sensor scans along a straight line at a speed of v = 0.1m / s, and the scanning frequency is set to f = 1000HZ. After scanning, 2000 rows of data are generated, each row of data has 3200 columns, and the interval between each column is 0.025mm. The interval between each row is calculated according to the scanning speed and frequency of the laser displacement sensor: v / f = 0.1mm.

[0131] Step S1.2: Calculate the center point of the weld. Calculate the center point of the weld by using secondary difference combined with filtering and denoising.

[0132] Specifically include:

[0133] Step S1.2.1: Perform moving average filtering on the point cloud data row by row (the row of the point cloud data represents the cross-sectional profile information of the weld), with a window size of 5×1. Then calculate the first-order difference, and perform median filtering and Gaussian filtering on the differenced data; Gaussian filter is a type of linear smoothing filter that selects weights based on the shape of the Gaussian function. Median filtering replaces the value of a point in a digital image or digital sequence with the median value of each point in a neighborhood of the point, so that the surrounding pixel values ​​are close to the true value, thereby eliminating isolated noise points. Gaussian smoothing filters are very effective in suppressing noise that follows a normal distribution.

[0134] Step 1.2.2: On this basis, the second-order difference of the differential filtering data is calculated, and median filtering and Gaussian filtering are performed.

[0135] Step 1.2.3: Find the minimum value of the second-order difference data of the groove. The point corresponding to the minimum value is the left and right characteristic points of the upper edge of the weld groove, such as Figure 2 As shown. The center of the left and right feature points is the center of the weld. Thus, the center position x of each row of welds is obtained. j , the corresponding height is z j .

[0136] Step 1.3: Calculate the coordinates of the center of the highest weld. Calculate the height of the center of each row of welds, and then use the least squares method based on the random sampling consensus algorithm (RANSAC) to fit the weld center height change curve, obtain the fitting curve formula, and calculate the coordinates of the curve pole. The fitting formula is as follows;

[0137] z=a 4 y 4 +a 3 y 3 +a 2 y 2+a 1 y+a 0

[0138] In this embodiment, the curve fitting idea based on the random sampling consensus algorithm is: randomly select 20 points, perform curve fitting on these 20 points, calculate the distance from other points in the point set to the fitting curve, and set a certain threshold. If it is greater than the threshold, it is called an external point and is discarded; if it is less than the threshold, it is an internal point, and the number of internal points is counted. Then, based on the new internal points, curve fitting is performed again, and it is iterated many times to select the fitting curve with the most internal points. The curve at this time is the optimal fitting curve, and the number of iterations is selected as 500 times. Finally, only the polynomial with the highest accuracy, that is, the polynomial with the least number of pixels out of the fitting curve, is retained as the fitting result. When the distance between the pixel point and the fitting curve exceeds 0.2, it is considered that the point is not on the curve.

[0139] The position of the highest point of the fitting curve in the y-axis direction is y t , accordingly, the weld center coordinates corresponding to this position are (x t ,y t , z t ).

[0140] Step S2: scanning the complete contour of the workpiece weld;

[0141] Step S2.1: Move the sensor to the set initial position. Set the coordinates of the highest point of the weld center (x t ,y t , z t ) is sent to the robot, which controls the robot's movement so that the center of the sensor laser line is aligned with the center of the weld at the highest point and at a certain height from the workpiece. This position is used as the initial position of the sensor for top scanning.

[0142] Step S2.2: Data collection. The positioner rotates to make the workpiece rotate around the x-axis. When the workpiece starts to rotate, the system synchronously triggers the sensor to collect groove data in real time. When the workpiece rotates ≥ 360°, the positioner stops rotating and the sensor synchronously ends data collection. Figure 3 As shown in the figure, the sensor scan frequency is 1000HZ, and the point cloud data size is 21000 rows and 3200 columns.

[0143] Step S3: Extracting groove feature points;

[0144] Step S3.1: Perform moving average filtering on the point cloud data row by row (the row of the point cloud data represents the cross-sectional information of the weld), with a window size of 5 × 1. Then calculate the first-order difference, and perform median filtering and Gaussian filtering on the differenced data;

[0145] Step 3.2: On this basis, the second-order difference of the differential filtering data is calculated again, and median filtering and Gaussian filtering are performed.

[0146] Step 3.3: Find the minimum value of the second-order difference data of the groove. The point corresponding to the minimum value is the left and right feature points of the upper edge of the weld groove. The center of the left and right feature points is the center of the weld. In this way, the weld center position x of each row is obtained. i , the corresponding height is z i .

[0147] Step S4: Calculation of welding gun posture angle:

[0148] Step S4.1: Calculate the relative height of the welds at 90° and 180° positions of the component:

[0149] Calculate the relative height p of 90° and 180° relative to the starting point respectively 1 , p 2 ,like Figure 4 shown.

[0150] p 1 =z round(n*0.25) -z 1

[0151] p 2 =z round(n*0.5) -z 1

[0152] Where n represents the number of rows scanned in the full position, which is 21000 in this embodiment, round represents rounding up, and z i Represents the weld center height value of the i-th row, z round(n*0.5) Indicates the weld center height when i = round (n * 0.5); z 1 Indicates the weld center height value of the data in row 1.

[0153] Step S4.2: Calculate the rotation center, such as Figure 5 shown.

[0154]

[0155] Among them, a and b represent the actual size information of the workpiece, b is the length of the major axis, and a is the length of the minor axis.

[0156] Use Newton's iteration method to solve the equations and calculate y 0 , z 0

[0157] Step S4.3: Calculation of welding gun posture. In order to ensure the welding quality, the welding gun should always be in the normal direction of the workpiece contour. The welding gun posture angle β at any contour position is i The calculation method is as follows:

[0158]

[0159] Where t means that data points are taken at intervals of t rows, and θ means the angle corresponding to adjacent t rows. i represents the rotation angle. i It indicates the distance from the workpiece rotation center to the scanning position when the i-th row of data is obtained by scanning, such as Figure 5 shown.

[0160] For the obtained welding posture data, first use moving median filtering, and the median filter window size is 300×1. Then use cubic spline curve fitting to obtain the smoothed welding posture angle data of all scanning positions of the entire workpiece space weld. Cubic smoothing spline is a curve smoothing algorithm for two-dimensional data. The smoothing parameter p directly determines the characteristics of the final fitting spline curve, that is, the weight ratio of the fitting accuracy of the original data and the smoothness of the curve itself. The fitting focuses on global data and has strong flexibility. In this embodiment, set p=1×10 -6 The smoothed curve is as follows Figure 6 shown.

[0161] Step S5: generating welding trajectory.

[0162] Step 5.1: Generate welding path points. Set the center position of the weld to x i (i.e., the center of the left and right feature points extracted in step S3) is used as the x coordinate of the path point, and the weld height z at the center position is i As the z coordinate of the path point, the x and z coordinates of the entire weld path and the rotation angle α can be obtained i The change curve of i and rotation angle α i The relationship is:

[0163]

[0164] Where n represents the number of rows scanned in full position.

[0165] The data were filtered using the segmented data fitting method. Specifically, median filtering + cubic smoothing spline fitting was used in the middle part where the curvature changes greatly. The median filter window size was 300×1, and the cubic smoothing spline parameter p=1×10 -6 ; In the small range at both ends where the curvature changes are small, the random sampling consistency method can be used to fit, and finally the complete welding path coordinates (x i , z i , α i ,,), the smoothed effect is as follows Figure 7 and Figure 8 shown.

[0166] Step 5.2: Welding path point compression. To facilitate the autonomous formation of a robot program, the number of data points should be compressed as much as possible without affecting the trajectory accuracy. Two methods can be used to compress the path points:

[0167] Method 1: The Douglas-Peukcer algorithm (hereinafter referred to as the DP algorithm) is used to compress the data. In this embodiment, the threshold D = 0.46 is selected, and the number of points after compression is 64, with a compression rate of 99.7%. The corresponding conversion relationship between the number of rows of data and the rotation angle α is: α = number of rows / total number of rows × 360°, and the α-z and α-x curves are plotted;

[0168] Method 2: Points are taken at intervals of the planned rotation angle. For example, a path point is taken every 6°, thereby greatly compressing the key feature points of the welding path. For some areas with changing curvature, points can be taken at intervals of 3°, and thus the number of key data points is also 64.

[0169] In Method 1, the DP algorithm is a classic algorithm for thinning linear features. Using it to process a large number of redundant geometric data points can not only achieve the purpose of data volume reduction but also retain the skeleton of the geometric shape to a large extent. The basic idea of the algorithm is as follows: Connect the first point and the last point of the curve to form a straight line, and calculate the maximum distance D from all intermediate points to this straight line max ; if D max < D (preset threshold), then only the first and last points of this segment are retained, and the processing of this segment ends; otherwise, the curve is divided into two segments by the intermediate point corresponding to D max , and the previous two steps are repeated for these two segments. After the recursion ends, the retained points are connected in sequence to form the simplified curve. It can be seen that the DP algorithm realizes curve compression by presetting the threshold D.

[0170] After compression, the coordinates of the key points of the welding path can be obtained: the rotation angle α and the x, z coordinate pairs (x k , z k , α k ), and the k value in this embodiment is 64.

[0171] Step S5.3: Extract the attitude angles corresponding to the feature points. According to the number of rows corresponding to the compressed key points in Step S5.1, find the welding torch attitude angles corresponding to the corresponding rotation angles to obtain the welding torch attitude angles β corresponding to the feature points of the welding path k .

[0172] Step S5.4 Generate a robot program. Referring to Fig. 9 as shown, according to the pose data pairs (x k , z k , α k , β k), forming a robot program, and generating (x k , z k , α k ,β k ) array is sent to the programmed robot welding path program, and the position and posture of the corresponding position data point are replaced to realize the workpiece rotation α k Angle, the welding gun should be adjusted accordingly (x k , z k , β k ). If the welding parameters of each position are different, the process parameters of the corresponding position are searched and replaced according to the set process database, and finally the welding path and process parameters are autonomously matched and generated.

[0173] The present invention can complete welding only by rotating the workpiece while the sensor remains basically stationary. Compared with the method of fixing the workpiece and moving the sensor to scan and generate welding, the operation of the present invention is simpler and more reliable, and has better practicality. The Douglas-Peukcer algorithm is used to greatly compress data points, and the number of welding feature points is greatly reduced without sacrificing the path tracking accuracy. At the same time, the complexity of the robot program is reduced, and the generation efficiency of the robot welding program is improved, which has a good application prospect.

[0174] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0175] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A method for extracting weld features of special-shaped components and automatically generating welding trajectories, characterized in that: include: Step S1: Establish a three-dimensional coordinate system and calculate the initial scanning position coordinates of the sensor; Step S2: Move the sensor to the initial scanning position coordinates and collect workpiece data; Step S3: performing secondary difference on the collected workpiece data to extract weld groove feature points; Step S4: Calculate the welding gun posture angle according to the weld groove feature points; Step S5: Obtain welding path coordinates based on the welding gun posture angle and generate a welding trajectory.

2. The method for extracting weld features of special-shaped components and automatically generating welding trajectories according to claim 1, characterized in that: The step S1 comprises the following sub-steps: Step S1.1: Scan the top area of ​​the workpiece; drive the robot so that the laser sensor is located directly above the workpiece, project the laser stripe at the center of the weld groove, and make the laser sensor scan a distance along the y-axis direction to obtain point cloud data of the weld groove in the top area; Step S1.2: Calculate the vertex coordinates of the weld by combining secondary difference with filtering and denoising; Step S1.3: Calculate the height of the weld center of each row, and then fit the height of the weld center of all rows using the random sampling consistency method to obtain the coordinate of the highest point of the fitting curve in the y-axis direction as y t , the corresponding weld center coordinates are the initial scanning position coordinates of the sensor (x t ,y t , z t ).

3. The method for extracting weld features of special-shaped components and automatically generating welding trajectories according to claim 2, characterized in that: The step S1.2 includes the following sub-steps: Step S1.2.1: Perform moving average filtering on the collected point cloud data row by row to remove noise, obtain the first-order difference, and perform median filtering and Gaussian filtering on the differenced data again; Step S1.2.2: obtaining the second-order difference of the differential filtering data again, and performing median filtering and Gaussian filtering; Step S1.2.3: Find the minimum value of the second-order difference data of the groove; The minimum value corresponding point is the left and right characteristic points of the upper edge of the weld groove; The center of the left and right characteristic points is the center of the weld; Based on this, the weld center position x of each row of weld contour is obtained. j , and the corresponding height z j .

4. The method for extracting weld features of special-shaped components and automatically generating welding trajectories according to claim 3 is characterized in that: The step S2 comprises the following sub-steps: Step S2.1: Move the sensor to the initial scanning position; t ,y t , z t ) is sent to the robot, and the robot is controlled to move so that the center of the sensor laser stripe is aligned with the center of the weld at the highest point and at a certain height from the workpiece; Step S2.2: The rotary positioner rotates the workpiece around the x-axis until the rotation angle is greater than 360°; The sensor collects the groove contour point cloud data when the positioner starts to rotate, and ends the data collection synchronously when the positioner stops rotating.

5. The method for extracting weld features of special-shaped components and automatically generating welding trajectories according to claim 4, characterized in that: The step S3 comprises the following sub-steps: Step S3.1: Perform moving average filtering on the collected point cloud data row by row to remove noise, obtain the first-order difference, and perform median filtering and Gaussian filtering on the differenced data; Step S3.2: Calculate the second-order difference of the differential filtering data, and perform median filtering and Gaussian filtering again; Step S3.3: finding the minimum value of the second-order difference data of the groove; The minimum value corresponding point is the left and right characteristic points of the upper edge of the weld groove; The center of the left and right characteristic points is the center of the weld; Based on this, the center position x of each row of weld is obtained i , and the height corresponding to this position is z i .

6. The method for extracting weld features of special-shaped components and automatically generating welding trajectories according to claim 5, characterized in that: The step S4 comprises the following sub-steps: Step S4.1: Calculate the relative heights p1 and p2 of the weld center at 90° and 180° relative to the initial scanning position respectively: p1=z round(n*0.25) -z1 p2=z round(n*0.5) -z1 Among them, n represents the number of rows scanned in all positions, round represents rounding up, and z i Represents the weld center height value of the i-th row, z round(n*0.5) represents the weld center height value when i=round(n*0.5); z1 represents the weld center height value of the data in the first row; Step S4.2: Use Newton's iteration method to calculate the rotation center (y0, z0) by solving the equations: Among them, a and b represent the actual size information of the workpiece, b is the length of the major axis, and a is the length of the minor axis; Step S4.3: Make the welding gun always in the normal direction of the workpiece contour, and the welding gun posture angle β at any contour position i The calculation method is as follows: Among them, t represents the data point taken at intervals of t rows, θ represents the angle corresponding to the adjacent t rows, and α i represents the rotation angle, ρ i It indicates the distance from the workpiece rotation center to the scanning position when the i-th row of data is obtained by scanning; The obtained welding posture data is filtered by moving median and fitted with cubic smoothing spline curve to obtain the welding posture angle of each feature point of the entire welding path.

7. The method for extracting weld features of special-shaped components and automatically generating welding trajectories according to claim 6, characterized in that: The step S5 comprises the following sub-steps: Step S5.1: Set the center position x of the weld i As the x-coordinate of the path point, the height z of the weld at the center i As the z coordinate of the path point, the x and z coordinates of the path point of the entire weld are obtained along with the rotation angle α. i The change curve of i and rotation angle α i The relationship is: Among them, n represents the number of rows scanned in the entire weld circle; the data is filtered using the segmented data fitting method to finally form the complete welding path coordinates (x i , z i , α i ); Step S5.2: Use the Douglas-Peukcer algorithm or take points according to the planned rotation angle interval to compress the number of key points and obtain the coordinates of the key points of the welding path: the rotation angle α and the x, z coordinate point pair (x k , z k , α k ); Step S5.3: According to the number of rows corresponding to the compressed key points, find the welding gun posture angle corresponding to the corresponding rotation angle, and obtain the welding gun posture angle β corresponding to the welding path feature point k ; Step S5.4: According to the obtained position and posture data of the characteristic points of the welding path (x k , z k , α k ,β k ), forming a robot program; the generated (x k , z k , α k ,β k ) array is sent to the programmed robot welding path program to replace the position and posture of the corresponding position data point. When the workpiece rotates α k Angle, the welding gun should be adjusted accordingly (x k , z k , β k ).

8. The method for extracting weld features of special-shaped components and automatically generating welding trajectories according to claim 7, characterized in that: In step S5.4, if the welding parameters at each position are different, the process parameters at the corresponding position are searched and replaced according to the set process database to complete the autonomous matching generation of the welding path and process parameters.

9. A system for extracting weld features of special-shaped components and automatically generating welding trajectories, using the method for extracting weld features of special-shaped components and automatically generating welding trajectories according to any one of claims 1 to 8, characterized in that: include: Robots, robot control cabinets, positioners, line laser sensors, sensor controllers and industrial computers; The line laser sensor is fixed to the end of the robot in an eye-on-hand manner, and is used to collect weld groove contour point cloud data; The industrial computer completes the collection and transmission of point cloud data based on the sensor controller; After the data is transmitted to the industrial computer, it is processed by the algorithm to generate trajectory posture control points and transmitted to the robot control cabinet; The robot control cabinet is used to control the robot and the positioner to perform welding.

10. The system for extracting weld features of special-shaped components and automatically generating welding trajectories according to claim 9, characterized in that: The positioner can drive the workpiece to rotate along the x-axis, and the workpiece is fixed thereon with the axis of symmetry pointing vertically downward.

Citation Information

Patent Citations

  • Interaction-based welding seam curve extraction and automatic track generation method

    CN113814528A

  • Welding robot teaching-free autonomous operation method based on data model and visual system

    CN117921670A

  • Variable cross section groove collecting box tube base automatic welding method

    CN106735999A

  • Space right-angled broken line welding line fitting system based on line laser scanning

    CN110315249A

  • Three-dimensional track laser welding seam tracking attitude planning method

    CN114043087A

Cited By

  • Special-shaped curved surface welding method and device based on welding track guiding

    CN120715398A

  • Welding robot and control method thereof

    CN121820969A