A three-dimensional point cloud-based automatic welding method and system for a welding robot
By adopting a welding method based on 3D point clouds, the consistency and portability of weld inspection results are achieved, automatic detection of curved welds is supported, and multi-layer, multi-pass weld trajectories with consistent shapes are generated, thereby improving welding quality and efficiency and solving a number of defects in existing technologies.
Patent Information
- Application Number
- CN202611499218.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-03
AI Technical Summary
Existing welding robot technology suffers from problems such as long processing time, inability to adapt to small-batch, multi-variety production, unstable welding quality, inability to obtain detailed three-dimensional information of welds, insufficient detection accuracy, poor cross-platform consistency, lack of automation in multi-layer and multi-pass planning, low precision in welding timing control, and insufficient precision in long weld point cloud splicing.
A welding method based on 3D point cloud is adopted. The point cloud is transformed to a unified base coordinate system by using hand-eye calibration matrix and tool center point offset. Deterministic algorithm is used for point cloud preprocessing and weld detection to generate multi-layer, multi-pass weld trajectory point sequence. The robot is controlled to move at a constant speed in servo mode, and the arc initiation and arc termination timing of the welding power source are controlled synchronously.
It achieves consistency and portability of weld inspection results, supports automatic detection of curved welds, generates multi-layer, multi-pass weld trajectories with consistent shape, improves welding quality and efficiency, reduces the impact of communication delay on welding timing, and solves the problem of insufficient accuracy in long weld splicing.
Smart Images

Figure CN123024966A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial welding robot technology, specifically to an automatic welding method and system for welding robots based on three-dimensional point clouds. Background Technology
[0002] Welding robots have been widely used in the manufacturing of steel structures, ships, bridges and other fields. In the existing technology, automatic welding of welding robots mainly adopts teaching and reproduction type welding robots, weld seam tracking schemes based on two-dimensional vision or line lasers and weld seam detection schemes based on three-dimensional point clouds.
[0003] However, existing teach-and-playback welding robots rely on operators teaching the weld trajectory point by point using a teach pendant, which the robot then records and repeats. This method requires individual teaching for each weld, resulting in long processing times and making it unsuitable for small-batch, multi-variety production. Furthermore, workpiece assembly errors and thermal deformation can cause the taught trajectory to deviate from the actual weld, leading to inconsistent welding quality.
[0004] In contrast, weld seam tracking solutions based on 2D vision or line lasers acquire 2D images or cross-sectional contours of the weld seam using a 2D camera or line laser sensor. Image processing is then used to identify the weld seam center position and correct the welding torch trajectory in real time. However, these solutions can only acquire localized 2D information about the weld seam and cannot obtain detailed information such as its depth, bevel angle, width, and other 3D geometric features. Therefore, they cannot perform multi-layer, multi-pass filling planning; and their tracking accuracy is limited for curved weld seams and complex bevel shapes.
[0005] However, current weld inspection solutions based on 3D point clouds acquire 3D point clouds by scanning the weld area with LiDAR and then perform weld identification. These solutions still have several shortcomings. First, they suffer from poor cross-platform consistency. The algorithm relies on random sampling and platform-specific linear algebra libraries, leading to different detection results on different computing platforms (e.g., x86 PCs versus ARM embedded boards) using the same point cloud data, thus affecting the algorithm's portability and reliability for industrial deployment. Second, they lack accuracy in detecting curved welds. Most designs are for straight welds, and slicing along a fixed direction cannot adapt to changes in weld direction, making it difficult to accurately extract the complete geometric features of curved welds. Third, for multi-layer, multi-pass planning, most existing methods lack automation. After acquiring the weld geometry, manual parameter setting or simple grid division is still required, failing to adaptively generate weld beads based on the actual shape of the bevel cross-section. Fourth, the welding timing control accuracy is low. Current and voltage control during arc initiation and termination rely on manual panel settings or significant delays from each communication, making it impossible to achieve precise arc initiation slopes and arc termination filling processes. Fifthly, point cloud stitching for long welds suffers from insufficient accuracy and limited field of view in a single scan. Long welds require multi-pose stitching, but existing methods lack accurate incremental coordinate transformation methods. Summary of the Invention
[0006] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides an automated welding method and system for welding robots based on three-dimensional point clouds, solving at least one technical problem mentioned in the background art.
[0007] (II) Technical Solution To achieve the above objectives, the present invention adopts the following technical solution: Firstly, an automated welding method for welding robots based on three-dimensional point clouds includes: Scan the weld area to obtain multiple frames of 3D point cloud data of the weld area. Based on the hand-eye calibration matrix and the tool center point offset, transform the point cloud data of each frame to a unified base coordinate system and merge them to obtain the complete point cloud of the weld area. The complete point cloud of the weld area is preprocessed, and numerical calculations are performed using a deterministic algorithm. An evidence map is constructed by estimating the carrier surface and the carrier surface where the weld is located is determined. The deterministic algorithm uses a fixed initial vector to perform deterministic iterations, extracts the main path of the weld on the evidence map, constructs a moving coordinate system along the main path and extracts a two-dimensional profile sequence, identifies the geometric parameters of each profile, and reconstructs the three-dimensional geometric information of the weld. Based on the three-dimensional geometric information of the weld, a multi-layer, multi-pass weld trajectory point sequence is generated using the bottom of the weld as a reference and a rigid body translation method. The sequence of multi-layer, multi-pass weld trajectory points is converted into a robot motion trajectory, and a speed planning method is adopted that accelerates at the beginning of the arc and decelerates at the end of the arc. The robot is controlled to move at a constant speed in servo mode along the motion trajectory, and the welding power supply is synchronously controlled to output welding current and voltage according to the preset arc start and arc end sequence.
[0008] Preferably, the deterministic algorithm includes: Deterministic eigenvalue decomposition: Using a fixed vector as the initial vector, power iteration is performed to obtain the principal component eigenvectors. During the iteration, Gram-Schmidt orthogonalization is used to subtract the directions of the obtained principal components. The remaining eigenvectors are obtained through cross product, so that the signs and order of the eigenvectors are uniquely determined by the input data. Deterministic one-dimensional two-means clustering: After sorting the one-dimensional array, calculate the prefix sum and prefix sum of squares, traverse all split points to calculate the within-group sum of squares, and take the split point with the smallest within-group sum of squares as the optimal split threshold, so that the clustering result is uniquely determined by the input data; Deterministic downsampling: Integer indices are uniformly selected as sampling points within the point cloud index range, so that the sampled subset is uniquely determined by the input data.
[0009] Preferably, the step of preprocessing the complete point cloud of the weld area includes: performing region of interest filtering on the complete point cloud to filter out irrelevant points outside the spatial range; And / or, the deterministic eigenvalue decomposition specifically involves: setting a 3×3 symmetric matrix C, using a fixed vector [1, 0, 0]T as the initial vector, performing exponential iteration to obtain the first eigenvector V1; using a fixed standard basis vector that is not parallel to V1 as the initial vector, and using Gram-Schmidt orthogonalization to subtract the V1 component during iteration to obtain the second eigenvector V2; and obtaining the third eigenvector V3 through the cross product V3 = V1 × V2. And / or, in the deterministic one-dimensional two-means clustering, traversing the split points k∈[1,n-1], the formula for calculating the sum of squares within each group is: WCSS0=prefix_sq [k]-prefix_sum [k] 2 / k; WCSS1=(prefix_sq [n]-prefix_sq [k])-(prefix_sum [n]-prefix_sum [k]) 2 / (nk); The optimal split point is the one where WCSS = WCSS0 + WCSS1 is minimized.
[0010] Preferably, the carrier surface estimation includes: Multiple candidate carrier surface coordinate systems are generated, the point cloud is projected onto each candidate surface and rasterized, and the evidence score of each raster is calculated. The evidence score is a weighted composite of the depth score, edge score and hole score within the raster. The evidence scores of each raster constitute the evidence map. The evidence map is binarized and connected component analysis is performed. The candidate carrier surfaces are scored based on the number of grid cells in the connected components, the path length, and the average evidence score. The carrier surface with the highest score is selected as the best carrier surface.
[0011] Preferably, the step of extracting the main weld path is as follows: On the evidence map of the optimal carrier surface, grid cells are used as nodes and the composite function of the geometric distance between adjacent grid cells and the evidence score is used as the edge weight. The shortest path algorithm is used to obtain the geodesic path between the two farthest endpoints in the connected domain. After smoothing and resampling, it is used as the main path of the weld. The steps for determining the two farthest endpoints are as follows: starting from the point with the highest evidence score, perform the first shortest path search to obtain the farthest point A; then, starting from point A, perform the second shortest path search to obtain the farthest point B and record the predecessor; and backtrack the predecessor to obtain the path from A to B. And / or, The extraction also includes bimodal detection calibration path height, constructing a point height histogram near the path, detecting local maxima after Gaussian smoothing, taking the first two peaks in descending order of peak value, and using the midpoint of the bimodal peaks as the weld opening center, mapping back to height coordinates as the path height calibration value; Smoothing is B-spline smoothing, and resampling is fixed-step resampling.
[0012] Preferably, a moving coordinate system is constructed along the main path and a two-dimensional profile sequence is extracted. The geometric parameters of each profile are identified, and the three-dimensional geometric information of the weld is reconstructed. At each path sampling point, a local coordinate system is constructed with the path direction as the first direction and the weld transverse direction as the second direction. The two-dimensional profile point cloud is extracted and rasterized within the local coordinate system; the profile recognition supports automatic identification and switching between two weld geometry modes: V-groove mode and stacked Z-mode; wherein... In the V-shaped bevel pattern, the left and right edges are identified as the weld top position and the root is identified as the weld bottom position. The bevel angle is equal to 180 degrees minus the angle between the left and right sidewalls and the vertical direction. In the stacked Z-mode, the positions of the upper sidewall, lower sidewall, and weld base are identified. The sidewalls of the upper and lower steel plates are estimated independently to avoid misalignment interference, and the midpoint of the double peaks is used as the path height calibration value. The geometric parameters of all sections are post-processed sequentially. Edge jump points and outliers are removed based on the distance between adjacent sections and the absolute deviation of the median. The section direction is flipped uniformly by the median of all section directions. The root representative points of each section are sorted according to the path position to form the weld centerline. After smoothing, the three-dimensional geometric parameters of the weld are output.
[0013] Preferably, the rigid body translation method is as follows: A global mesh is constructed based on the weld geometry parameters of each profile. The set of layers and traces of all profiles is collected. The local coordinates of each layer and trace of each profile are calculated. The local coordinates are uniformly converted into world coordinates through the transformation matrix of least squares fitting. Each pass position is shifted laterally by a set distance based on the bottom curve of the weld, and the pass number is multiplied by the pass spacing along the height direction. All cross sections use a unified reference direction vector, so that each weld pass is translated as a rigid body based on the reference curve. Among them, the layer spacing and the channel spacing are determined by process parameters. All channels in the same layer are distributed with equal width. The number of channels in the bottom layer is less than the number of channels in the top layer. The bevel cross section is distributed in an inverted trapezoidal shape.
[0014] Preferably, the speed planning is trapezoidal speed planning, specifically: The arc-starting section operates at an acceleration rate higher than the welding speed, and the length of the arc-starting acceleration section accounts for a set proportion of the weld length. The stabilization section operates at a constant welding speed; The arc-ending segment linearly decelerates to a speed lower than the welding speed at the end point, and the length of the arc-ending deceleration segment accounts for a set proportion of the weld length; And / or, The servo mode is specifically as follows: The cumulative arc length of the trajectory is pre-calculated. During the welding process, the target arc length increment is calculated based on the real-time clock. The position and attitude are obtained by binary search for the positioning interpolation segment index and linear interpolation. Servo commands are sent to the robot at fixed intervals. And / or, The welding process also includes superimposed lateral oscillation during the robot's movement, with the oscillation direction being lateral and perpendicular to the welding forward direction.
[0015] Preferably, the arc initiation sequence includes the stages of pre-gas supply, arc ignition, hot arc initiation, and gradual transition to normal current, and the arc termination sequence includes the stages of gradually reducing current in steps, arc extinguishing, arc reheating, and post-gas supply. And / or, During the welding process, analog output is used to control the current and voltage of the welding power supply, and analog buffer control is set. Maintain a cache variable to record the current and voltage values written last time, and only perform an actual write operation when the deviation between the target value and the cache value exceeds a set threshold; Analog values are pre-written during the robot's approach phase to absorb communication delays during the movement time.
[0016] Secondly, an automated welding robot system based on three-dimensional point clouds is also provided, including: A robotic arm is used to move a 3D sensor and perform welding operations. A 3D sensor, installed at the end of the robotic arm, is used to collect 3D point cloud data of the weld area; Welding power source, used to provide welding current and voltage; The controller is communicatively connected to the three-dimensional sensor, the robotic arm, and the welding power source. The controller includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the automatic welding method for welding robots based on three-dimensional point clouds as described above.
[0017] (III) Beneficial Effects This invention provides an automated welding method and system for welding robots based on three-dimensional point clouds, which has the following advantages compared with the prior art: In this invention, the plane fitting and principal component analysis in point cloud preprocessing and weld inspection employ a power-law iteration plus contraction method for deterministic eigenvalue decomposition. It iterates using a fixed starting vector, successively subtracting the directions of the decomposed principal components through Gram-Schmidt orthogonalization, and determining the remaining eigenvectors through cross product operations. Matrix multiplication and vector normalization are used, without relying on external linear algebra libraries. One-dimensional two-means clustering with sorting and prefix sums is used to classify the point cloud data, traversing all segmentation points and selecting the segmentation threshold with the minimum sum of variance within each group, providing an exact solution without the need for random initialization. Equal-interval index sampling is used for point cloud downsampling, achieving consistent results across all platforms. This ensures consistent detection results for the same point cloud data on different computing platforms, improving the algorithm's portability and industrial reliability.
[0018] Evidence maps are constructed by estimating the carrier surface and then fused with multi-dimensional features such as depth, edge, and voids. The grid cells are used as nodes and the composite function of the geometric distance between adjacent grid cells and the evidence score is used as edge weights. The geodesic path between the two farthest endpoints in the connected domain is obtained through the shortest path algorithm. After smoothing and resampling, it is used as the main path of the weld. It can automatically detect curved welds with arbitrary directions, solving the problem that the existing technology can only be used for straight welds. At the same time, it supports the automatic recognition and switching of two weld geometry modes: V-groove mode and stacked Z mode.
[0019] This invention, based on the three-dimensional geometric information of the weld, uses the bottom of the weld as a reference and generates a multi-layer, multi-pass weld trajectory point sequence covering the weld cross-section using rigid body translation. A global mesh is constructed based on the weld geometric parameters of each cross-section. The local coordinates of each pass are uniformly converted to world coordinates using a least-squares fitting transformation matrix. The position of each pass is translated laterally by a set distance based on the bottom curve of the weld and translated along the height direction by the pass number multiplied by the pass spacing. All cross-sections use a unified reference direction vector, so that the rigid body translation of each weld pass as the reference curve has a completely consistent shape. This avoids the weld pass jump problem caused by independent cross-section planning in the prior art and realizes a fully automatic conversion from weld geometry to welding process.
[0020] This invention employs analog output to control the current and voltage of the welding power supply. Analog buffer control is implemented, maintaining buffer variables that record the previously written current and voltage values. Actual writing is only performed when the deviation between the target value and the buffer value exceeds a set threshold. Analog values are pre-written during the robot's approach phase, utilizing movement time to absorb communication delays and minimizing their impact on welding timing. This ensures precise execution of the stepped current control for arc initiation ramps and arc termination filling. The invention utilizes a servo welding mode, pre-calculating the cumulative arc length of the trajectory. During welding, the target arc length increment is calculated based on a real-time clock. The position and attitude are linearly interpolated using binary search to locate the interpolation segment index. Servo commands are sent to the robot at fixed intervals, achieving uniform and continuous welding. This avoids the weld discontinuity problem caused by frequent acceleration, deceleration, and pauses in traditional point-by-point interpolation. Combined with trapezoidal speed planning, it effectively reduces heat accumulation at the ends. Finally, this invention uses incremental coordinate transformation to transform each frame of point cloud to a unified base coordinate system, ensuring that the radar point cloud coordinates do not change with the robot's movement. This enables high-precision multi-attitude point cloud stitching for long welds. Attached Figure Description
[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a schematic diagram of V-shaped bevel profile geometry identification according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the cross-sectional geometry identification of the stacked Z-weld in an embodiment of the present invention; Figure 3 This is a schematic diagram of the multi-layer, multi-pass weld filling plan according to an embodiment of the present invention; Figure 4 This is a schematic diagram of rigid body translational weld bead generation based on the weld root in an embodiment of the present invention; Figure 5 This is a schematic diagram of trapezoidal velocity planning according to an embodiment of the present invention; Figure 6 This is a flowchart illustrating the arc initiation timing according to an embodiment of the present invention. Figure 7This is a timing diagram of the arc-shaped ramp in an embodiment of the present invention; Figure 8 This is a timing diagram of the stepped attenuation during arc closing and crater filling according to an embodiment of the present invention; Figure 9 This is a timing diagram of the analog quantity cache pre-write mechanism in an embodiment of the present invention; Figure 10 This is a point cloud diagram of the actual welded steel plate in an embodiment of the present invention; Figure 11 This is a weld seam diagram modeled by the algorithm in this embodiment of the invention; Figure 12 This is a diagram showing the result of weld bead planning in an embodiment of the present invention; Figure 13 This is an XOY projection diagram of the weld bead in an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] This invention provides an automated welding method and system for welding robots based on 3D point clouds. The hardware components include a six-axis collaborative robotic arm, a 3D LiDAR mounted at the end of the robotic arm, a welding power supply controlled by a hybrid digital and analog signal generator, and an industrial computer or embedded board as the controller. The 3D LiDAR moves with the six-axis robotic arm, performing multi-dimensional scanning of the weld area to acquire 3D point cloud data. The controller communicates with the 3D sensor, the six-axis robotic arm, and the welding power supply to process and analyze the point cloud data, plan the weld path, generate the robot's motion trajectory and send control commands, and perform timing control of the welding power supply. The controller operates five modules, specifically: The system comprises a perception module responsible for point cloud acquisition and merging, a detection module for 3D weld seam inspection, a weld planning module for multi-layer and multi-pass filling planning, a motion control module for trajectory planning and execution, and a welding control module for controlling arc timing. The system integrates welding process parameters into a process package (configuration file), which workers can manually adjust according to actual working conditions such as plate thickness, material, and welding position.
[0024] The automatic welding method for welding robots based on 3D point clouds provided in this invention acquires multiple frames of 3D point clouds through multi-pose scanning and merges them into a unified base coordinate system. Then, a deterministic algorithm is used to preprocess the point clouds and detect weld seams, extracting the 3D geometric information of curved weld seams. This allows for the automatic planning of multi-layer, multi-pass weld trajectories. After speed planning, the robot is controlled to weld at a uniform speed in servo mode, while simultaneously and precisely controlling the arc initiation and termination timing of the welding power source. Specifically, the method includes the following steps: point cloud acquisition and merging, weld seam detection, weld seam planning, trajectory planning, and welding execution.
[0025] The point cloud acquisition and merging steps are as follows: The weld area is scanned to acquire multiple frames of 3D point clouds. Based on the hand-eye calibration matrix and tool center point offset, each frame of point cloud is transformed to a unified base coordinate system and merged to obtain a complete point cloud of the weld area. Since a single radar scan has a limited field of view, for long welds, a six-axis collaborative robotic arm is used to scan in multiple poses. The multiple frames of point clouds are then stitched together using coordinate transformation to obtain complete 3D weld topography data.
[0026] The specific steps of weld inspection are as follows: preprocess the complete point cloud of the weld area, perform numerical calculations using a deterministic algorithm, construct an evidence map through carrier surface estimation and determine the carrier surface where the weld is located; the deterministic algorithm uses a fixed initial vector for deterministic iteration, extracts the main path of the weld on the evidence map, constructs a moving coordinate system along the main path and extracts a two-dimensional profile sequence, identifies the geometric parameters of each profile, and reconstructs the three-dimensional geometric information of the weld; After point cloud preprocessing to remove noise and irrelevant points, the point cloud is projected onto a candidate plane and rasterized. An evidence map is generated by fusing multi-dimensional features such as depth, edge, and voids, making the weld area appear as a high-response connected region on the evidence map. Furthermore, the shortest path algorithm is used to automatically search for geodesic paths with arbitrary orientations as the main path of the weld on the evidence map, overcoming the limitation of traditional methods that are only applicable to straight welds. A moving profile is dynamically constructed along the main path of the weld for geometric recognition, and three-dimensional geometric parameters such as the bevel edge, root depth, and bevel angle of the weld are extracted.
[0027] The specific steps of weld bead planning are as follows: Based on the above-mentioned three-dimensional geometric information of the weld, taking the bottom of the weld as the reference, a multi-layer, multi-pass weld bead trajectory point sequence covering the weld cross-section is generated through rigid body translation. The weld bead is generated by rigid body translation with the weld base as the reference curve. All weld beads are generated by translation along the lateral and height directions, and a unified reference direction vector is used to ensure that each weld bead is a rigid body translation of the reference curve and has a consistent shape. This avoids weld bead jumps caused by independent planning for each section and achieves an inverted trapezoidal filling distribution with fewer bottom passes and more top passes, thus achieving adaptive filling of the bevel section.
[0028] The sequence of weld bead trajectory points is converted into the robot's motion trajectory. Speed planning is adopted, which accelerates during the arc start segment and decelerates during the arc finish segment. Trapezoidal speed planning is used to achieve acceleration during the arc start segment, uniform speed during the stable segment, and deceleration during the arc finish segment, which effectively reduces heat accumulation at the weld end and ensures the weld formation quality.
[0029] The robot is controlled to move at a constant speed in servo mode along the motion trajectory, and the welding power supply is simultaneously controlled to output welding current and voltage according to the preset arc start and arc end sequence.
[0030] The servo mode ensures uniform and continuous welding speed throughout the entire process based on real-time arc length calculation, avoiding the discontinuity of weld caused by frequent acceleration, deceleration and pauses in traditional point-by-point interpolation; the fine control of arc initiation and arc termination timing ensures the weld quality at the arc initiation and arc termination points.
[0031] In one embodiment, the specific method for preprocessing the complete point cloud of the weld area is as follows: performing region of interest filtering on the complete point cloud to filter out irrelevant points outside the spatial range; Furthermore, the deterministic algorithm includes: Deterministic eigenvalue decomposition: Principal component eigenvectors are obtained through exponentiation iteration with a fixed initial vector. Gram-Schmidt orthogonalization is used during iteration to subtract the directions of the already obtained principal components. The remaining eigenvectors are obtained through cross product, ensuring that the signs and order of the eigenvectors are uniquely determined by the input data. Specifically, the decomposition is as follows: Given a 3×3 symmetric matrix C, the first eigenvector V1 is obtained through exponentiation iteration with a fixed initial vector [1, 0, 0]T. The second eigenvector V2 is obtained by subtracting the V1 component using a fixed standard basis vector that is not parallel to V1 as the initial vector. The third eigenvector V3 is obtained through cross product V3 = V1 × V2. Deterministic one-dimensional two-means clustering: After sorting the one-dimensional array, calculate the prefix sum and prefix sum of squares. Then, iterate through all split points and calculate the sum of squares within each group. The split point with the smallest sum of squares within each group is taken as the optimal splitting threshold, ensuring that the clustering result is uniquely determined by the input data. Specifically, it iterates through split points k∈[1,n-1], and the formula for calculating the sum of squares within each group is: WCSS0=prefix_sq [k]-prefix_sum [k] 2 / k; WCSS1=(prefix_sq [n]-prefix_sq [k])-(prefix_sum [n]-prefix_sum [k]) 2 / (nk); The optimal split point is the one where WCSS = WCSS0 + WCSS1 is minimized.
[0032] Deterministic downsampling: Integer indices are uniformly selected as sampling points within the point cloud index range, so that the sampled subset is uniquely determined by the input data.
[0033] In one embodiment, the specific method for estimating the carrier surface is as follows: Multiple candidate carrier surface coordinate systems are generated, including XY mode, vertical Z mode, XOZ mode, and principal component analysis mode; the point cloud is projected onto each candidate surface and rasterized. Specifically, the rasterized grid size is 1.0 mm by default, with an outer margin of 2.0 mm. The number of grid cells is automatically calculated based on the XY range of the point cloud. For each grid cell, the number of points, top height (20th percentile), depth height (90th percentile), median, and median absolute deviation are calculated. The evidence score is a weighted composite based on the depth score, edge score, and hole score within the grid cell. The evidence map is binarized and connected component analysis is performed. Candidate carrier surfaces are scored based on the number of grid cells in the connected component, path length, and mean evidence score. The carrier surface with the highest score is selected as the optimal carrier surface. The rasterized grid size is adjustable, and the outer margin ensures edge integrity. For each grid cell, the number of points, top height (lower percentile), depth height (higher percentile), median, and median absolute deviation are calculated. By using a multi-candidate surface strategy to adapt to welds with different orientations (such as flat welds, vertical welds, horizontal welds, etc.), the evidence score that integrates multi-dimensional features is more robust than that of a single feature, making the weld region appear as a highly responsive connected region on the evidence map.
[0034] The formula for synthesizing the evidence score is as follows: evidence=0.55×depth_score+0.25×edge_score+0.20×void_score The `depth_score` represents the depth score, indicating the difference between the depth height and the local background (25th percentile filtering, window 15), normalized to 0 to 1 using the 5% to 95th percentile. Cells with weld depths exceeding 30 mm are set to zero to prevent false detections. The `edge_score` is the gradient magnitude of the depth score plus 0.35 times the occupancy gradient magnitude, normalized to 0 to 1. The `void_score` is the void created by the closing operation (5×5 structuring element) multiplied by (0.35 + 0.65 × maximum neighborhood depth), normalized to 0 to 1. Weight allocation is based on the following criteria: depth features are assigned 0.55 to represent the most direct evidence of welds; edge features are assigned 0.25 to supplement weld boundaries; and void features are assigned 0.20 to fill occluded areas.
[0035] The connected component analysis employs an 8-connectivity definition (including diagonal adjacency). An adaptive binarization threshold is used, taking the larger value between a set threshold and the quantile of the evidence score. Connected components are then labeled after morphological closing and opening operations. Connected component scoring comprehensively considers the mean evidence score, path length score, and fill rate. The path length score is used to prune and map the length, while the fill rate reflects the completeness of the connected component. Screening criteria include minimum raster count and minimum path length.
[0036] Specifically, the connected component scoring criteria are as follows: score=mean(evidence)×length_score×(0.65+0.35×fill) Where mean(evidence) is the arithmetic mean of evidence, length_score is the path length score(clip(length / 100, 0.2, 2.2)), and fill is the fill rate. Selection criteria: at least 12 raster cells, path length at least 25 mm, and the carrier surface with the highest score is selected.
[0037] In one embodiment, the above-mentioned method for extracting the main weld path is as follows: on the evidence map of the optimal carrier surface, with grid cells as nodes and the composite function of the geometric distance between adjacent grid cells and the evidence score as edge weights, the shortest path algorithm is used to obtain the geodesic path between the two farthest endpoints in the connected domain, and after smoothing and resampling, it is used as the main weld path.
[0038] The edge weights are calculated as follows: cost=step×(1.5-0.5×evidence) Where step is the geometric distance between adjacent grid cells (1.0 or ...). The evidence score ranges from 0 to 1. Cells with high evidence scores have low costs, but geometric distance still dominates, ensuring the path follows the weld direction rather than traversing non-weld areas. The geodesic path between the two farthest endpoints within the connected domain is obtained using a shortest path algorithm. The specific steps for determining these two farthest endpoints are as follows: Starting from the point with the highest evidence score, perform the first shortest path search to obtain the farthest point A. Then, starting from point A, perform the second shortest path search to obtain the farthest point B and record the predecessor. Backtrack the predecessor to obtain the path from A to B. After the path is smoothed by B-spline (smoothing coefficient 1.5) to eliminate the step effect, it is resampled at a fixed step size of 5.0 mm to form a path point sequence with uniform spacing.
[0039] The graph diameter endpoints of the connected component can be efficiently found through a two-step shortest path search strategy, and B-spline smoothing ensures a continuous and smooth path. Weld main path extraction also includes bimodal detection and path height calibration: a point height histogram is constructed near the path, the Y-row range of the connected component is summed along the X-direction to obtain the point distribution in the Y-direction, and after Gaussian smoothing (sigma=2.0), local maxima are detected. The first two peaks are selected in descending order and mapped back to the Z-coordinate as the path height. The midpoint of the bimodal path is calculated as follows: mid = (peak 1 index + peak 2 index) / 2 Among them, peak 1 is the top Z of the lower steel plate, peak 2 is the top Z of the upper steel plate, and the midpoint is the center of the weld opening.
[0040] In one embodiment, the specific method for constructing a moving local coordinate system along the main path, extracting a two-dimensional profile sequence, and reconstructing the three-dimensional geometric information of the weld is as follows: At each path sampling point, a local coordinate system is constructed with the path direction as the first direction and the weld transverse direction as the second direction. A two-dimensional profile point cloud is extracted and rasterized within the local coordinate system. The profile width, half-width, histogram bucket number, smoothing window, and polynomial order are all adjustable. The local coordinate system is dynamically constructed along the curved path, ensuring that the profile is always perpendicular to the weld direction, thereby accurately extracting the weld cross-sectional shape.
[0041] Among them, the profile recognition supports the automatic recognition and switching of two weld geometry modes: V-groove mode and stacked Z mode. The system can specify the parameters or automatically determine the profile geometry features (including the relative position of the steel plate, the opening direction, and the groove shape) through the auto mode.
[0042] The V-shaped bevel pattern is suitable for bevels with the opening facing upwards on flat surfaces, such as... Figure 1 As shown, the left and right edges are identified as the weld top position and the root as the weld bottom position. The bevel angle is equal to 180 degrees minus the angle between the left and right sidewalls and the vertical direction. The depth direction is along the global height and the width direction is along the transverse direction of the weld.
[0043] The stacked Z-pattern is suitable for welds with openings in the height direction between two steel plates, such as... Figure 2 As shown, the positions of the upper sidewall, lower sidewall, and weld root are identified. The sidewalls of the upper and lower steel plates are estimated independently to avoid misalignment interference. The midpoint of the double peak is used as the path height calibration value, with the depth direction along the transverse direction of the weld and the width direction along the global height. Sequence-level post-processing is performed on the geometric parameters of all sections. Edge jump points and outliers are removed by using the distance between adjacent sections and the absolute deviation of the median. Outliers are removed for parameters such as width and depth. The section direction is uniformly flipped using the median of all section directions. The root representative points of each section are sorted according to the path position to form the weld centerline. After smoothing, the three-dimensional geometric parameters of the weld are output.
[0044] In one embodiment, the specific method for rigid body translation in the above weld planning step is as follows: A global mesh is constructed based on the weld geometry parameters of each cross-section; a set of layers and passes for all cross-sections is collected; local coordinates are calculated for each layer and pass of each cross-section; and the local coordinates are uniformly converted to world coordinates using a least-squares fitting transformation matrix. The design matrix consists of local first-direction and second-direction coordinates and constant terms. The coefficient matrix is solved to minimize the sum of squared residuals between the transformed world coordinates and the original coordinates. Height coordinates are directly transmitted, with the constraint that at least a finite number of valid points are required.
[0045] In practice, the design matrix is D = [U, V, 1] (N×3); the solution is D×C = XY, where C is a 3×2 coefficient matrix. The least squares solution is C = (DTD). -1 ×D T ×XY (returns None when singular), when applied [X, Y]=[U, V, 1]×C, the Z coordinate is directly passed through, and the constraint is that at least 3 finite valid points are required.
[0046] The global mesh method uses unified numbering across sections, avoiding weld bead jumps caused by independent planning for each section. Multi-layer, multi-pass filling planning is as follows: Figure 3 As shown, the bevel cross-section is an inverted trapezoid, with fewer passes at the bottom and an increasing number of passes at each subsequent layer, all of equal width within the same layer. Each pass is positioned by a set distance laterally, based on the weld bottom curve, and the pass number is multiplied by the pass spacing along the height. All cross-sections use a uniform reference direction vector, ensuring that the rigid body translation of each weld pass based on the reference curve results in a completely consistent shape. A schematic diagram of generating weld passes by rigid body translation based on the weld root is shown below. Figure 4 As shown. The interlayer spacing and pass spacing are determined by process parameters. The number of layers is the weld depth divided by the interlayer spacing (at least one layer). The number of passes per layer is the layer width divided by the pass spacing plus 1, arranged with a fixed pass spacing starting from the left boundary of the layer. Passes within the same layer are of equal width, with fewer passes in the bottom layer than in the top layer, and the bevel cross-section is an inverted trapezoidal distribution. Weld post-processing includes filtering the longest continuous effective segment, maximum length truncation, outlier removal, and Gaussian smoothing. The arc start and end slope lengths are adjustable (0 indicates no slope), and the column effectiveness ratio is adjustable. Both layer-priority and pass-priority welding sequences are supported.
[0047] In one embodiment, the arc-starting sequence includes stages of pre-gas supply, arc ignition, hot arc ignition, and gradual transition to normal current. The arc-ending sequence includes stages of progressively decreasing current, arc extinguishing, reheating, and post-gas supply. The technical concept is as follows: during arc ignition, pre-gas supply removes air, establishing the arc with a lower arc-starting current; then, a hot arc-starting current enhances the melt depth; finally, a gradual transition to normal current achieves a smooth transition. During arc ignition, progressively decreasing current creates a crater-filling effect, reheating prevents wire sticking, and post-gas supply protects the molten pool from cooling, achieving precise control over the quality of arc ignition and arc ignition. The arc-starting sequence is divided into a simple mode and a ramp mode.
[0048] The complete timing sequence for the ramp mode is as follows: pre-gas supply, writing the arc-starting current (a set proportion of the target current), arc-starting signal pull-up, waiting for arc confirmation, hot arc ignition (the set proportion of the target current lasts for a set time), and gradual transition to normal current (linear interpolation within a set time). The arc-starting ramp timing sequence is as follows: Figure 7 As shown. Timing parameter adjustability: All arc initiation / outitiation timing parameters can be adjusted via the process package and are not fixed values. Outitiation timing is divided into simple mode and fill-in mode.
[0049] The crater-filling mode reduces the current in a stepped sequence: the first level is a set ratio for a set duration, the second level is a set ratio for a set duration, and the third level is a set ratio for a set duration. Then, the arc extinguishing signal is pulled low, the anti-stick wire is reheated (set time), followed by gas supply to protect the molten pool for cooling (set time), the analog quantity is returned to zero, and the arc-ending and crater-filling stepped decay sequence is as follows. Figure 8 As shown. In the welding execution steps, analog outputs are used to control the current and voltage of the welding power supply. The welding power supply communicates with the robotic arm controller through the input / output module of the robot control cabinet. The robot controls the welding machine's arc ignition, gas supply, and wire feeding through digital outputs, sets the current and voltage (voltage range mapped to current and voltage ranges) through analog outputs, reads arc establishment confirmation and fault alarms through digital inputs, and reads actual current and voltage feedback through analog inputs. Analog buffer control is set up: a buffer variable records the last written current and voltage values; the actual write operation is only performed when the deviation between the target value and the buffer value exceeds a set threshold. Analog values are pre-written during the robot's approach motion phase, utilizing the motion time to absorb communication delays. When the actual arc ignition is executed, the analog values are ready and the buffer matches, avoiding repeated writing. Analog writing has a significant communication delay. If the arc ignition and termination ramps are repeatedly written at each step, the accumulated delay will severely affect the accuracy of the arc ignition and termination timing. The threshold selection criteria are that the corresponding current and voltage changes are much smaller than the welding process tolerance, match the hardware resolution, and avoid writing delay blocking the servo cycle. The cache invalidation condition is a change in current or voltage exceeding a threshold or the first call. During normal welding, when parameters remain unchanged, write operations are skipped, resulting in a cache hit rate greater than 95%. The analog quantity cache pre-write mechanism is as follows: Figure 9 As shown.
[0050] Furthermore, the fixed hardware delay for the arc initiation and arc termination timing is the hardware stabilization time for the analog signal to arrive at the welding machine before the digital output arc is initiated. This is a non-process parameter and cannot be adjusted. The timing parameters can be adjusted according to the plate thickness: when the plate thickness increases, the hot arc initiation time and the arc termination filling time should be appropriately increased; when welding thin plates, the proportion of hot arc initiation current should be reduced to prevent burn-through.
[0051] In one embodiment, the incremental coordinate transformation method is used to transform the point cloud of each frame to a unified base coordinate system. The point cloud coordinates output by the radar do not change with the movement of the robotic arm (always based on the radar's own coordinate system), so conventional coordinate transformation methods cannot be used directly. For any point on the weld: the point cloud coordinates in the radar coordinate system are transformed to the flange coordinate system through the hand-eye calibration matrix; the offset vector from the welding torch tip to the weld point is obtained by subtracting the tool center point offset; the offset vector is transformed from the flange direction to the base coordinate direction through the flange rotation matrix; the target flange position is obtained by adding the transformed offset vector to the current flange position. This method directly outputs the base coordinate position of the flange when the welding torch tip reaches the weld point, as the robot's motion target. The hand-eye calibration method adopts the Park-Martin method, the calibration board is a checkerboard, multiple poses are sampled, and the calibration type is "eye on hand" (radar is installed at the end of the robotic arm). The calibration steps are as follows: The checkerboard calibration plate is fixed to the worktable; the robotic arm moves to multiple different poses (covering rotation and translation diversity); radar images are acquired for each pose, checkerboard corner points are extracted, and the calibration plate pose under the radar system is calculated; the end-effector pose (flange system) of each robotic arm is recorded; the equation AX=XB is solved (A is the flange system transformation matrix between adjacent poses, B is the radar system calibration plate transformation matrix between adjacent poses, and X is the hand-eye calibration matrix to be determined); a 4×4 homogeneous transformation matrix is output. The tool center point offset calibration uses a multi-point touch method (the four-point method is extended to multi-point): the tool tip touches the same fixed tip (calibration pin) under multiple poses. The mathematical model is that the rotation matrix multiplied by the tool center point offset plus the translation vector equals the coordinates of the fixed point. The tool center point offset is solved using least squares. For pose diversity, the minimum rotation angle between adjacent poses must not be less than a set angle, and the three-axis coverage is checked.
[0052] Furthermore, this invention also provides an automated welding system for a welding robot based on 3D point clouds, comprising: a 3D sensor (installed at the end of a six-axis collaborative robotic arm for collecting 3D point cloud data of the weld area), a six-axis collaborative robotic arm (for driving the 3D sensor to move and performing welding operations), a welding power source (for providing welding current and voltage), and a controller. The controller is communicatively connected to the 3D sensor, the six-axis collaborative robotic arm, and the welding power source. The controller includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above. The controller, as the core, coordinates five functional modules: perception, detection, planning, motion control, and welding control, integrating welding process parameters into a process package to achieve fully automated closed-loop control from point cloud acquisition to welding completion. The complete welding execution steps are as follows: Connection and initialization: Load the hand-eye calibration matrix and tool center point offset, connect the robot to power-on enable (flange mode), connect the lidar, use multi-pose scanning to merge the point cloud to the base coordinate system, connect the welding machine and load the welding parameters; Detection and Planning: Load point cloud, filter and remove invalid points, output candidate welds for 3D weld detection, plan weld bead for each candidate weld, transform coordinates to base coordinate system, and allow the user to select candidate welds to be welded; Welding execution: The weld beads are rearranged according to the welding sequence, a top view of the weld beads is generated, and the user confirms the operation. For each weld bead, the following steps are executed in sequence: approaching the starting point, pre-writing the current and voltage, starting the arc, servo welding with oscillation, ending the arc, empty return stroke, and determining whether the operation is completed. After all steps are completed, the weld bead is retreated to a safe position.
[0053] The method of the present invention will be described in detail below with reference to specific embodiments: in Figure 1 This is a schematic diagram of the V-groove profile geometry identification, illustrating how the left and right edges (weld top position), root (weld bottom), and groove angle are identified in the V-groove mode. The groove angle is equal to 180 degrees minus the left and right sidewall angles. The depth direction is along the global height, and the width direction is along the transverse direction of the weld. The V-groove mode is suitable for grooves with the opening facing upwards on flat plates.
[0054] Figure 2 This is a schematic diagram of the geometric identification of the cross-section of the Z-weld in the stack, which is the bevel form used in the following embodiments. In this mode, the system identifies the positions of the upper sidewall, lower sidewall, and weld root. The upper and lower steel plate sidewalls are detected independently to avoid misalignment interference. The depth direction is along the transverse direction of the weld, and the width direction is along the global height. Figure 2 The labels indicate the positions of the upper steel plate sidewall, the lower steel plate sidewall, the weld base, and the relative stacking relationship between the upper and lower steel plates.
[0055] The following details the complete process from point cloud acquisition to welding completion: 1. Point cloud acquisition and merging: The robotic arm moves to four preset poses, with a minimum rotation angle of no less than 30 degrees between adjacent poses. The four poses are roughly evenly distributed along the length of the weld to cover the entire weld area, ensuring three-axis coverage—that is, ensuring that the 16 sets of calibration poses cover the full range of motion of the three rotation axes in the joint space of the robotic arm, avoiding ill-conditioned calibration matrix. Radar scanning is triggered to acquire three-dimensional point clouds under each pose.
[0056] Hand-eye calibration was performed using the Park-Martin method. The calibration board was a 7×9 checkerboard with 20mm squares. Sixteen poses were sampled. The calibration type was eye-on-hand (radar mounted on the end of the robotic arm). The calibration accuracy was a reprojection error of 4.46mm. The calibration steps were as follows: Fix the chessboard grid calibration plate to the workbench; The robotic arm moves to 16 different poses (covering rotational and translational diversity). (3) Collect radar images for each pose, extract the corner points of the chessboard grid, and calculate the pose of the radar system calibration plate; (4) Record the pose of the end effector of each robotic arm (flange system). Solve the equation AX=XB: A is the flange system transformation matrix between adjacent poses, B is the radar system calibration plate transformation matrix between adjacent poses, and X is the T_flange_sensor to be solved; Output a 4×4 homogeneous transformation matrix T_flange_sensor.
[0057] The tool center point offset calibration uses a multi-point touch method (extended from four points to 12 points): the robotic arm moves to 12 different postures, and in each posture, the tool tip touches the same fixed tip (calibration pin) from different directions. The flange pose R_i and t_i are recorded for each posture, where R_i is a 3×3 rotation matrix and t_i is a 3×1 position vector. The position of the fixed tip in the world coordinate system is P_fixed, and the position of the tool tip relative to the flange center is p_tcp. The mathematical model is as follows: R_i·p_tcp+t_i=P_fixed The calibration result, obtained by solving p_tcp using least squares, is the position coordinate of the TCP point in the flange system: tcp_offset=[54.95, -36.54, 470.67, 74.11, -0.30, -174.45] (the first three elements are in millimeters, and the last three elements are in RPY angles, i.e., using RPY Euler angles around the X-axis Rx=74.11 degrees, around the Y-axis Ry=-0.30 degrees, and around the Z-axis Rz=-174.45 degrees, with internal rotation xyz convention). The calibration accuracy is verified by simulation with an error of less than 0.5 mm.
[0058] The four sets of point clouds were merged into the base coordinate system using the incremental coordinate transformation method. The specific transformation process is as follows: Step 1 (Radar system → Flange system): Use the hand-eye calibration matrix. Flange system coordinates = hand-eye matrix x radar system coordinates. The formula is: P_flange=T_flange_sensor×P_lidar The second step (reducing TCP offset) yields the offset vector from the welding torch tip to the weld point. The offset vector = flange coordinates - tool center offset, calculated using the formula: Δ_flange = P_flange - tcp_offset The third step (redirecting to the base coordinate direction) involves redirecting the offset from the flange direction to the base coordinate direction. The base coordinate direction offset = flange rotation matrix x offset vector, as shown in the formula: Δ_base=R_base_flange×Δ_flange Step 4 (Target Flange Position): Add offset to the current flange position. Target flange position = current flange position + offset in base coordinate direction. The formula is: target_flange=flange_pos+Δ_base Where: T_flange_sensor is a 4×4 homogeneous matrix, R_base_flange is a 3×3 rotation matrix, and flage_pos is a 3×1 position vector. It directly outputs the base coordinate position of the flange when the welding torch tip reaches the weld point. The four frame point clouds are transformed as described above and then merged into a complete weld point cloud.
[0059] 2. Point cloud preprocessing The original point cloud was preprocessed as follows: ① Region of Interest Filtering: Set the Z-axis range to 500 to 600 mm to filter out irrelevant points outside this range; ② Steel plate plane filtering: The densest region is found in the Z-direction histogram (100 bins). A plane is identified when the peak density is greater than 1.5 times the median density. Candidate points are selected within a bandwidth of ±4 mm of the peak Z-value. Deterministic principal component analysis is used to fit the plane normal, and points less than 2 mm from the plane are removed. In this embodiment, the removed points did not exceed 60% of the total, and filtering was performed normally. ③ Voxel downsampling: The voxel size is 1.0 mm, and equal-interval index sampling is used. Specifically, integer indices are uniformly taken in the point cloud index interval [0, N-1] using linspace, and the average value of all points in each voxel is taken as a representative point; ④ Statistical outlier filtering: Remove outliers based on nearest neighbor distance, with K=20 nearest neighbors and σ=2.0 standard deviation. Points exceeding the mean ±2σ are removed. The above preprocessing removes noise and redundant points from the original point cloud.
[0060] 3. Deterministic Algorithms: In this embodiment, all algorithms involving randomness or platform dependence are implemented using deterministic algorithms, specifically including deterministic eigenvalue decomposition, deterministic one-dimensional clustering, and deterministic downsampling. (1) Deterministic eigenvalue decomposition In steel plate plane fitting and principal component analysis, deterministic eigenvalue decomposition is achieved using power iteration plus shrinkage method: Let C be a 3×3 symmetric matrix (the covariance matrix constructed from the point cloud to be fitted): First eigenvector (power iteration): Initial vector: V0 = [1, 0, 0] T(Fixed starting vector to avoid cross-platform inconsistencies caused by randomness).
[0061] Iteration formula: V_{k+1}=C·V_k / ||C·V_k|| Convergence criterion: Fixed at 40 iterations, or norm ||C·V_k|| less than 10. -15 It may be terminated early.
[0062] Eigenvalue: λ1=V1 T ·C·V1 (Rayleigh quotient).
[0063] Second eigenvector (power iteration plus orthogonal contraction): Initial vector: U0 = [1, 0, 0] or [0, 1, 0] (choose [1, 0, 0] when abs(V1[0]) is less than 0.9, otherwise choose [0, 1, 0] to ensure that it is not parallel to V1).
[0064] Gram-Schmidt orthogonalization: U0←U0-V1·(U0T·V1), normalization.
[0065] In each iteration, the principal components are re-orthogonally subtracted: U_{k+1} = C·U_k - V1·(U_k) T ·V1), unitized.
[0066] Eigenvalue: λ² = U² T ·C·U2.
[0067] Third eigenvector (cross product): V3 = V1 × V2 (cross product), normalized.
[0068] Mathematical basis: The eigenvectors of a symmetric matrix are mutually orthogonal, and the normal vector of the plane spanned by V1 and V2 is the direction of the third eigenvector. The cross product operation guarantees determinism and does not require a third iteration.
[0069] Eigenvalue: λ3=V3 T ·C·V3.
[0070] Eigenvalue sorting: Argsort is used to sort in descending order (Timsort, time complexity O(nlogn)). The eigenvalues and eigenvectors are rearranged to ensure that λ1≥λ2≥λ3.
[0071] Where λ1, λ2, and λ3 are the three real eigenvalues of the symmetric matrix C, V1, V2, and V3 are the corresponding unit eigenvectors, forming a right-handed orthogonal basis, k is the iterative subscript, which is a natural number; Rayleigh quotient represents the quadratic form of the unit vector V with respect to matrix C, which is the eigenvalue after convergence; Boundary condition handling: norm less than 10 -15The iteration is terminated early when the matrix is close to singular; when the initial vector is collinear with V1, it is automatically switched to another standard basis vector; for a 2×2 matrix, this embodiment of the invention uses an analytical formula to solve it, with the discriminant disc = max(0, trace 2 -4×det) to avoid complex numbers due to numerical errors, where trace is the trace of the matrix and det is the determinant of the matrix; The algorithm described above uses only matrix multiplication and vector normalization and does not rely on any external linear algebra library.
[0072] (2) Deterministic one-dimensional clustering In the segmentation of upper and lower steel plates, this invention adopts deterministic one-dimensional two-means clustering, which has an exact solution and does not require random initialization.
[0073] Sort the one-dimensional height array into z[0] to z[n-1] (n≥8), where n represents the number of elements in the array; Calculate the prefix sum: prefix_sum[i+1] = prefix_sum[i] + z[i], where i is the index of the loop, traversing from 0 to n-1; and, The sum of prefix squares is prefix_sq[i+1] = prefix_sq[i] + z[i]. 2 .
[0074] Traversing the split points k∈[1, n-1], the sum of squares within each group is: WCSS0=prefix_sq [k]-prefix_sum [k] 2 / k; WCSS1=(prefix_sq [n]-prefix_sq [k])-(prefix_sum [n]-prefix_sum [k]) 2 / (nk); The optimal segmentation point is the one with the smallest total WCSS = WCSS0 + WCSS1, and the threshold is (z[k-1] + z[k]) / 2.
[0075] Boundary condition handling: If n is less than 8, return None (insufficient samples); if all values are the same, WCSS=0 and k is any number, where k is the iteration index and is a natural number; if there is only one split point, calculate directly; if only one class remains after deduplication of labels, return None.
[0076] The total time complexity is O(nlogn), eliminating the need for sklearn's KMeans iteration.
[0077] (3) Deterministic downsampling When downsampling large point clouds, evenly spaced indices are used instead of random sampling to ensure that the same subset of points is obtained each time. Specifically, M integer indices are uniformly selected using linspace in the index range [0, N-1], resulting in consistent results across all platforms and NumPy versions.
[0078] 4. Carrier surface estimation and evidence map construction Multiple candidate carrier surface coordinate systems are generated (including XY mode, vertical Z mode, XOZ mode, and PCA mode). The PCA mode projects the point cloud onto the plane spanned by the directions of the first two principal components obtained from principal component analysis. After each candidate surface is generated, the point cloud is projected onto the 2D plane of that surface and rasterized. The rasterized mesh size is 1.0 mm with an outer margin of 2.0 mm, and the number of raster cells is automatically calculated based on the XY range of the point cloud.
[0079] Each grid cell has the following statistical features: number of points (point cloud count within the grid cell), top height (20th percentile of Z-value within the grid cell), depth height (90th percentile of Z-value within the grid cell), median (median of Z-value within the grid cell), and median absolute deviation (median absolute deviation of Z-value within the grid cell).
[0080] The formula for synthesizing three-dimensional evidence scores is: evidence=0.55×depth_score+0.25×edge_score+0.20×void_score in: Depth score: The difference between depth height and local background (25th percentile filter, window 15), normalized to 0 to 1 by 5% to 95th percentile. Cells with weld depths exceeding 30 mm are set to zero to prevent false detections. Edge score: The gradient magnitude of the depth score plus 0.35 times the occupancy gradient magnitude, normalized to 0 to 1; void score: The voids created by the closing operation (5×5 struct) are multiplied by (0.35 + 0.65 × maximum neighborhood depth) and normalized to 0 to 1; Weighting is based on the following criteria: Depth score (0.55) is the most direct evidence of the weld; Edge score (0.25) supplements the weld boundary; Void score (0.20) fills the obscured area.
[0081] Connectivity analysis uses an 8-connectivity definition (including diagonal adjacency). The binarization process is as follows: evidence score greater than or equal to the threshold → closing operation (3×3) smoothing → opening operation (2×2) noise reduction → connected component labeling. The threshold is adaptive, taking the larger value between 0.10 and the 40th percentile of the evidence score.
[0082] The scoring criteria for connected components are as follows: score=mean(evidence)×length_score×(0.65+0.35×fill) Where length_score is the path length score (clip(length / 100, 0.2, 2.2)); fill is the fill rate, fill=min(1, number of connected raster cells / (total number of raster cells in the evidence graph × 0.02)), which is an indicator that measures the proportion of connected entities in the entire evidence graph.
[0083] Selection criteria: At least 12 grid cells and a path length of at least 25 mm. The carrier surface with the highest score is selected as the optimal carrier surface. For the stacked Z-workpiece in this embodiment, the vertical Z-mode has the highest score.
[0084] 5. Weld path extraction: On the selected evidence map, the Dijkstra shortest path algorithm is used to find the geodesic path between the two farthest points in the connected domain as the main path of the weld.
[0085] Node definition: Each grid cell within a connected domain; Edge definition: 8 adjacent edges (including diagonals), a total of 8 edges.
[0086] The edge weights are calculated as follows: cost=step×(1.5-0.5×evidence) Where step is the geometric distance (1.0 or ... ), evidence ranges from 0 to 1; units with high evidence scores have low cost but geometric distance still dominates, ensuring the path follows the weld direction.
[0087] Two methods for determining the farthest point (approximate algorithm based on graph diameter): The starting point is the point with the largest evidence score; the first Dijkstra's algorithm finds the farthest point A from the starting point; the second Dijkstra's algorithm finds the farthest point B from A and records its predecessor; the path from A to B is obtained by backtracking the predecessor.
[0088] The path is smoothed by B-spline (smoothing coefficient 1.5) and then resampled at a fixed step size of 5.0 mm.
[0089] Bimodal detection calibration path height: Construct a point height histogram near the path, take the Y-row range of the connected components, and sum along the X-direction to obtain the point distribution in the Y-direction. Here, X and Y directions are two axes in the raster coordinate system—in the vertical Z-mode, X and Y correspond to two orthogonal directions on the horizontal plane. After Gaussian smoothing (sigma=2.0), detect local maxima, and take the first two peaks in descending order of peak value. The midpoint of the bimodal detection is calculated as follows: mid = (peak 1 index + peak 2 index) / 2 Among them, the Z coordinate is mapped back as the path height, peak 1 is the top Z of the lower steel plate, peak 2 is the top Z of the upper steel plate, and the midpoint is the center of the weld opening.
[0090] 6. Profile geometry recognition and 3D reconstruction A local coordinate system was constructed at each sampling point along the weld path, and a two-dimensional profile was extracted. The profile width was 3.0 mm, the half-width in the U direction was 45.0 mm, the histogram had 120 bins, and Savitzky-Golay filtering was used for smoothing (smoothing window 11, polynomial order 2).
[0091] This embodiment automatically identifies it as a stacked Z-mode (e.g.) Figure 2 As shown in the diagram, the upper sidewall, lower sidewall, and weld root positions are identified. The upper and lower steel plate sidewalls are detected independently to avoid misalignment interference. The specific identification method is as follows: In the two-dimensional cross-sectional point cloud, the point cloud density distribution is scanned along the depth direction (i.e., from the steel plate surface inwards). The boundary positions where the point cloud density changes abruptly are identified as the sidewall positions. The upper sidewall is the first boundary of the density change when scanning from the upper steel plate surface into the weld, and the lower sidewall is the first boundary of the density change when scanning from the lower steel plate surface into the weld. The depth direction is along the transverse direction of the weld, and the width direction is along the global height. The weld root position is the turning point where the point cloud density becomes sparse again when scanning further along the depth direction from the lower sidewall.
[0092] The detection results of all profiles undergo sequence-level post-processing: edge jump points are removed using neighbor distance and median absolute deviation, and outliers are removed for parameters such as width and depth. Left and right edge points are extracted for each profile, and the direction vector from the left edge to the right edge is calculated as the "profile direction" for that profile. The median of all profile direction vectors is taken as a unified direction reference. Profiles with a direction vector angle greater than 90° from this reference are flipped to unify the direction of all profiles. Finally, the representative points at the root of each profile are sorted according to their path positions to form the weld centerline, and the weld geometry parameters are output after Gaussian smoothing.
[0093] 7. Multi-layer, multi-pass weld planning like Figure 3 This is a schematic diagram of weld bead filling planning, illustrating a weld bead filling strategy characterized by an inverted trapezoidal distribution of the bevel cross-section, fewer passes in the bottom layer, increasing pass count in each subsequent layer, and equal width distribution within the same layer. This embodiment follows the steps according to this strategy.
[0094] Step 1: Global Mesh Construction. To avoid weld bead jumps caused by independent planning for each profile, this invention adopts a global mesh method with unified numbering across profiles. The sets of layers and beads for all profiles are collected, and world coordinates are calculated for each layer and bead in each profile. Local coordinates are then converted to world coordinates using a least-squares fitted transformation matrix. The design matrix D = [U, V, 1] (N × 3) is used, and the solution D × C = XY is obtained, where C is a 3 × 2 coefficient matrix. The least-squares solution is C = (D... T D) -1 ×D T ×XY (solved using least squares, returns None if singular). In application, [X, Y] = [U, V, 1] × C, with the Z coordinate directly passed through. Constraints: At least 3 finite valid points are required. As shown in Figure 5, the bevel cross-section is an inverted trapezoid, with fewer channels at the bottom layer and an increasing number of channels at each subsequent layer, distributed with equal width within the same layer.
[0095] Basis for setting floor spacing and aisle spacing: Interlayer spacing: specified by the process package, default 4.8 mm.
[0096] Lane spacing: calculated by lane width × (1 - overlap rate), default is 6.5 × 0.85 = 5.525 mm.
[0097] Number of layers: Weld depth / interlayer spacing, at least 1 layer.
[0098] Number of lanes per floor: (floor width / lane spacing) + 1, arranged with a fixed lane spacing starting from the left boundary of the floor.
[0099] The second step involves rigid body translation based on the weld root. This invention uses a rigid body translation method with the weld root as the reference curve to generate the weld bead, such as... Figure 4 As shown. All weld beads are generated by translating a certain distance laterally and then translating the bead number by multiplying the bead spacing along the height direction. All profiles use a uniform reference direction vector to ensure that the weld beads are rigid body translations of the reference curve and have completely consistent shapes.
[0100] Step 3: Post-weld processing. The generated weld beads are filtered for the longest continuous effective segment, truncated for the maximum length, outlier removal is performed, and Gaussian smoothing is applied.
[0101] Post-processing parameter value range: The starting and ending slope length: 0 to 30 mm, where 0 means no slope.
[0102] Gaussian smoothing coefficient: 0 to 10, 0 indicates no smoothing.
[0103] Outlier removal MAD multiple: 2.0 to 5.0.
[0104] Column validity ratio: 0.2 to 0.5.
[0105] Step 4, Welding sequence: Two welding sequences are supported: same layer priority (weld all passes of one layer before welding the next layer) and same pass priority (weld the same pass from bottom to top before welding the next pass).
[0106] 8. Trajectory Planning The process of converting the spatial point sequence of weld beads into a robot-executable trajectory point sequence involves seven steps: format conversion (converting the weld bead point sequence from a custom data structure to the pose data structure required by the JAKA robot SDK), coordinate transformation (local UV to world XY coordinates), outlier removal, smoothing filtering (Savitzky-Golay filtering, window 5, 3rd order), equidistant resampling (1.0 mm spacing), trajectory point generation (inverse solving of Cartesian space points into joint space points), and velocity planning.
[0107] like Figure 5 The diagram shows trapezoidal speed planning and end-speed variation: acceleration in the initial arc segment, constant speed in the steady segment, and deceleration in the final arc segment. Specific parameters: Uniform speed segment: equal to welding speed, default 4 mm / s.
[0108] Acceleration: a=v 2 / (2s), where s is the length of the acceleration segment, with an upper limit of 500 mm / s².
[0109] Arc initiation acceleration section length: 5% of weld length or 10 mm, with preference given to the proportion.
[0110] The length of the arc-closing deceleration section is 8% of the weld length, with the ratio taking precedence over the absolute distance.
[0111] Arc ignition acceleration ratio: 1.8 (adjustable range 1.2 to 2.0), acceleration speed = welding speed × ratio.
[0112] The speed ratio at the end of the arc is 0.7 (adjustable range 0.5 to 0.8), and the speed decreases linearly to the welding speed × ratio during the deceleration phase.
[0113] The formula for the deceleration section speed is: v = base_speed × (end_ratio + (1 - end_ratio) × progress), where progress = distance from the end point / length of the deceleration section.
[0114] Protection mechanism: When the arc acceleration section plus the arc deceleration section exceeds the total weld length, the length will be reduced proportionally to 90% of the total length.
[0115] Preferred range: Thin plate (≤5 mm) acceleration ratio 1.5, reduction ratio 0.6; Medium-thick plate (5 to 15 mm) acceleration ratio 1.8, reduction ratio 0.7; Thick plate (greater than 15 mm) 2.0, 0.8.
[0116] To reduce heat buildup at the weld end, variable speed control at the end is supported: the arc-starting segment accelerates at a multiplier, while the arc-ending segment linearly decelerates to the final speed ratio.
[0117] 9. Robot motion control (1) Servo welding mode During welding, servo mode must be used to ensure uniform and continuous motion. Traditional point-to-point linear interpolation will cause acceleration, deceleration, and pauses between each point, resulting in discontinuous weld seams. The core algorithm of servo mode is as follows: pre-calculate the cumulative arc length of the trajectory (accumulate the Euclidean distance between adjacent points segment by segment), the main loop calculates the target arc length based on the real-time clock (arc length increment = speed × time increment), and uses binary search to locate the segment index and linearly interpolates the position and attitude.
[0118] Key parameters: Servo control main loop cycle: 8 milliseconds (SDK fixed), approximately 15 milliseconds in practice (ARM scheduling).
[0119] Binary search positioning accuracy: floating-point accuracy (10) -16 (order of magnitude), intra-segment interpolation threshold greater than 10 -6 Calculate the proportion at that time.
[0120] Endpoint hold frame rate: 12 frames (approximately 96 milliseconds, calculated as 0.1 seconds / 8 milliseconds) to ensure precise final positioning.
[0121] Position deviation correction: When the deviation is greater than 1 mm, it is precisely corrected at a low speed (10 mm / s).
[0122] In case of abnormal exit, the servo mode must be turned off to prevent residual files.
[0123] (2) Swing control The lateral oscillation during welding widens and flattens the weld bead, improving interpass fusion. It supports two modes: triangular oscillation (Z-shaped oscillation) and sinusoidal oscillation, with the oscillation direction being lateral in the horizontal plane perpendicular to the welding forward direction.
[0124] Oscillation parameter range: Oscillation frequency: 0.5 to 3.0 Hz (default 1.5 Hz), adjustable via process package.
[0125] Swing amplitude: 0.5 to 5.0 mm (default 1.5 mm, single-sided swing amplitude, total width = 2 × amplitude).
[0126] Left and right pause: 0.0 to 0.5 seconds (0.1 seconds each by default), pauses are triggered near phases of 0.25 and 0.75.
[0127] Pitch = welding speed / frequency, 3 to 5 mm is recommended, too large will cause gaps between the Z-shaped welds.
[0128] (3) Approach movement safety strategy When the welding torch moves from its current position to the start of the weld bead, a safe height relocation strategy is adopted: Safety height = max(current Z, target Z) + 50 mm, automatically calculated based on workpiece dimensions.
[0129] Exit lifting height: 30 mm, lift after arcing to avoid collision.
[0130] The three-step movement: First, raise Z to a safe height; second, move X and Y (Z maintains a safe height); third, lower Z alone to the target height.
[0131] Safety limitations: maximum linear distance 100 mm (exceeding joint movement), maximum joint jump 90°, maximum Z-axis descent 150 mm.
[0132] Position verification: When the error is too large, it is precisely corrected at a low speed (10 mm / s).
[0133] 10. Welding arc control (1) Interface architecture The welding power source communicates with the robotic arm controller via the input / output modules of the robot control cabinet. The robot controls the welding machine's arc ignition, gas supply, and wire feeding through digital outputs, sets the current and voltage (0 to 10 volts mapped to current and voltage ranges) through analog outputs, reads arc establishment confirmation and fault alarms through digital inputs, and reads actual current and voltage feedback through analog inputs.
[0134] Analog output range: 0 to 10 volts (hardware limited to 0 to 60 volts). Current range: 35 to 300 amps (AO0 channel, calibration formula: current = 4.43 × AO voltage + 35). Voltage range: 14.2 to 30 volts (AO1 channel, calibration formula: voltage = 0.35 × AO voltage + 14.2).
[0135] (2) Arc initiation timing Arc initiation timing as follows Figure 6 As shown, it is divided into simple mode and ramp mode.
[0136] The complete timing sequence of the ramp mode is as follows: pre-gas supply (0.5 seconds) → write arc ignition current (60% of the target current) → arc ignition signal pull-up → wait for arc confirmation → hot arc ignition (120% of the target current for 0.4 seconds) → gradually change to normal current (linear interpolation within 0.3 seconds).
[0137] Timing parameter adjustability: All arc initiation / outitiation timing parameters are adjustable via the process package and are not fixed values. The current parameters are applicable to MAG welding of medium-thick plates (5 to 15 mm) of carbon steel. Adjustment basis: When the plate thickness increases, appropriately increase the hot arc initiation time and the arc crater filling time; when welding thin plates, reduce the proportion of hot arc initiation current to prevent burn-through. Hardware fixed delay: Wait 100 milliseconds before DO arc initiation (the time for the AO analog quantity to reach the welding machine's hardware stabilization time); this is a non-process parameter and cannot be adjusted.
[0138] (3) Arc closing timing Arc termination timing as follows Figure 7 As shown, it is divided into simple mode and gap-filling mode.
[0139] The filling mode reduces the current in a step sequence: the first stage is 70% for 0.4 seconds, the second stage is 50% for 0.4 seconds, and the third stage is 30% for 0.3 seconds. Then the arc extinguishing signal is pulled low, the anti-stick wire is reheated (0.05 seconds), and then gas is supplied to protect the molten pool for cooling (2.0 seconds), and the analog signal is returned to zero.
[0140] (4) Analog quantity caching mechanism Each analog signal write by the robot controller incurs approximately a 1-second delay. If the start and end ramps are repeatedly written at every step, the accumulated delay severely impacts timing accuracy. This invention employs an analog signal value buffering and change detection mechanism, such as... Figure 8 As shown.
[0141] Two cached variables are maintained to record the last written current and voltage values. Before each write, the target value is compared with the cached value, and the actual interface is called only if the change exceeds 0.1 volts. Analog signals are pre-written during the robot's approach motion phase to absorb communication delays during motion. When the arc initiation is actually executed, the analog signals are ready and the cache matches, avoiding duplicate writes.
[0142] The selection criteria for the aforementioned 0.1 volt threshold are as follows: 1. The corresponding current change is 0.443 amps and the voltage change is 0.035 volts, both of which are far less than the welding process tolerance.
[0143] 2. Matches hardware DA resolution by 1%.
[0144] 3. Avoid the SDK's approximately 1-second delay during each AO write, which blocks the 8-millisecond server cycle.
[0145] Cache invalidation criteria: AO current or voltage value changes by more than 0.1 volts; or initial call (initial cache value -1.0, the difference must be greater than 0.1 volts).
[0146] Pre-write mechanism: such as Figure 9As shown, analog signals are pre-written during the robot's approach phase (approximately 2 to 5 seconds, depending on distance and approach speed) to absorb communication delays during the movement time. When the arc initiation is actually performed, the analog signals are ready and the cache matches, avoiding duplicate writes. During the normal welding phase, when parameters remain unchanged, writes are skipped, resulting in a cache hit rate greater than 95%.
[0147] To verify the feasibility of the embodiments of the present invention, the following uses a specific workpiece as an example to describe the complete process from point cloud acquisition to welding completion: The equipment configuration used is shown in Table 1 below:
[0148] Table 1 Equipment Configuration Table
[0149] Process package configuration: The process package configuration of this embodiment is shown in Lists 2-6 below. Workers can adjust it within the range described in the above embodiments according to actual working conditions. Core welding parameters are directly adjusted by the welder based on plate thickness, material, and welding position. Table 2 Core Welding Parameters
[0150] According to the method described in the above embodiments, the multi-layer, multi-pass parameters automatically calculate the interlayer spacing and pass spacing based on the weld geometry, and support manual fine-tuning: Table 3 Multilayer Multichannel Parameter Table
[0151] The arc initiation / outitiation timing parameters correspond to the ramp mode and crater filling mode described in the above embodiments: Table 4. Arc start / end timing parameters
[0152] The oscillation parameters correspond to the triangular pendulum pattern described in the above embodiments: Table 5 Oscillation Parameters
[0153] The speed compensation parameters correspond to the trapezoidal speed planning described in the above embodiments: Table 6 Speed Compensation Parameters
[0154] In this embodiment, the welded workpiece consists of two Q235 carbon steel plates, one above the other, with a Z-shaped bevel (the upper steel plate is stacked on top of the lower steel plate, forming a Z-shaped opening). The weld depth is 11 mm, the width is 22 mm, and the length is 1050 mm.
[0155] The complete execution process of this embodiment is as follows.
[0156] Point cloud acquisition and merging: The robotic arm moves to four preset poses, each triggering radar scanning to acquire a 3D point cloud. Using the incremental coordinate transformation method described in the above embodiment, the four point clouds are merged into a base coordinate system to obtain a complete weld seam point cloud, as shown below. Figure 10 The image shown is a point cloud diagram of an actual welded steel plate, illustrating the complete weld point cloud obtained after merging through multi-pose scanning. Point cloud preprocessing: The original point cloud is subjected to region of interest filtering (500 to 600 mm on the Z-axis), steel plate plane filtering (Z histogram peak detection plus PCA plane fitting), voxel downsampling (1.0 mm), and statistical filtering (K=20, σ=2.0) to remove noise and redundant points.
[0157] Weld inspection: Carrier surface estimation (vertical Z-mode) → Evidence map construction (1 mm grid, 3D evidence score synthesis) → Dijkstra geodesic path extraction → Bimodal detection calibration path Z-height → Stacked Z-profile geometric identification (detecting upper and lower steel plate sidewalls and weld root). Weld inspection results are as follows: Figure 11 As shown. The algorithm measured the weld depth as 10.9 ± 2.1 mm, the width as 20.2 ± 3.2 mm, and the length as 1049.6 mm.
[0158] The detection accuracy is shown in Table 7 below, compared with the actual data: Table 7 Detection Accuracy Table
[0159] Weld bead planning: Global mesh construction (based on the weld root edge, layer spacing 4.8 mm, bead spacing 5.525 mm) → Rigid body translation to generate each weld bead layer → Post-processing (taper gradient, Gaussian smoothing, MAD outlier removal). The weld bead planning results are as follows: Figure 12 As shown.
[0160] Trajectory planning: Local UV to world XY coordinate transformation → Savitzky-Gore filter (window 5, 3rd order) → equidistant resampling (1.0 mm spacing) → trapezoidal velocity planning (5% weld length in acceleration phase, 8% weld length in deceleration phase). Weld bead XOY projection as follows: Figure 13 As shown.
[0161] Welding execution: Welding is performed step by step, with each step following the procedure as follows: (1) Approaching the starting point: three steps (lift Z to a safe height → translate XY → descend Z), approach speed 30 mm / s.
[0162] (2) Pre-writing analog quantities: Using the time close to the motion time, write the AO value with a current of 200 amps and a voltage of 22 volts in parallel to digest the SDK delay of about 1 second.
[0163] (3) Arc ignition: Pre-air supply for 0.3 seconds → Arc ignition current 120 A (60%) → DO1 pull up → Wait for DI0 arc confirmation → Hot arc ignition 240 A (120%) for 0.4 seconds → Gradually change to 200 A (0.3 seconds).
[0164] (4) Servo welding: Servo commands are sent in 8-millisecond cycles, with real-time arc length interpolation and superimposed triangular oscillation (amplitude 1.5 mm, frequency 1.5 Hz). The arc starts with a 1.8-fold acceleration and the arc ends with a 0.7-fold deceleration.
[0165] (5) Arc termination: Filling the pit with a stepped decay of 140 amps (70%) for 0.4 seconds → 100 amps (50%) for 0.4 seconds → 60 amps (30%) for 0.3 seconds → DO1 is lowered → backfire for 0.05 seconds → after-gas delivery for 2.0 seconds.
[0166] (6) Empty return: Z-axis rises 0 mm, X-axis retreats 180 mm, speed 30 mm / s, returns to the next starting point.
[0167] (7) Cycle: Repeat steps (1) to (6) until all welds are completed.
[0168] Welding complete: After all weld passes are completed, the robotic arm retreats to a safe position, the radar and welding machine are turned off, and the welding process ends.
[0169] In the above embodiments of the present invention, the relative accuracy of weld seam inspection reaches 99.1% in depth, 91.8% in width, and 99.96% in length; the analog quantity cache hit rate is greater than 95%, the arc initiation timing error is less than 50 milliseconds, the current control accuracy is ±0.443 A, and the voltage control accuracy is ±0.035 V; servo welding ensures uniform and continuous motion, and the trapezoidal speed planning and end speed control effectively reduce heat accumulation at the end. Actual measurements showed a 99.3% similarity in detection results between Windows x64 and Linux ARM (RK3588) dual platforms, with a maximum deviation of less than 0.5 mm in centerline coordinates, verifying the technical effectiveness of cross-platform detection consistency in the embodiments of the present invention.
Claims
1. An automated welding method for welding robots based on three-dimensional point clouds, characterized in that, include: Scan the weld area to obtain multiple frames of 3D point cloud data of the weld area. Based on the hand-eye calibration matrix and the tool center point offset, transform the point cloud data of each frame to a unified base coordinate system and merge them to obtain the complete point cloud of the weld area. The complete point cloud of the weld area is preprocessed, and numerical calculations are performed using a deterministic algorithm. An evidence map is constructed by estimating the carrier surface and the carrier surface where the weld is located is determined. The deterministic algorithm uses a fixed initial vector to perform deterministic iterations, extracts the main path of the weld on the evidence map, constructs a moving coordinate system along the main path and extracts a two-dimensional profile sequence, identifies the geometric parameters of each profile, and reconstructs the three-dimensional geometric information of the weld. Based on the three-dimensional geometric information of the weld, a multi-layer, multi-pass weld trajectory point sequence is generated using the bottom of the weld as a reference and a rigid body translation method. The sequence of multi-layer, multi-pass weld trajectory points is converted into a robot motion trajectory, and a speed planning method is adopted that accelerates during the arc start segment and decelerates during the arc finish segment. The robot is controlled to move at a constant speed in servo mode along the motion trajectory, and the welding power supply is synchronously controlled to output welding current and voltage according to the preset arc start-up and arc end sequence.
2. The automatic welding method for welding robots based on three-dimensional point clouds according to claim 1, characterized in that, The deterministic algorithm includes: Deterministic eigenvalue decomposition: Using a fixed vector as the initial vector, power iteration is performed to obtain the principal component eigenvectors. During the iteration, Gram-Schmidt orthogonalization is used to subtract the directions of the obtained principal components. The remaining eigenvectors are obtained through cross product, so that the signs and order of the eigenvectors are uniquely determined by the input data. Deterministic one-dimensional two-means clustering: After sorting the one-dimensional array, calculate the prefix sum and prefix sum of squares, traverse all split points to calculate the within-group sum of squares, and take the split point with the smallest within-group sum of squares as the optimal split threshold, so that the clustering result is uniquely determined by the input data; Deterministic downsampling: Integer indices are uniformly selected as sampling points within the point cloud index range, so that the sampled subset is uniquely determined by the input data.
3. The automatic welding method for welding robots based on three-dimensional point clouds according to claim 2, characterized in that, The step of preprocessing the complete point cloud of the weld area includes: performing region of interest filtering on the complete point cloud to filter out irrelevant points outside the spatial range; And / or, the deterministic eigenvalue decomposition specifically involves: assuming a 3×3 symmetric matrix C, with a fixed vector [1, 0, 0] T The first eigenvector V1 is obtained by power iteration with the initial vector; the second eigenvector V2 is obtained by subtracting the V1 component using Gram-Schmidt orthogonalization during the iteration with the fixed standard basis vector that is not parallel to V1 as the initial vector; the third eigenvector V3 is obtained by cross product V3 = V1 × V2. And / or, in the deterministic one-dimensional two-means clustering, the split point k∈[1, n-1] is traversed, where n represents the number of elements in the array; the formula for calculating the sum of squares within each group is: WCSS0=prefix_sq [k]-prefix_sum [k] 2 / k; WCSS1=(prefix_sq [n]-prefix_sq [k])-(prefix_sum [n]-prefix_sum [k]) 2 / (n-k); The optimal split point is the one where WCSS = WCSS0 + WCSS1 is minimized. Where k is the iterative index, which is a natural number.
4. The automatic welding method for welding robots based on three-dimensional point clouds according to claim 1, characterized in that, The carrier surface estimation includes: Multiple candidate carrier surface coordinate systems are generated, the point cloud is projected onto each candidate surface and rasterized, and the evidence score of each raster is calculated. The evidence score is a weighted composite of the depth score, edge score and hole score within the raster. The evidence scores of each raster constitute the evidence map. The evidence map is binarized and connected component analysis is performed. The candidate carrier surfaces are scored based on the number of grid cells in the connected components, the path length, and the average evidence score. The carrier surface with the highest score is selected as the best carrier surface.
5. The automatic welding method for welding robots based on three-dimensional point clouds according to claim 4, characterized in that, The steps for extracting the main path of the weld are as follows: On the evidence map of the optimal carrier surface, grid cells are used as nodes and the composite function of the geometric distance between adjacent grid cells and the evidence score is used as the edge weight. The shortest path algorithm is used to obtain the geodesic path between the two farthest endpoints in the connected domain. After smoothing and resampling, it is used as the main path of the weld. The steps for determining the two farthest endpoints are as follows: starting from the point with the highest evidence score, perform the first shortest path search to obtain the farthest point A; then, starting from point A, perform the second shortest path search to obtain the farthest point B and record the predecessor; and backtrack the predecessor to obtain the path from A to B. And / or, The extraction also includes bimodal detection calibration path height, constructing a point height histogram near the path, detecting local maxima after Gaussian smoothing, taking the first two peaks in descending order of peak value, and using the midpoint of the bimodal peaks as the weld opening center, mapping back to height coordinates as the path height calibration value; Smoothing is B-spline smoothing, and resampling is fixed-step resampling.
6. The automatic welding method for welding robots based on three-dimensional point clouds according to claim 1, characterized in that, A moving coordinate system is constructed along the main path, and a two-dimensional profile sequence is extracted. The geometric parameters of each profile are identified, and the three-dimensional geometric information of the weld is reconstructed. At each path sampling point, a local coordinate system is constructed with the path direction as the first direction and the weld transverse direction as the second direction. The two-dimensional profile point cloud is extracted and rasterized within the local coordinate system; The profile recognition supports automatic identification and switching between two weld geometry modes: V-groove mode and stacked Z-mode; among which, In the V-shaped bevel pattern, the left and right edges are identified as the weld top position and the root is identified as the weld bottom position. The bevel angle is equal to 180 degrees minus the angle between the left and right sidewalls and the vertical direction. In the stacked Z-mode, the positions of the upper sidewall, lower sidewall, and weld base are identified. The sidewalls of the upper and lower steel plates are estimated independently to avoid misalignment interference, and the midpoint of the double peaks is used as the path height calibration value. The geometric parameters of all sections are post-processed sequentially. Edge jump points and outliers are removed based on the distance between adjacent sections and the absolute deviation of the median. The section direction is flipped uniformly by the median of all section directions. The root representative points of each section are sorted according to the path position to form the weld centerline. After smoothing, the three-dimensional geometric parameters of the weld are output.
7. The automatic welding method for welding robots based on three-dimensional point clouds according to claim 1, characterized in that, The rigid body translation method is as follows: A global mesh is constructed based on the weld geometry parameters of each profile. The set of layers and traces of all profiles is collected. The local coordinates of each layer and trace of each profile are calculated. The local coordinates are uniformly converted into world coordinates through the transformation matrix of least squares fitting. Each pass position is shifted laterally by a set distance based on the bottom curve of the weld, and the pass number is multiplied by the pass spacing along the height direction. All cross sections use a unified reference direction vector, so that each weld pass is translated as a rigid body based on the reference curve. Among them, the layer spacing and the channel spacing are determined by process parameters. All channels in the same layer are distributed with equal width. The number of channels in the bottom layer is less than the number of channels in the top layer. The bevel cross section is distributed in an inverted trapezoidal shape.
8. The automatic welding method for welding robots based on three-dimensional point clouds according to claim 1, characterized in that, The speed planning is trapezoidal speed planning, specifically: The arc-starting section operates at an acceleration rate higher than the welding speed, and the length of the arc-starting acceleration section accounts for a set proportion of the weld length. The stabilization section operates at a constant welding speed; The arc-ending segment linearly decelerates to a speed lower than the welding speed at the end point, and the length of the arc-ending deceleration segment accounts for a set proportion of the weld length; And / or, The servo mode is specifically as follows: The cumulative arc length of the trajectory is pre-calculated. During the welding process, the target arc length increment is calculated based on the real-time clock. The position and attitude are obtained by binary search for the positioning interpolation segment index and linear interpolation. Servo commands are sent to the robot at fixed intervals. And / or, The welding process also includes superimposed lateral oscillation during the robot's movement, with the oscillation direction being lateral and perpendicular to the welding forward direction.
9. The automatic welding method for welding robots based on three-dimensional point clouds according to claim 1, characterized in that, The arc initiation sequence includes the stages of pre-gas supply, arc initiation, hot arc initiation, and gradual transition to normal current; the arc termination sequence includes the stages of gradually reducing current in steps, arc extinguishing, arc reheating, and post-gas supply. And / or, During the welding process, analog output is used to control the current and voltage of the welding power supply, and analog buffer control is set. Maintain a cache variable to record the current and voltage values written last time, and only perform an actual write operation when the deviation between the target value and the cache value exceeds a set threshold; Analog values are pre-written during the robot's approach phase to absorb communication delays during the movement time.
10. An automated welding system for a welding robot based on three-dimensional point clouds, characterized in that, include: A robotic arm is used to move a 3D sensor and perform welding operations. A 3D sensor, installed at the end of the robotic arm, is used to collect 3D point cloud data of the weld area; Welding power source, used to provide welding current and voltage; The controller is communicatively connected to the three-dimensional sensor, the robotic arm, and the welding power source. The controller includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the automatic welding method for welding robots based on three-dimensional point clouds as described in any one of claims 1 to 9.
