Method for guiding the assembly of pieces to be welded
By combining machine learning and vision, an intelligent welding guidance algorithm has been developed to solve the problems of low precision and efficiency in traditional laser welding, enabling a highly efficient and precise automated welding process that reduces the labor intensity and production costs of manual operations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN AOTTO TECH
- Filing Date
- 2023-04-27
- Publication Date
- 2026-07-14
AI Technical Summary
In traditional laser welding, errors in processing precision can result in flared or figure-eight shapes when splicing weldments. Manual operation makes it difficult to quickly ensure high precision, resulting in low efficiency and high labor intensity.
The intelligent welding guidance algorithm, which combines machine learning and vision, identifies the position and classification of weldments, uses a servo mechanism for template matching and weld fine-tuning, automatically calculates motion parameters, and controls the welding process in stages.
It improves welding efficiency and precision, reduces human error, lowers operator workload, improves the working environment, enables intelligent production, and increases the automation level of the production line.
Smart Images

Figure CN116579101B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser welding technology, and in particular to a method for guiding the splicing of parts to be welded. Background Technology
[0002] Laser welding vision guidance technology is an intelligent technology applied in the field of laser welding. By utilizing computer vision and machine learning algorithms, it monitors and controls the laser welding process in real time, thereby improving welding quality and efficiency.
[0003] In traditional laser welding, due to precision errors in the processed parts, even after meticulous splicing, a flared or figure-eight-shaped weld may remain. Operators must manually splice the parts based on experience and observation. This process requires trial and error, making it difficult to quickly guarantee the high precision required for manual weld splicing, resulting in low efficiency and high labor intensity for the operators. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method for guiding the splicing of components to be welded. This invention employs an intelligent welding guidance algorithm that combines machine learning, path planning, and vision. It uses vision to identify all components and their positions, and machine learning to classify and identify the components. Based on a standard part welding recipe template, it determines whether the error of the components is appropriate. This invention accurately identifies and classifies the components and controls the servo mechanism in stages through template matching (coarse matching) and weld seam fine-tuning, automatically calculating the motion parameters of the servo mechanism, thus greatly improving the efficiency and accuracy of welding.
[0005] The technical solution adopted by this invention to solve this problem is as follows:
[0006] A method for guiding the assembly of components to be welded includes the following steps:
[0007] A. Acquisition of standard parts and formulation;
[0008] B. Generation of images of the workpiece to be welded;
[0009] C. Identification of workpieces to be welded;
[0010] D. Matching of weldment templates;
[0011] E. Error identification;
[0012] F. Coarse positioning based on standard part templates;
[0013] G. Fine positioning based on weld seam identification.
[0014] Step A specifically includes:
[0015] 1) Standard Part Acquisition: Provide the CAD drawing and related parameters of each weldment to obtain images of one or more standard parts; upload the images to the algorithm positioning program, and the algorithm calculates the grayscale image and contour image of the weldment; use the acquired contour image and extract the image coordinates; based on the image coordinates, perform cluster analysis to classify the coordinates of each part; the algorithm also calculates the feature moments of the weldment, including convex hull, minimum bounding rectangle, centroid and area, etc., i.e., feature extraction;
[0016] 2) Standard component assembly: Formula is derived based on the standard weldment assembly, that is, the assembly of each weldment by welding;
[0017] 3) Recipe saving: Calculate the geometric center of the assembled graphic, perform centrifugal motion to ensure that the minimum distance between welded parts is N times the error requirement for easy identification, and save it as a template.
[0018] Step B specifically includes:
[0019] 1) Take photos of the parts to be welded
[0020] The workpiece to be welded is placed on the workbench. An initial photograph is taken, and optical technology is selected and utilized to ensure image quality and stable transmission of the image to the industrial control computer's algorithm program. This optical technology includes the following:
[0021] ① Equipment selection: Select appropriate camera equipment based on factors such as the size, shape, and surface quality of the workpiece to be welded to ensure the quality of the acquired image information;
[0022] ② Lighting conditions: Reasonable lighting conditions are key to ensuring clear image acquisition. Generally, uniform and soft light is required, and factors that affect image quality, such as strong light and shadows, should be avoided.
[0023] ③ Shooting angle: Select an appropriate shooting angle to ensure that key features such as welds are clearly visible in the acquired images;
[0024] ④ Focal length and depth: Select appropriate lens focal length and shooting depth according to the size of the workpiece and the width of the weld to make the weld clearly visible and keep the image of the entire workpiece clear;
[0025] 2) Image Processing
[0026] Image processing includes:
[0027] ① Image correction: The acquired images may contain problems such as image distortion and loss of quality, which need to be processed by image correction technology to ensure the accuracy and stability of the images;
[0028] ② Data transmission: In order to ensure that the acquired image information can be transmitted to the image processing and laser scanning system in a timely and accurate manner, it is necessary to select a stable and high-speed data transmission method, such as high-speed interface or network transmission.
[0029] Step C specifically includes:
[0030] 1) Shape extraction: Calculate the grayscale image and contour parameters of the image using image algorithms;
[0031] 2) Coordinate extraction: Calculate the coordinates of the workpiece to be welded using contour parameters;
[0032] 3) Welding component classification: Using the coordinates of the components to be welded, the DBSCAN machine learning algorithm is used to classify and identify the components and provide the coordinates of each component;
[0033] 4) Feature extraction: Calculate the feature moments of the workpiece to be welded, such as convex hull, minimum bounding rectangle, centroid, and area.
[0034] Steps 1) shape extraction and 2) coordinate extraction include:
[0035] ① Read the image information and convert it to grayscale;
[0036] ②Enhance the grayscale image by adjusting the contrast and enhancing the edges;
[0037] ③ Calculate the outline of the weldment in the image by combining gradient algorithm with grayscale threshold, and separate the sheet from the background;
[0038] ④ Obtain the shape parameters of the non-zero values in the sequence of the contour, that is, the x and y coordinates of the row and column where they are located;
[0039] Step 3) involves the DBSCAN machine learning algorithm for weldment classification, which includes the following steps:
[0040] ① Obtain the coordinates of the workpiece to be welded after image processing;
[0041] ② Enter the recipe parameters for the weldment in the system: number of weldments and description of weldment shape;
[0042] ③ Algorithm clustering training: Based on different recipes, set different DBSCAN density and point count parameters to identify the types and parameters of the parts to be welded, save the model, and establish the relationship between the model and the recipe;
[0043] ④ Identification of workpieces to be welded: In subsequent identification, relevant models are automatically referenced according to the recipe, and workpieces are identified based on the model parameters.
[0044] Steps D) weldment template matching and E) error identification specifically include the following steps:
[0045] 1) Select a recipe. The algorithm provides the coordinate parameters, feature moments, etc. of the corresponding template. The template parameters can be restored to the actual physical parameters based on the image parameters.
[0046] 2) Using the calibrated perspective transformation, calculate the actual coordinate parameters and characteristic moments of the workpiece to be welded;
[0047] 3) The algorithm program first establishes the mapping relationship between the workpiece to be welded and the standard part based on the feature moments of the workpiece after perspective transformation and the coordinates.
[0048] 4) Align the center line of the convex hull of each part to be welded with the center line of the convex hull of its corresponding template, calculate the welding edge error, and also align the upper or lower edge. Choose the one with the larger area and higher overlap.
[0049] 5) Calculate the error between the weld edge of each workpiece and the weld edge of the standard workpiece. If the absolute value of a single error or the cumulative error is greater than the product of the single error limit and the number of workpieces, then the single workpiece is deemed unqualified. This principle can be set as a custom parameter as process requirements accumulate.
[0050] Based on the relationship between each part to be welded and its standard template, calculate the error between each part to be welded and its standard template. Parts that exceed the error are discarded. If the requirements are met, the part is then moved to the next step.
[0051] Step F includes continuing this step if the weld edge error range is acceptable:
[0052] 1) Calculate the corresponding template based on the characteristic moments of each part to be welded, and then calculate the homogeneous matrix of the part to be welded and the aligned part to be welded with the standard part.
[0053] 2) Rotational motion: The homogeneous matrix provides the rotation and translation parameters. Considering that the special motion structure of the servo mechanism will cause the servo mechanism to rotate in the x and y directions, rotational motion is performed first.
[0054] 3) Calculate the homogeneous matrix according to step 1), obtain the translation parameters, and guide the servo motor movement based on the translation parameters;
[0055] 4) Move each part to be welded in the x-direction and y-direction according to the geometric center in the formula, that is, perform centripetal motion; the parameters of centripetal motion are the negative values of the centrifugal motion parameters in the formula preparation.
[0056] 5) If the weld distance is greater than the error or the upper and lower edges of the weld exceed the error, fix the upper right weldment and splice the weldment piece by piece counterclockwise, adjusting in the same way as steps 2) and 3).
[0057] Step G includes:
[0058] For the workpieces to be welded that do not meet the error requirements in the coarse positioning, the angle of the flared mouth is adjusted by rotational motion to ensure that the flared weld is parallel, and the x-axis and y-axis directions of the flared mouth are adjusted by translational motion to ensure that the weld spacing and the upper and lower edges of the workpieces on both sides of the weld are below the error limit.
[0059] After coarse positioning is completed, a second image is taken. This second image is used to identify the image after motion and to fine-tune the motion. The main steps include:
[0060] 1) Select the area where the weld will be located, including the parts to be welded on both sides;
[0061] 2) First, compensate for the angle of the flared mouth. That is, for n parts to be welded, fix one part and splice them one by one to ensure that each part to be welded meets the welding distance requirement and the upper and lower distance requirements of the welding edge. Finally, the angle formed by the extension lines of the welding edges of the first part and the nth part is obtained.
[0062] 3) Calculate the angle at which the point of intersection of the included angles in 2) enters the first weld edge error limit;
[0063] 4) Distribute the included angle value calculated in 3) equally to the remaining welds, that is, rotate the remaining parts to be welded according to the intersection point in 2);
[0064] 5) Calculate the vertical distance of the weld edge. If adjustment is required, provide the centripetal or centrifugal movement distance along the nth edge direction, and distribute the corresponding distance equally to the upper and lower boundaries of other welds.
[0065] 6) If the algorithms based on 4) and 5) still cannot meet the error limit, consider using an intelligent optimization algorithm to optimize the solution, perform path planning, and calculate the final position of each part to be welded;
[0066] 7) Take a third photo, calculate the weld distance and the distance between the top and bottom edges of the weld to check the movement results. If the results are not up to standard, prompt for manual processing.
[0067] The path planning in step 6) includes the following steps:
[0068] A path planning algorithm based on a hierarchical approach is employed. Its principle is to decompose the complex path planning problem into a series of simpler sub-problems and solve them hierarchically. Each layer builds upon the previous layer, continuing until the final goal is achieved. In laser welding scenarios, hierarchical planning can be applied to calculate the optimal path between multiple welded parts. Its specific implementation process can be divided into:
[0069] a) Low-level planning: First, perform individual path planning for each weldment to ensure that the weld seam of each weldment is covered;
[0070] b) Mid-level planning: Based on low-level planning, consider the staggered movement between multiple weldments to avoid repetitive movements and collisions;
[0071] c) High-level planning: Based on mid-level planning, consider global optimization of the entire welding area to minimize the total path length and time;
[0072] When calculating the optimal path, various algorithms such as A* algorithm, Dijkstra's algorithm, and greedy algorithm are used. At the same time, factors such as the position, shape, size, and orientation of each weldment must be considered. The application of hierarchical planning needs to be adjusted and optimized according to the actual situation, and compensation for angles and distances is required. ① First, calculate the angle of the flared mouth, and the corresponding angle is evenly distributed according to the number of welds to be spliced. ② The distance of the flared mouth is evenly distributed to each weld. If the weldment does not meet the requirements in the even distribution of ① and ②, the weldment is discarded and not spliced, thereby obtaining the best welding effect.
[0073] After step G, weld gap inspection is performed.
[0074] The weld gap inspection mainly includes the following steps:
[0075] 1) The camera captures images of the weld seam, and the algorithm processes the images to identify the location and coordinates of the weld seam;
[0076] 2) Calculate the characteristic moments of the weld, mainly focusing on the weld distance and the distance between the top and bottom edges of the weld;
[0077] 3) Determine whether the motion results are consistent with the calculation results.
[0078] Beneficial effects of this invention:
[0079] 1. This invention is a welding intelligent guidance algorithm that combines machine learning, path planning, and vision. It uses vision to accurately identify all weldments and machine learning to classify and identify the parts to be welded. It creates welding recipe templates based on standard parts and quickly identifies errors in the parts to be welded in seconds. This algorithm can improve welding accuracy and efficiency, reduce human error, increase production efficiency, improve the working environment, and achieve intelligent manufacturing.
[0080] For workpieces that meet the template error tolerance, the invention provides servo mechanism motion coordinate parameters to guide rapid coarse positioning. Subsequently, fine splicing of the workpieces is performed, calculating the positions of the workpieces that satisfy the distances between and between the weld seams, and providing motion parameters for each servo mechanism. This invention significantly improves the efficiency and accuracy of splicing by accurately identifying and classifying workpieces, and by implementing staged control of the servo mechanism (template matching for coarse matching, weld seam fine-tuning for matching) and automatically calculating servo mechanism motion parameters.
[0081] 2. This invention utilizes visual and machine learning technologies to classify and judge welded parts, enabling accurate identification and calculation of weld shape and position, avoiding the time wasted on repeated manual piecing together, thereby improving the accuracy and efficiency of welding.
[0082] 3. This invention guides the welding process through automation, which avoids errors caused by manual operation and improves welding quality.
[0083] 4. This invention, through automated welding guidance and priority splicing before welding, can detect unqualified parts in advance, shorten the time occupied by unqualified parts, greatly shorten welding time, improve production efficiency, and reduce production costs.
[0084] 5. This invention can reduce the labor intensity of welding operators, lower work risks, and improve the working environment through automated welding guidance.
[0085] 6. By combining machine learning and control technologies, this invention can achieve intelligent production, improve the automation level of production lines, and lay the foundation for intelligent manufacturing in the Industry 4.0 era.
[0086] 7. This invention uses standard parts and formulas for manufacturing steps. This process only needs to be manufactured once according to the standard parts and welding requirements. The same process does not require maintenance. For new processes, only standard parts need to be provided, which is convenient and easy to use.
[0087] 8. This invention provides a standard template by using template matching, error identification, and coarse positioning of the workpiece to be welded. This allows for rapid detection of the dimensions of each workpiece to be welded, improving detection efficiency, identifying defective parts in advance, and reducing manual workload.
[0088] 9. The invention improves the utilization rate of the parts to be welded and reduces the complexity of splicing by adopting precise positioning, reducing the splicing time by more than 80% compared with manual splicing. Attached Figure Description
[0089] Figure 1 This is a system flowchart of the present invention. Detailed Implementation
[0090] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort. Clearly, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0091] Combination Figure 1 A method for guiding the splicing of components to be welded includes the following steps:
[0092] A. Acquisition of standard parts and formulation;
[0093] B. Generation of images of the workpiece to be welded;
[0094] C. Identification of workpieces to be welded;
[0095] D. Matching of weldment templates;
[0096] E. Error identification;
[0097] F. Coarse positioning based on standard part templates;
[0098] G. Fine-grained positioning based on weld seam identification;
[0099] Step A specifically includes:
[0100] 1) Standard Part Acquisition: Provide the CAD drawing and related parameters of each weldment to obtain images of one or more standard parts; upload the images to the algorithm positioning program, and the algorithm calculates the grayscale image and contour image of the weldment; use the acquired contour image and extract the image coordinates; based on the image coordinates, perform cluster analysis to classify the coordinates of each part; the algorithm also calculates the feature moments of the weldment, including convex hull, minimum bounding rectangle, centroid and area, etc., i.e., feature extraction;
[0101] 2) Standard component assembly: Formula is derived based on the standard weldment assembly, that is, the assembly of each weldment by welding;
[0102] 3) Recipe saving: Calculate the geometric center of the assembled graphic, perform centrifugal motion to ensure that the minimum distance between weldments is N times the error requirement, such as 50 times, for easy identification, and save it as a template;
[0103] Step B specifically includes:
[0104] 1) Take photos of the parts to be welded
[0105] The workpiece to be welded is placed on the workbench. An initial photograph is taken, and optical technology is selected and utilized to ensure image quality and stable transmission of the image to the industrial control computer's algorithm program. This optical technology includes the following:
[0106] ① Equipment selection: Select appropriate camera equipment based on factors such as the size, shape, and surface quality of the workpiece to be welded to ensure the quality of the acquired image information;
[0107] ② Lighting conditions: Reasonable lighting conditions are key to ensuring clear image acquisition. Generally, uniform and soft light is required, and factors that affect image quality, such as strong light and shadows, should be avoided.
[0108] ③ Shooting angle: Select an appropriate shooting angle to ensure that key features such as welds are clearly visible in the acquired images;
[0109] ④ Focal length and depth: Select appropriate lens focal length and shooting depth according to the size of the workpiece and the width of the weld to make the weld clearly visible and keep the image of the entire workpiece clear;
[0110] 2) Image Processing
[0111] Image processing includes:
[0112] ① Image correction: The acquired images may contain problems such as image distortion and loss of quality, which need to be processed by image correction technology to ensure the accuracy and stability of the images;
[0113] ② Data transmission: In order to ensure that the acquired image information can be transmitted to the image processing and laser scanning system in a timely and accurate manner, it is necessary to select a stable and high-speed data transmission method, such as high-speed interface, network transmission, etc.
[0114] Step C specifically includes:
[0115] 1) Shape extraction: Calculate the grayscale image and contour parameters of the image using image algorithms;
[0116] 2) Coordinate extraction: Calculate the coordinates of the workpiece to be welded using contour parameters;
[0117] 3) Welding component classification: Using the coordinates of the components to be welded, the DBSCAN machine learning algorithm is used to classify and identify the components and provide the coordinates of each component;
[0118] 4) Feature extraction: Calculate the feature moments of the workpiece to be welded, such as convex hull, minimum bounding rectangle, centroid, and area.
[0119] Steps 1) shape extraction and 2) coordinate extraction include:
[0120] ① Read the image information and convert it to grayscale;
[0121] ②Enhance the grayscale image by adjusting the contrast and enhancing the edges;
[0122] ③ Calculate the outline of the weldment in the image by combining gradient algorithm with grayscale threshold, and separate the sheet from the background;
[0123] ④ Obtain the shape parameters of the non-zero values in the sequence of the contour, that is, the x and y coordinates of the row and column where they are located;
[0124] Step 3) involves the DBSCAN machine learning algorithm for weldment classification, which includes the following steps:
[0125] ① Obtain the coordinates of the workpiece to be welded after image processing;
[0126] ② Enter the recipe parameters for the weldment in the system: number of weldments and description of weldment shape;
[0127] ③ Algorithm clustering training: Set different DBSCAN parameters (density and points) according to different recipes.
[0128] (Data) to identify the type and parameters of the workpiece to be welded, save the model, and establish the relationship between the model and the recipe;
[0129] ④ Identification of workpieces to be welded: In subsequent identification, relevant models are automatically referenced according to the recipe, and workpieces are identified based on the model parameters.
[0130] Steps D) weldment template matching and E) error identification specifically include the following steps:
[0131] 1) Select a recipe. The algorithm provides the coordinate parameters, feature moments, etc. of the corresponding template. The template parameters can be restored to the actual physical parameters based on the image parameters.
[0132] 2) Using the calibrated perspective transformation, calculate the actual coordinate parameters and characteristic moments of the workpiece to be welded;
[0133] 3) The algorithm program first establishes the mapping relationship between the workpiece to be welded and the standard part based on the feature moments of the workpiece after perspective transformation and the coordinates.
[0134] 4) Align the center line of the bulge of each part to be welded with the center line of the bulge of its corresponding template, and calculate the welding edge error (the corresponding error is set by different formulas). In addition, the upper or lower edge needs to be aligned, and the one with the larger area and higher overlap is selected.
[0135] 5) Calculate the error between the weld edge of each workpiece and the weld edge of the standard workpiece. If the absolute value of a single error or the cumulative error is greater than the product of the single error limit and the number of workpieces, then the single workpiece is deemed unqualified. This principle can be set as a custom parameter as process requirements accumulate.
[0136] Based on the relationship between each part to be welded and its standard template, calculate the error between each part to be welded and its standard template. Parts that exceed the error are discarded. If the requirements are met, the part is then moved to the next step.
[0137] Step F includes continuing this step if the weld edge error range is acceptable:
[0138] 1) Calculate the corresponding template based on the characteristic moments of each part to be welded, and then calculate the homogeneous matrix of the part to be welded and the aligned part to be welded with the standard part.
[0139] 2) Rotational motion: The homogeneous matrix provides the rotation and translation parameters. Considering that the special motion structure of the servo mechanism will cause the servo mechanism to rotate in the x and y directions, rotational motion is performed first.
[0140] 3) Calculate the homogeneous matrix according to step 1), obtain the translation parameters, and guide the servo motor movement based on the translation parameters;
[0141] 4) Move each part to be welded in the x-direction and y-direction according to the geometric center in the formula, that is, perform centripetal motion; the parameters of centripetal motion are the negative values of the centrifugal motion parameters in the formula preparation.
[0142] 5) If the weld distance is greater than the error or the upper and lower edges of the weld exceed the error, fix the upper right weldment and splice the weldment piece by piece counterclockwise, adjusting in the same way as steps 2) and 3).
[0143] Step G includes:
[0144] For the workpieces to be welded that do not meet the error requirements in the coarse positioning, the angle of the flared mouth is adjusted by rotational motion to ensure that the flared weld is parallel, and the x-axis and y-axis directions of the flared mouth are adjusted by translational motion to ensure that the weld spacing and the upper and lower edges of the workpieces on both sides of the weld are below the error limit.
[0145] After coarse positioning is completed, a second image is taken. The image is then used to identify the motion and perform fine-tuning. This mainly includes the following steps:
[0146] 1) Select the area where the weld will be located, including the parts to be welded on both sides;
[0147] 2) First, compensate for the angle of the flared mouth. That is, for n parts to be welded, fix one part and splice them one by one to ensure that each part to be welded meets the welding distance requirement and the upper and lower distance requirements of the welding edge. Finally, the angle formed by the extension lines of the welding edges of the first part and the nth part is obtained.
[0148] 3) Calculate the angle at which the point of intersection of the included angles in 2) enters the first weld edge error limit;
[0149] 4) Distribute the included angle value calculated in 3) equally to the remaining welds, that is, rotate the remaining parts to be welded according to the intersection point in 2);
[0150] 5) Calculate the vertical distance of the weld edge. If adjustment is required, provide the centripetal or centrifugal movement distance along the nth edge direction, and distribute the corresponding distance equally to the upper and lower boundaries of other welds.
[0151] 6) If the algorithms based on 4) and 5) still cannot meet the error limit, consider using an intelligent optimization algorithm to optimize the solution, perform path planning, and calculate the final position of each part to be welded;
[0152] 7) Take a third photo, calculate the weld distance and the distance between the upper and lower edges of the weld to check the movement results. If the results are not up to standard, prompt for manual processing.
[0153] The path planning in step 6) includes the following steps:
[0154] A path planning algorithm based on a hierarchical approach is employed. Its principle is to decompose the complex path planning problem into a series of simpler sub-problems and solve them hierarchically. Each layer builds upon the previous layer, continuing until the final goal is achieved. In laser welding scenarios, hierarchical planning can be applied to calculate the optimal path between multiple welded parts. Its specific implementation process can be divided into:
[0155] a) Low-level planning: First, perform individual path planning for each weldment to ensure that the weld seam of each weldment is covered;
[0156] b) Mid-level planning: Based on low-level planning, consider the staggered movement between multiple weldments to avoid repetitive movements and collisions;
[0157] c) High-level planning: Based on mid-level planning, consider global optimization of the entire welding area to minimize the total path length and time;
[0158] When calculating the optimal path, various algorithms such as A* algorithm, Dijkstra's algorithm, and greedy algorithm are used. At the same time, factors such as the position, shape, size, and orientation of each weldment must be considered. The application of hierarchical planning needs to be adjusted and optimized according to the actual situation, and compensation for angles and distances is required. ① First, calculate the angle of the flared mouth, and the corresponding angle is evenly distributed according to the number of welds to be spliced. ② The distance of the flared mouth is evenly distributed to each weld. If the weldment does not meet the requirements in the even distribution of ① and ②, the weldment is discarded and not spliced, thereby obtaining the best welding effect.
[0159] After step G, weld gap inspection is performed.
[0160] The weld gap inspection mainly includes the following steps:
[0161] 1) The camera captures images of the weld seam, and the algorithm processes the images to identify the location and coordinates of the weld seam;
[0162] 2) Calculate the characteristic moments of the weld, mainly focusing on the weld distance and the distance between the top and bottom edges of the weld;
[0163] 3) Determine whether the motion results are consistent with the calculation results.
[0164] Weld gap inspection is mainly used to check whether the error requirements are met after the movement. If not, a fine positioning and inspection is performed again. This step requires taking a third photo based on the above movement results to check whether the movement meets the standards, that is, whether the distance between welds and the distance between the upper and lower edges of the weld are met. A fine positioning can be performed again, followed by a fourth photo and another inspection. If it is not qualified, manual processing is prompted.
[0165] In addition, this invention employs a welding intelligent guidance algorithm that combines machine learning, path planning, and vision. It uses vision to identify all weldments and their positions, and machine learning to classify and identify the weldments to be welded. It also uses a welding recipe template based on standard parts to determine whether the error of the weldment to be welded is appropriate. This invention accurately identifies and classifies weldments and controls the servo mechanism in stages through template matching (coarse matching) and weld fine-tuning (fine-tuning matching). It automatically calculates the motion parameters of the servo mechanism, which greatly improves the efficiency and accuracy of welding.
[0166] The above description represents preferred embodiments of the present invention. The specific embodiments are provided solely for a better understanding of the invention's concept. Those skilled in the art will recognize that various improvements or equivalent substitutions can be made based on the principles of the present invention, and these improvements or equivalent substitutions are also considered to fall within the scope of protection of the present invention.
Claims
1. A method for guiding the assembly of components to be welded, comprising the following steps: A. Acquisition of standard parts and formulation; B. Generation of images of the workpiece to be welded; C. Identification of workpieces to be welded; D. Matching of weldment templates; E. Error identification; F. Coarse positioning based on standard part templates; G. Fine-grained positioning based on weld seam identification; Step A specifically includes: 1) Standard Part Acquisition: Provide the CAD drawing and related parameters of each weldment to obtain images of one or more standard parts; upload the images to the algorithm positioning program, and the algorithm calculates the grayscale image and contour image of the weldment; use the acquired contour image and extract the image coordinates; based on the image coordinates, perform cluster analysis to classify the coordinates of each part; the algorithm also calculates the feature moments of the weldment, including convex hull, minimum bounding rectangle, centroid and area, i.e. feature extraction; 2) Standard component assembly: Formula is derived based on the standard weldment assembly, that is, the assembly of each weldment by welding; 3) Recipe saving: Calculate the geometric center of the assembled graphic, perform centrifugal motion to ensure that the minimum distance between weldments is N times the error requirement for easy identification, and save it as a template; Step F includes continuing this step if the weld edge error range is acceptable: 1) Calculate the corresponding template based on the characteristic moments of each part to be welded, and then calculate the homogeneous matrix of the part to be welded and the aligned part to be welded with the standard part. 2) Rotational motion: The homogeneous matrix provides the rotation and translation parameters. Considering that the special motion structure of the servo mechanism will cause the servo mechanism to rotate in the x and y directions, rotational motion is performed first. 3) Calculate the homogeneous matrix according to step 1), obtain the translation parameters, and guide the servo motor movement based on the translation parameters; 4) Move each part to be welded in the x-direction and y-direction according to the geometric center in the formula, that is, perform centripetal motion; the parameters of centripetal motion are the negative values of the centrifugal motion parameters in the formula preparation. 5) If the weld distance is greater than the error or the upper and lower edges of the weld exceed the error, fix the upper right weldment and splice the weldments one by one counterclockwise, adjusting in the same way as steps 2) and 3). Step G includes: For the workpieces to be welded that do not meet the error requirements in the coarse positioning, the angle of the flared mouth is adjusted by rotational motion to ensure that the flared weld is parallel, and the x-axis and y-axis directions of the flared mouth are adjusted by translational motion to ensure that the weld spacing and the upper and lower edges of the workpieces on both sides of the weld are below the error limit. After coarse positioning is completed, a photo is taken. The image is then used to identify the motion and perform fine-tuning of the motion. This mainly includes the following steps: 1) Select the area where the weld will be located, including the parts to be welded on both sides; 2) First, compensate for the angle of the flared mouth. That is, for n parts to be welded, fix one part and splice them one by one to ensure that each part to be welded meets the welding distance requirement and the upper and lower distance requirements of the welding edge. Finally, the angle formed by the extension lines of the welding edges of the first part and the nth part is obtained. 3) Calculate the angle at which the point of intersection of the included angles in 2) enters the first weld edge error limit; 4) Distribute the included angle value calculated in 3) equally to the remaining welds, that is, rotate the remaining parts to be welded according to the intersection point in 2); 5) Calculate the vertical distance of the weld edge. If adjustment is required, provide the centripetal or centrifugal movement distance along the nth edge direction, and distribute the corresponding distance equally to the upper and lower boundaries of other welds. 6) If the algorithms based on 4) and 5) still cannot meet the error limit, consider using an intelligent optimization algorithm to optimize the solution, perform path planning, and calculate the final position of each part to be welded; 7) Take photos, calculate the weld distance and the distance between the top and bottom edges of the weld to check the movement results. If the results are not up to standard, prompt for manual processing.
2. The method for guiding the splicing of parts to be welded as described in claim 1, characterized in that, Step B specifically includes: 1) Take photos of the parts to be welded The workpiece to be welded is placed on the workbench, photographed, and optical technology is selected and utilized to ensure image quality and stable transmission of the image to the industrial control computer algorithm program. This optical technology includes the following: ① Equipment selection: Select a suitable camera device based on the size, shape, and surface quality of the workpiece to be welded to ensure the quality of the acquired image information; ② Lighting conditions: Reasonable lighting conditions are key to ensuring clear image acquisition. Generally, uniform and soft light is required, and strong light and shadows should be avoided as they affect image quality. ③ Shooting angle: Select an appropriate shooting angle to ensure that the key features of the weld are clearly visible in the acquired image; ④ Focal length and depth: Select appropriate lens focal length and shooting depth according to the size of the workpiece and the width of the weld to make the weld clearly visible and keep the image of the entire workpiece clear; 2) Image Processing Image processing includes: ① Image correction: The acquired images may contain image distortion and other problems, which need to be processed through image correction technology to ensure image accuracy and stability; ② Data transmission: In order to ensure that the acquired image information can be transmitted to the image processing and laser scanning system in a timely and accurate manner, it is necessary to select a stable and high-speed data transmission method, such as high-speed interface or network transmission.
3. The method for guiding the splicing of parts to be welded as described in claim 1, characterized in that, Step C specifically includes: 1) Shape extraction: Calculate the grayscale image and contour parameters of the image using image algorithms; 2) Coordinate extraction: Calculate the coordinates of the workpiece to be welded using contour parameters; 3) Welding component classification: Using the coordinates of the components to be welded, the DBSCAN machine learning algorithm is used to classify and identify the components and provide the coordinates of each component; 4) Feature extraction: Calculate the feature moments, convex hull, minimum bounding rectangle, centroid, and area of the workpiece to be welded.
4. The method for guiding the splicing of parts to be welded as described in claim 3, characterized in that, Steps 1) shape extraction and 2) coordinate extraction include: ① Read the image information and convert it to grayscale; ②Enhance the grayscale image by adjusting the contrast and enhancing the edges; ③ Calculate the outline of the weldment in the image by combining gradient algorithm with grayscale threshold, and separate the sheet from the background; ④ Obtain the shape parameters of the non-zero values in the sequence of the contour, that is, the x and y coordinates of the row and column where they are located; Step 3) involves the DBSCAN machine learning algorithm for weldment classification, which includes the following steps: ① Obtain the coordinates of the workpiece to be welded after image processing; ② Enter the recipe parameters for the weldment in the system: number of weldments and description of weldment shape; ③ Algorithm clustering training: Based on different recipes, set different DBSCAN density and point count parameters to identify the types and parameters of the parts to be welded, save the model, and establish the relationship between the model and the recipe; ④ Identification of workpieces to be welded: In subsequent identification, relevant models are automatically referenced according to the recipe, and workpieces are identified based on the model parameters.
5. The method for guiding the splicing of parts to be welded as described in claim 1, characterized in that, Steps D (weld template matching) and E (error identification) specifically include the following steps: 1) Select a recipe. The algorithm provides the coordinate parameters and feature moments of the corresponding template. The template parameters can be restored to the actual physical parameters based on the image parameters. 2) Using the calibrated perspective transformation, calculate the actual coordinate parameters and characteristic moments of the workpiece to be welded; 3) The algorithm program first establishes the mapping relationship between the workpiece to be welded and the standard part based on the feature moments of the workpiece after perspective transformation and the coordinates. 4) Align the center line of the convex hull of each part to be welded with the center line of the convex hull of its corresponding template, calculate the welding edge error, and also align the upper or lower edge. Choose the one with the larger area and higher overlap. 5) Calculate the error between the weld edge of each workpiece and the weld edge of the standard workpiece. If the absolute value of a single error or the cumulative error is greater than the product of the single error limit and the number of workpieces, then the single workpiece is deemed unqualified. This principle can be set as a custom parameter as process requirements accumulate. Based on the relationship between each part to be welded and its standard template, calculate the error between each part to be welded and its standard template. Parts that exceed the error are discarded. If the requirements are met, the part is then moved to the next step.
6. The method for guiding the splicing of parts to be welded as described in claim 1, characterized in that, The path planning in step 6) includes the following steps: A path planning algorithm based on a hierarchical approach is adopted. Its principle is to decompose the complex path planning problem into a series of simpler sub-problems and solve them layer by layer. Each layer builds upon the previous one, until the final goal is achieved. In laser welding scenarios, hierarchical planning is applied to calculate the optimal path between multiple welded parts. Its specific implementation process includes: a) Low-level planning: First, perform individual path planning for each weldment to ensure that the weld seam of each weldment is covered; b) Mid-level planning: Based on low-level planning, consider the staggered movement between multiple weldments to avoid repetitive movements and collisions; c) High-level planning: Based on mid-level planning, consider global optimization of the entire welding area to minimize the total path length and time; When calculating the optimal path, multiple algorithms are employed, including A* algorithm, Dijkstra's algorithm, and greedy algorithm. Simultaneously, the position, shape, size, and orientation of each weldment must be considered. The application of hierarchical planning requires adjustment and optimization based on actual conditions, compensating for angles and distances. ① First, calculate the angle of the flared opening, and distribute the corresponding angle evenly according to the number of weld seams to be spliced. ② Distribute the flared opening distance evenly to each weld seam. If a weldment does not meet the requirements according to ① and ②, it is discarded and not spliced, thus achieving the best welding effect.
7. The method for guiding the splicing of parts to be welded as described in claim 1, characterized in that, in After step G, weld gap inspection is performed. The weld gap inspection mainly includes the following steps: 1) The camera captures images of the weld seam, and the algorithm processes the images to identify the location and coordinates of the weld seam; 2) Calculate the characteristic moments of the weld, mainly focusing on the weld distance and the distance between the top and bottom edges of the weld; 3) Determine whether the motion results are consistent with the calculation results.