Robot laser spot welding trajectory planning method and laser spot welding system
By constructing an initial welding trajectory using multi-source sensor information and updating the deformation in real time using a laser spot welding deformation prediction model, the dynamic error problem caused by workpiece thermal deformation in robot laser spot welding positioning is solved, realizing precise dynamic compensation of the welding trajectory and flexible production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN INST OF TECH
- Filing Date
- 2026-05-20
- Publication Date
- 2026-07-14
AI Technical Summary
Existing robotic laser spot welding positioning uses a "teach-and-playback" mode, which cannot adapt to dynamic errors caused by workpiece thermal deformation, resulting in deviations between the welding trajectory and the predetermined trajectory, thus failing to meet the needs of flexible production.
Weld information is determined by multi-source sensing information, an initial welding trajectory is constructed and the welding point sequence is broken down. The overall cumulative deformation is updated in real time using a laser spot welding deformation prediction model, and the welding trajectory, welding point position and robot posture are adjusted to form a closed-loop control system to dynamically compensate for workpiece thermal deformation error.
It enables real-time, precise, and dynamic compensation for workpiece thermal deformation, avoids welding trajectory deviation, improves the flexibility and adaptability of robotic laser spot welding, and meets the needs of flexible production.
Smart Images

Figure CN122378720A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotic laser welding technology, and in particular to a robotic laser spot welding trajectory planning method and a laser spot welding system. Background Technology
[0002] With the development of intelligent manufacturing technology, robotic laser spot welding technology has been widely used in high-precision fields such as automobile manufacturing, aerospace, and medical devices due to its advantages such as high welding efficiency, small heat-affected zone, and small welding deformation.
[0003] Current robotic laser spot welding positioning mostly adopts the "teach-and-playback" mode. However, the "teach-and-playback" mode requires the pre-programming of a fixed welding program. When dynamic errors occur during the welding process due to factors such as workpiece thermal deformation, this working mode is very prone to causing deviations between the welding trajectory and the predetermined trajectory, making it unsuitable for flexible production requirements. Summary of the Invention
[0004] In view of this, this application proposes a robot laser spot welding trajectory planning method and a laser spot welding system.
[0005] In a first aspect, this application provides a method for planning the trajectory of robotic laser spot welding, including: Weld information is determined based on multi-source sensor information of the spot welding area, wherein the weld information includes shape information and position information; An initial welding trajectory is constructed based on the kinematic constraints of the welding robot and the weld information. The welding sequence, position, and initial posture data of the welding robot at each corresponding weld point are obtained by decomposing the initial welding trajectory. Each weld point is selected as a target weld point according to the welding sequence. A trajectory correction operation is performed based on the target weld points. The trajectory correction operation includes: using a trained laser spot welding deformation prediction model to predict the deformation of the current target weld point to obtain the predicted deformation of the current target weld point; updating the overall cumulative deformation based on the predicted deformation of the current target weld point; and adjusting the subsequent welding trajectory, weld point position, and robot posture based on the overall cumulative deformation. After performing trajectory correction on all weld points, the final welding trajectory, weld point position, and robot posture data are determined as the target welding trajectory, target weld point position, and target robot posture data.
[0006] In one embodiment, the overall cumulative deformation adjusts the subsequent welding trajectory, weld point position, and robot posture, including: Determine whether the updated overall cumulative deformation exceeds a preset error threshold. If it does, perform global trajectory correction on all subsequent solder joints of the current target solder joint. If the preset error threshold is not exceeded, local trajectory correction is performed on the next n weld points after the current target weld point, and the position, welding trajectory and robot posture of the corresponding weld points are adjusted synchronously.
[0007] In one embodiment, before updating the overall cumulative deformation based on the predicted deformation of the current target solder joint, the method further includes: Real-time acquisition of 3D image data of the spot welding area; Deformation correction is performed on the predicted deformation based on the real-time data acquired from the three-dimensional image.
[0008] In one embodiment, the method further includes: Acquire multi-source historical error sequence data and real-time error sequence data collected during the welding process. The multi-source historical error sequence data and the real-time error sequence data respectively include robot motion error, sensor measurement error and process disturbance error. The multi-source historical error sequence data and the real-time error sequence data are converted to the robot coordinate system; The predicted deformation after deformation correction is fused with the multi-source historical error sequence data and the real-time error sequence data after coordinate system transformation by the Kalman filter algorithm to obtain the time series error of the welding process. Error compensation is performed on the target welding trajectory, the target weld point position, and the target robot posture data based on the time series error.
[0009] In one embodiment, determining weld information based on multi-source sensing information of the spot welding area includes: Acquire three-dimensional point cloud data and three-dimensional image data of the spot welding area, and preprocess the three-dimensional point cloud data and the three-dimensional image data respectively; Based on the preprocessed 3D point cloud data and 3D image data, 3D point cloud feature points and 3D image feature points are extracted respectively. The 3D point cloud feature points and 3D image feature points are then fused and matched to determine the weld information.
[0010] In one embodiment, the step of fusing and matching the feature points of the three-dimensional point cloud with the feature points of the three-dimensional image to determine the weld information includes: The internal and external parameters of the line laser sensor and the industrial camera were calibrated using a checkerboard calibration board, and the coordinate system transformation relationships between the robot coordinate system, the line laser sensor coordinate system, the camera coordinate system and the workpiece coordinate system were established. The local adaptive KNN algorithm is used to fuse and match feature points in 3D images and 3D point clouds. Based on the established coordinate system transformation relationship, the coordinates of the matched feature points are transformed to the robot coordinate system to obtain the weld boundary coordinates, and the weld information is obtained by fitting the weld boundary coordinates.
[0011] In one embodiment, before performing trajectory correction based on the target solder joint, the method further includes: Obtain a training dataset, which includes the type of welding workpiece material, laser welding power, and workpiece surface temperature; The laser spot welding deformation prediction model was trained using the training dataset to obtain a well-trained laser spot welding deformation prediction model.
[0012] Secondly, this application also provides a robotic laser spot welding system, including: an industrial robot, a sensing module, and a processing module; The sensing module is used to detect and acquire multi-source sensing information of the spot welding area; The processing module is connected to the industrial robot and the sensing module respectively, and is used to execute the robot laser spot welding trajectory planning method as described in the first aspect.
[0013] Thirdly, this application also provides an electronic device, including a processor and a memory; the memory has a computer program stored thereon, wherein the computer program, when executed by the processor, implements the robot laser spot welding trajectory planning method as described in the first aspect.
[0014] Fourthly, this application also provides a non-transitory computer storage medium, characterized in that it stores a computer program thereon, wherein the computer program, when executed by a processor, implements the robot laser spot welding trajectory planning method as described in the first aspect.
[0015] The robotic laser spot welding trajectory planning method of this application has the following advantages over related technologies: 1. The robot laser spot welding trajectory planning method of this application determines the shape and position information of the weld seam through multi-source sensing information of the spot welding area. It can construct an initial welding trajectory that fits the actual working conditions of the spot welding area, and further decompose the welding sequence, position and initial posture data of the welding robot at each corresponding weld point to lay the foundation for dynamic adjustment of the welding trajectory to fit the actual operation scenario.
[0016] 2. Simultaneously, by traversing and selecting target weld points according to the welding sequence of each weld point to perform trajectory correction operations, the trained laser spot welding deformation prediction model accurately predicts the predicted deformation of the current target weld point. Based on this predicted deformation, the overall cumulative deformation caused by the thermal deformation of the workpiece during welding is updated in real time. This achieves point-by-point perception and cumulative quantification of the core dynamic error of workpiece thermal deformation, breaking through the technical bottleneck that the fixed program of the "teach-and-playback" mode cannot adapt to the dynamic error changes in the welding process. Furthermore, based on the quantified overall cumulative deformation, the subsequent welding trajectory, weld point position, and robot posture are adjusted in a targeted manner. This enables real-time and accurate dynamic compensation for the deviations in welding trajectory, weld point position, and robot posture caused by workpiece thermal deformation, fundamentally avoiding the problem of deviation between the welding trajectory and the predetermined trajectory due to dynamic errors.
[0017] 3. Finally, after completing trajectory correction operations on all weld points, the final target welding trajectory, target weld point position, and target robot posture data are determined. This makes the entire laser spot welding trajectory planning process a closed-loop control system that adapts to the dynamic changes in workpiece thermal deformation. There is no need to pre-program a fixed welding program. Welding-related parameters can be dynamically adjusted according to the actual cumulative thermal deformation of the workpiece during the welding process, which greatly improves the flexibility and adaptability of robot laser spot welding positioning and effectively meets the flexible production needs in modern production. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a robot laser spot welding trajectory planning method in one embodiment of this application; Figure 2 This is a flowchart illustrating the dynamic error compensation process in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of a robotic laser spot welding system in one embodiment of this application; Figure 4 This is a schematic diagram of the structure of a robotic laser spot welding system in another embodiment of this application. Detailed Implementation
[0020] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0021] In some embodiments, such as Figure 1 As shown, the present application provides a robot laser spot welding trajectory planning method, which includes the following steps S101 to S104.
[0022] S101: Determine weld information based on multi-source sensing information of the spot welding area, wherein the weld information includes shape information and position information.
[0023] The multi-source sensing information can include 3D point cloud data acquired by a line laser sensor and 3D image data acquired by an industrial camera.
[0024] In applications, line laser sensors, with their high-precision 3D ranging capabilities, can quickly scan the spot welding area and generate high-density 3D point cloud data. They can accurately capture the 3D geometric contours of the weld and surrounding workpiece surfaces, providing core geometric data support for the 3D reconstruction of the weld shape and spatial positioning. Industrial cameras, on the other hand, excel at acquiring high-resolution 3D image data of the welding area, clearly presenting the texture features, boundary contrast, and subtle morphological differences of the weld. This effectively compensates for the sensing shortcomings of line laser sensors in scenarios such as blurred weld edges and surface reflections. The two sensors working together can fit the complete shape information of the weld and, combined with coordinate system transformation relationships, map the spatial position of the weld to a coordinate system that the robot can recognize, forming complete weld information with both geometric accuracy and positional precision.
[0025] S102: Construct an initial welding trajectory based on the kinematic constraints of the welding robot and the weld seam information, and decompose the welding sequence, position, and initial posture data of the welding robot at each corresponding weld point based on the initial welding trajectory.
[0026] Among them, the kinematic constraints of welding robots can cover the range of motion of robot joints, the maximum angular velocity and angular acceleration thresholds, the joint torque bearing limit, the motion smoothness requirements and obstacle avoidance constraints. These constraints need to be quantified in advance in conjunction with the robot's forward and inverse kinematic models to ensure that the initial welding trajectory constructed is executable within the robot's physical motion capabilities.
[0027] It is understandable that weld information serves as the core basis for trajectory construction. Its shape information determines the macroscopic path of the initial welding trajectory, while its position information provides a precise reference for the spatial positioning of the trajectory. During the construction process, the shape features and position parameters of the weld can be transformed into a continuous and smooth robot motion path through path planning algorithms (such as the A* algorithm). This ensures that the trajectory strictly conforms to the geometric shape of the weld and satisfies the robot's kinematic constraints, avoiding the risk of joint over-limit, motion jamming, or collision.
[0028] For example, the global obstacle avoidance optimization planning of the weld path can be completed first using the A* algorithm, outputting discrete path nodes. Then, the discrete nodes can be transformed into a continuous and smooth robot spatial motion path using the cubic B-spline interpolation algorithm. First, using the robot's base coordinate system as a reference, the core feature points of the weld are extracted from the weld shape features and position parameters, and denoted as three-dimensional coordinate points. The collision-free optimal discrete path node sequence is obtained by searching using the A* algorithm. ,in For the weld start point, The end point of the weld. The number of nodes is given. Finally, the discrete node sequence is substituted into the cubic B-spline interpolation formula, and the interpolation step size is adjusted according to the actual spot welding accuracy requirements. Through split-axis interpolation and segmented splicing, a continuous three-dimensional motion path is finally obtained that strictly matches the weld shape and position requirements while satisfying the smoothness of robot motion.
[0029] Based on this, when disassembling weld points based on the initial welding trajectory, the determination of the welding sequence needs to comprehensively consider the weld formation quality and deformation control requirements. Planning principles such as following the weld direction, from the middle to both ends, or symmetrical distribution can be adopted. The weld point positions can be uniformly distributed on the trajectory according to the preset weld point spacing or discretized as needed to ensure that each weld point accurately falls within the core area of the weld. Simultaneously, the initial posture data corresponding to each weld point is calculated using a robot posture forward solving algorithm (e.g., the MDH parameter method). The robot posture data can include the welding torch's normal angle, posture angle, and the spatial posture parameters of the tool center point (TCP).
[0030] Taking the calculation of the initial posture data corresponding to each weld point using the MDH parameter method as an example, the process can be as follows: First, starting from the robot's base coordinate system, establish an independent MDH joint coordinate system for each joint of the 6-axis laser spot welding robot in sequence, and finally establish an end-effector TCP coordinate system at the TCP of the welding torch at the robot's end; then, calibrate the four MDH inherent feature parameters provided by the manufacturer for each joint of the 6-axis robot; extract the TCP three-dimensional position coordinates of the weld point to be calculated from the initial welding trajectory; and solve the problem by calling the robot inverse kinematics algorithm based on the calibrated MDH inherent feature parameters and TCP three-dimensional position coordinates. The actual joint angles of the robot's 6 axes corresponding to the current welding point are obtained. Then, for each of the robot's 6 joints, a single-joint MDH homogeneous transformation matrix is constructed based on the uncalibrated MDH inherent characteristic parameters and the actual joint angles of the robot's 6 axes. The six single-joint MDH homogeneous transformation matrices are then multiplied sequentially to obtain the overall homogeneous transformation matrix. The overall homogeneous transformation matrix is then structurally decomposed to separate the 3×3 rotation matrix. The 3×3 rotation matrix is then converted into RPY Euler angles according to the welding robot rotation rules. The obtained RPY Euler angles are the initial engineering posture data of the robot corresponding to the current welding point.
[0031] S103: Select each weld point as the target weld point according to the welding sequence, and perform trajectory correction operation based on the target weld points. The trajectory correction operation includes: using a trained laser spot welding deformation prediction model to predict the deformation of the current target weld point, and obtaining the predicted deformation of the current target weld point; updating the overall cumulative deformation based on the predicted deformation of the current target weld point; and adjusting the subsequent welding trajectory, weld point position, and robot posture based on the overall cumulative deformation.
[0032] It can be understood that the above trajectory correction process takes the initially planned welding sequence as the main execution line, and selects the current welding point as the target welding point in the order from the first welding point to the last welding point to carry out targeted trajectory correction, so as to realize the dynamic control of the trajectory point by point during the welding process. The laser spot welding deformation prediction model can be an LSTM neural network. Through this laser spot welding deformation prediction model, the local thermal deformation of the workpiece caused by the laser heat input during the welding of the current target welding point is quantitatively predicted to obtain the predicted deformation. The predicted deformation can effectively reflect the degree of deformation caused by welding of a single welding point.
[0033] The initial value of the overall cumulative deformation is set to 0. After the deformation prediction of the current target weld point is completed, it is updated in real time through the accumulation rule of "overall cumulative deformation = overall cumulative deformation before correction + predicted deformation of the current target weld point". This cumulative value can accurately reflect the superposition effect of workpiece thermal deformation caused by all spot welding operations from the first weld point to the current target weld point, truly reflecting the actual deformation state of the workpiece during the welding process, and providing a core basis for subsequent trajectory correction that fits the actual working conditions. Based on this overall cumulative deformation, the subsequent welding trajectory, weld point position and robot posture are adjusted. According to the workpiece spatial deformation law corresponding to the cumulative deformation, the three-dimensional path of the trajectory can be corrected to ensure that the trajectory always fits the actual weld position of the workpiece after deformation. For the subsequent weld point position, the three-dimensional coordinates of each weld point will be re-discretely determined on the basis of the corrected trajectory to ensure that the weld point falls accurately in the core area of the weld. For the robot posture, the spatial posture parameters of the robot tool center point at each weld point and the normal angle and posture angle of the welding gun will be adjusted simultaneously.
[0034] It should be noted that the adjustment operation uses the overall cumulative deformation as the quantitative benchmark. The smaller the overall cumulative deformation, the smaller the adjustment range, and the larger the overall cumulative deformation, the larger the corresponding adjustment range. Through this closed-loop correction logic of point-by-point prediction, cumulative update, and real-time adjustment, the dynamic error caused by the thermal deformation of the workpiece during the welding process can be effectively compensated, the continuous accumulation of deformation deviation can be avoided, and the welding trajectory, weld point position and robot posture can always adapt to the real-time deformation state of the workpiece.
[0035] S104: After performing trajectory correction operations on all weld points, the final obtained welding trajectory, weld point position, and robot posture data are determined as the target welding trajectory, target weld point position, and target robot posture data.
[0036] Understandably, by completing trajectory correction operations on all weld points, the final target welding trajectory, target weld point position, and target robot posture data are determined. This allows the entire laser spot welding trajectory planning process to form a closed-loop control system that adapts to the dynamic changes in workpiece thermal deformation. There is no need to pre-program a fixed welding program. Welding-related parameters can be dynamically adjusted according to the actual cumulative thermal deformation of the workpiece during the welding process, which greatly improves the flexibility and adaptability of robot laser spot welding positioning and effectively meets the flexible production needs in modern production.
[0037] The aforementioned robotic laser spot welding trajectory planning method determines the shape and position information of the weld seam through multi-source sensor information in the spot welding area. It can construct an initial welding trajectory that closely matches the actual weld seam conditions in the spot welding area, and further decomposes the welding sequence, position, and initial posture data of the welding robot at each corresponding weld point, laying the foundation for dynamic adjustment of the welding trajectory to fit the actual working scenario. Simultaneously, by traversing and selecting target weld points according to the welding sequence of each weld point to perform trajectory correction operations, the method uses a trained laser spot welding deformation prediction model to accurately predict the predicted deformation of the current target weld point. Based on this predicted deformation, the method updates the overall cumulative deformation caused by workpiece thermal deformation in real time, achieving point-by-point perception and cumulative quantification of the core dynamic error of workpiece thermal deformation. This overcomes the technical bottleneck of the fixed program in the "teach-and-playback" mode being unable to adapt to changes in dynamic errors during the welding process. Furthermore, based on the quantified overall cumulative deformation, the method specifically adjusts the subsequent welding trajectory, weld point position, and robot posture, enabling real-time and precise dynamic compensation for deviations in the welding trajectory, weld point position, and robot posture caused by workpiece thermal deformation. This fundamentally avoids the problem of deviations between the welding trajectory and the predetermined trajectory due to dynamic errors.
[0038] In some embodiments, adjusting the overall cumulative deformation of subsequent welding trajectories, weld point positions, and robot postures includes: determining whether the updated overall cumulative deformation exceeds a preset error threshold; if it exceeds the preset error threshold, performing global trajectory correction on all subsequent weld points of the current target weld point; if it does not exceed the preset error threshold, performing local trajectory correction on the n subsequent weld points of the current target weld point, and simultaneously adjusting the position of the corresponding weld point, welding trajectory, and robot posture.
[0039] The preset error threshold is set based on standards such as the precision requirements of laser spot welding process and the deformation tolerance of the workpiece material. n can be set according to actual needs; for example, the range can be selected between 1 and 3.
[0040] It is understandable that when the updated overall cumulative deformation exceeds the preset error threshold, it indicates that the cumulative effect of the current workpiece's thermal deformation has had a global impact on the subsequent welding accuracy. In this case, it is necessary to perform global trajectory correction on all subsequent weld points of the current target weld point. That is, update the weld information based on the current overall cumulative deformation, and replan the welding trajectory of all subsequent weld points based on the updated weld information. If the updated overall cumulative deformation does not exceed the preset error threshold, it indicates that the cumulative deformation of the workpiece only needs to be compensated within a small range to ensure welding accuracy. In this case, the position offset and attitude deflection angle caused by the workpiece deformation can be quantitatively calculated based on the updated overall cumulative deformation. The welding trajectory path of the subsequent n weld points can be finely adjusted based on the position offset and attitude deflection angle. At the same time, the spatial attitude parameters of the robot tool center point and the normal angle and attitude angle of the welding gun of the corresponding weld point are simultaneously adjusted to ensure that the parameters after local correction can accurately offset the error caused by the small-range cumulative deformation.
[0041] In some embodiments, before updating the overall cumulative deformation based on the predicted deformation of the current target weld point, the robot laser spot welding trajectory planning method further includes: acquiring real-time three-dimensional image data of the spot welding area; and performing deformation correction on the predicted deformation based on the real-time three-dimensional image data.
[0042] The real-time acquisition of 3D images of the spot welding area can be synchronously acquired by an industrial camera. The acquired raw 3D image data can undergo real-time preprocessing operations, including image noise reduction, distortion correction, grayscale enhancement, and reflection suppression, to effectively eliminate image interference caused by on-site conditions such as fumes, arc light, and welding reflections on the workpiece surface during laser spot welding, ensuring the clarity of the acquired images.
[0043] In application, the actual deformation characteristics of the workpiece in the current spot welding area can be identified from real-time data acquired from 3D images. The 3D spatial quantization value of the actual workpiece deformation is extracted, and this quantization value is compared dimensionally with the predicted deformation of the current target weld point output by the laser spot welding deformation prediction model. The deviation values in dimensions such as position offset and attitude deflection are calculated. Based on these deviation values, weighted compensation or other correction methods are used to calibrate the original predicted deformation in real time, obtaining the corrected accurate deformation. This real-time correction step further improves the dynamic error perception and compensation capabilities of the robot laser spot welding trajectory planning method, effectively reducing the impact of dynamic changes in spot welding conditions on trajectory correction accuracy, and significantly improving the accuracy of the entire trajectory correction operation and its adaptability to on-site conditions.
[0044] In some embodiments, such as Figure 2 As shown, after step S104, the robot laser spot welding trajectory planning method further includes the following steps S201 to S204.
[0045] S201: Acquire multi-source historical error sequence data and real-time error sequence data collected during the welding process. The multi-source historical error sequence data and real-time error sequence data include robot motion error, sensor measurement error and process disturbance error, respectively.
[0046] Among them, the multi-source historical error sequence data is a time-series error dataset formed by compiling past error statistics, while the real-time error sequence data collected during the welding process is a time-series error dataset that is synchronously collected and dynamically updated by multiple types of sensors under the current actual working conditions of laser spot welding.
[0047] It should be noted that both types of error data are constructed according to the welding sequence of the weld points, creating an error sequence synchronized with the laser spot welding process, to ensure that each target weld point has a corresponding historical error reference value and a real-time measured error value.
[0048] S202: Convert multi-source historical error sequence data and real-time error sequence data to the robot coordinate system.
[0049] In applications, a checkerboard calibration board can be used to calibrate the intrinsic and extrinsic parameters of the line laser sensor and the industrial camera, establishing coordinate system transformation relationships between the robot coordinate system, the line laser sensor coordinate system, the camera coordinate system, and the workpiece coordinate system. Then, based on these transformation relationships, multi-source historical error sequence data and real-time error sequence data are converted to the robot coordinate system.
[0050] S203: The predicted deformation after deformation correction is fused with the multi-source historical error sequence data and real-time error sequence data after coordinate system transformation by using the Kalman filter algorithm to obtain the time series error of the welding process.
[0051] In application, the state equation and observation equation of Kalman filter are first initialized based on the error variation law of laser spot welding. The predicted deformation after deformation correction is used as the core state variable of the filter solution. Then, the multi-source historical error sequence data after coordinate system transformation is used as the prior reference for Kalman filter state prediction. By leveraging the error time series variation law contained in the historical error sequence, the rationality of the prediction of the current weld error state is improved. At the same time, the multi-source real-time error sequence data after coordinate system transformation is used as the observation input of the filter solution. The prior prediction value of error is dynamically corrected by the on-site measured value of real-time error.
[0052] Subsequently, following the welding sequence of the weld points, the "prior prediction-observation update" iterative operation of Kalman filtering is performed sequentially on each target weld point. Based on the fusion solution result of the previous weld point and the historical error reference value of the current weld point, the prior estimate of the error of the current weld point is first predicted. Then, combined with the real-time measured error value of the current weld point and the predicted deformation after deformation correction, the prior estimate is accurately updated and corrected to obtain the optimal error estimate of the current weld point. After iterative solution of all weld points, the optimal error estimates of all weld points are sequentially connected in the welding time sequence to finally form the time series error of the welding process.
[0053] For example, taking the solder joint traversal order as time series k (k=1,2,3…n, where n is the total number of solder joints), the state equation describes the error state propagation law from time k-1 to k. Based on the time series characteristics of multi-source historical error sequences, the state change of the predicted deformation after deformation correction is incorporated, and the corresponding formula is: in, The state transition matrix at time k is obtained by fitting the temporal variation pattern of the multi-source historical error sequence; The state prior prediction value at time k; The process noise vector follows a Gaussian distribution. This characterizes the random disturbances in the propagation of historical errors.
[0054] The mapping relationship between the field observations and the state estimates at time k is established using an observation equation. The observation vector directly integrates multi-source real-time error sequence data and the predicted deformation after deformation correction. The corresponding formula is: in, Let k be the observation vector at time k. Let k be the observation matrix. This represents the optimal state estimate obtained by the Kalman filter at time k, which is the timing error value of the welding process at time k. The observed noise vector follows a Gaussian distribution. This characterizes the random interference in real-time error acquisition.
[0055] Then the Kalman filter iterates point by point according to the solder joint timing k, starting from k=1 (the first solder joint), and initializes... Then, execute the following iterative steps 1 to 5 in sequence, and output the optimal state estimate at each time step k. (i.e., the welding timing error at time k), all weld joints Series refers to the time series error in the welding process.
[0056] Step 1, State Prior Prediction: Using the optimal state estimate at time k-1, predict the prior error estimate at time k through the state transition matrix (historical error pattern). in, This is the optimal state estimate of the Kalman filter at time k-1.
[0057] Step 2, prior covariance prediction: Combining the state transition matrix and process noise, the error fluctuation of the prior estimate is quantified to provide a basis for Kalman gain calculation. The formula for calculating the prior covariance matrix at time k is: in, Let be the posterior covariance matrix at time k, reflecting the error uncertainty of the optimal state estimate. The process noise covariance matrix is determined by the statistical noise characteristics of multi-source historical errors.
[0058] Step 3: Calculate the Kalman gain. The weighting of prior predictions of multi-source historical errors and field observations of multi-source real-time errors is automatically adjusted using the Kalman gain (increasing the prior weight when real-time noise is high, and increasing the probability measurement weight when historical pattern deviations are large). The corresponding formula is: in, The noise covariance matrix is determined by the sensor measurement noise characteristics of multi-source real-time errors.
[0059] Step 4, optimal state update: Using Kalman gain, the prior estimate at time k is fused and corrected with the field observations to output the optimal state estimate at time k. This value represents the timing error of the welding process at time k, and is the optimal quantification result that integrates deformation correction deformation and multi-source historical / real-time errors. Step 5, posterior covariance update: Update the covariance matrix of the optimal state estimate at time k, and use it as the input for the prior covariance prediction at time k+1 to complete the iterative solution for a single weld point. in, It is an identity matrix.
[0060] S204: Perform error compensation on the target welding trajectory, target weld point position, and target robot posture data based on time series errors.
[0061] It is understandable that, for the target welding trajectory, based on the temporal variation law of the position offset component in the time series error corresponding to each weld point, the three-dimensional path direction of the original trajectory is corrected through a path smoothing adjustment algorithm (such as cubic B-spline interpolation algorithm). While ensuring the trajectory's continuity and smoothness, the adjusted trajectory accurately avoids the offset caused by errors, always closely conforming to the actual weld centerline of the deformed workpiece. For the target weld point position, based on the quantized value of the position offset in the time series error, the three-dimensional coordinates of each weld point in the robot coordinate system are corrected point by point. For the target robot posture data, based on the quantized value of the posture deflection in the time series error, the spatial posture parameters of the robot tool center point at each weld point are adaptively adjusted, simultaneously optimizing the welding torch's normal angle and posture angle. This error compensation process can further improve the accuracy of welding positioning and the adaptability to working conditions.
[0062] In some embodiments, determining weld information based on multi-source sensing information of the spot welding area includes: acquiring three-dimensional point cloud data and three-dimensional image data of the spot welding area, and preprocessing the three-dimensional point cloud data and three-dimensional image data respectively; extracting three-dimensional point cloud feature points and three-dimensional image feature points based on the preprocessed three-dimensional point cloud data and three-dimensional image data respectively, and fusing and matching the three-dimensional point cloud feature points and three-dimensional image feature points to determine weld information.
[0063] Preprocessing of 3D point cloud data can include denoising and filtering the acquired 3D point cloud data to remove discrete noise points; preprocessing of 3D image data can include grayscale conversion, enhancement, and edge extraction preprocessing to highlight weld features.
[0064] It is understandable that key geometric feature points can be extracted from 3D point cloud data. These feature points directly reflect the 3D spatial geometry and positional characteristics of the weld, and are the core basis for determining the spatial position of the weld. Furthermore, based on 3D image data, detailed features such as gray-scale abrupt changes, edge corners, and texture feature points of the weld can be captured. These feature points have strong visual recognition and can accurately locate the 2D position of the weld in the image, providing accurate visual anchor points for cross-sensor feature point matching.
[0065] After extracting the two types of feature points, the 3D image feature points need to be transformed from the image pixel coordinate system to the robot coordinate system to achieve coordinate system unification with the 3D point cloud feature points. Then, a feature point fusion matching algorithm is used to accurately align and match the two types of feature points. During the matching process, the geometric and visual features of the weld are used as dual constraints to eliminate mismatched feature points and retain effective matching feature point pairs that have both geometric consistency and visual recognizability, forming a weld feature point cluster that integrates the advantages of the two types of sensing. Finally, based on this feature point cluster, algorithms such as geometric fitting and contour reconstruction are used to accurately restore the complete 3D geometric shape of the weld and determine the shape information of the weld. At the same time, combined with the spatial mapping relationship of the robot coordinate system, the position information of the weld in the robot coordinate system is accurately extracted, forming complete weld information that has both geometric accuracy and positional certainty.
[0066] In some embodiments, the fusion matching of 3D point cloud feature points and 3D image feature points to determine weld information includes: using a checkerboard calibration board to complete the internal and external parameter calibration of the line laser sensor and the industrial camera, and establishing coordinate system transformation relationships between the robot coordinate system, the line laser sensor coordinate system, the camera coordinate system, and the workpiece coordinate system; using a local adaptive KNN algorithm to fuse and match 3D image feature points and 3D point cloud feature points; based on the established coordinate system transformation relationships, transforming the coordinates of the matched feature points to the robot coordinate system to obtain the weld boundary coordinates, and fitting the weld information based on the weld boundary coordinates.
[0067] It is understandable that the locally adaptive KNN algorithm can adaptively adjust the neighborhood K value based on the actual distribution density of feature points in the weld area and the characteristics of the surrounding environment. It reduces the K value in the core region of the weld where feature points are densely distributed, improving matching accuracy, and increases the K value in the edge region of the weld where feature points are sparsely distributed, ensuring the integrity of the matching. This effectively solves the problem of uneven feature point distribution caused by workpiece surface reflection, welding fumes, and irregular weld morphology in laser spot welding scenarios. During the matching process, spatial geometric descriptors and visual feature descriptors of two types of feature points are extracted first. Using multi-coordinate system transformation relationships as spatial geometric constraints, the similarity within the neighborhood of the feature points to be matched is calculated using the locally adaptive KNN algorithm. The optimal feature point pair with the highest feature descriptor matching degree is selected. Then, a random sampling consistency algorithm is used to remove mismatched point pairs caused by sensor noise and environmental interference, retaining effective matching feature point pairs that combine spatial geometric consistency and visual feature similarity, achieving accurate alignment and fusion of 3D image feature points and 3D point cloud feature points.
[0068] Then, based on the established coordinate system transformation relationship, the fused and matched 3D point cloud feature points are transformed from the line laser sensor coordinate system and the 3D image feature points from the camera coordinate system to the robot coordinate system through the corresponding homogeneous transformation matrix, thus completing the coordinate system unification of all effective matched feature points. Then, from the matched feature points after the coordinate unification, the boundary feature points that can accurately represent the weld contour are selected according to the geometric and visual features of the weld edge, thus obtaining the weld boundary coordinates in the robot coordinate system.
[0069] By fitting the weld boundary coordinates, the complete three-dimensional contour of the weld can be accurately restored, and the three-dimensional spatial coordinates of the weld centerline can be extracted. Finally, the shape and position information of the weld can be determined based on the fitting results.
[0070] In some embodiments, before performing trajectory correction based on the target weld point, the robot laser spot welding trajectory planning method further includes: acquiring a training dataset, which includes the type of welding workpiece material, laser welding power, and workpiece surface temperature; and using the training dataset to train a laser spot welding deformation prediction model to obtain a trained laser spot welding deformation prediction model.
[0071] The laser spot welding deformation prediction model is based on an LSTM neural network. The model has three input layer features: the workpiece material type, the laser welding power (W), and the workpiece surface temperature (°C). The output layer has one feature dimension: the deformation of the workpiece welded by the robot. The parameters of the LSTM neural network model are shown in Table 1.
[0072] Table 1 shows the parameters of the LSTM neural network workpiece deformation prediction model. The loss function can be as follows: In the formula, For the number of test samples, To test the actual values of the sample, These are the predicted values for the test samples.
[0073] In some embodiments, such as Figure 3 As shown, this application also provides a robotic laser spot welding system 30, including: an industrial robot 1, a sensing module 31 and a processing module 32; The sensing module 31 is used to detect and acquire multi-source sensing information of the spot welding area; The processing module 32 is connected to the industrial robot 1 and the sensing module 31 respectively, and is used to execute the robot laser spot welding trajectory planning method of any of the above schemes.
[0074] For example, such as Figure 4As shown, in the robotic laser spot welding system used in this application, the industrial robot 1 is equipped with a laser 5. The sensing module 31 may include a line laser sensor 2, an industrial camera 3, a temperature sensor 4, and a power analyzer 8. The processing module 32 may include a controller 6 and a computer 9. The robotic laser spot welding system may also be equipped with a teach pendant 7, which allows selection of a teach mode. The line laser sensor 2 and the industrial camera 3 are fixedly mounted on the end of the industrial robot 1, maintaining a fixed relative position with the laser 5. The temperature sensor 4 is mounted on the surface of the workpiece 10 to be welded, used to measure the surface temperature of the workpiece 10.
[0075] It should be noted that the robotic laser spot welding system 30 provided in this application embodiment and the robotic laser spot welding trajectory planning method provided in this application embodiment are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned robotic laser spot welding trajectory planning method, and the repeated parts will not be described again.
[0076] In some embodiments, an electronic device provided in this application includes a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the above-described robot laser spot welding trajectory planning method.
[0077] Specifically, the processor may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor may also include onboard memory for caching purposes. The processor may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application.
[0078] Memory can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, instruments, or propagation media. Specific examples of memory include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and also random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0079] This application also provides a non-transitory computer storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described robotic laser spot welding trajectory planning method. This computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into that device / apparatus / system. The aforementioned computer-readable medium carries one or more programs, which, when executed, implement the method as described in the embodiments of this application.
[0080] According to embodiments of this application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.
[0081] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0082] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for planning the trajectory of laser spot welding in a robot, characterized in that, include: Weld information is determined based on multi-source sensor information of the spot welding area, wherein the weld information includes shape information and position information; An initial welding trajectory is constructed based on the kinematic constraints of the welding robot and the weld information. The welding sequence, position, and initial posture data of the welding robot at each corresponding weld point are obtained by decomposing the initial welding trajectory. Each weld point is selected as a target weld point according to the welding sequence. A trajectory correction operation is performed based on the target weld points. The trajectory correction operation includes: using a trained laser spot welding deformation prediction model to predict the deformation of the current target weld point to obtain the predicted deformation of the current target weld point; updating the overall cumulative deformation based on the predicted deformation of the current target weld point; and adjusting the subsequent welding trajectory, weld point position, and robot posture based on the overall cumulative deformation. After performing trajectory correction on all weld points, the final welding trajectory, weld point position, and robot posture data are determined as the target welding trajectory, target weld point position, and target robot posture data.
2. The robot laser spot welding trajectory planning method as described in claim 1, characterized in that, The overall cumulative deformation adjusts the subsequent welding trajectory, weld point position, and robot posture, including: Determine whether the updated overall cumulative deformation exceeds a preset error threshold. If it does, perform global trajectory correction on all subsequent solder joints of the current target solder joint. If the preset error threshold is not exceeded, local trajectory correction is performed on the next n weld points after the current target weld point, and the position, welding trajectory and robot posture of the corresponding weld points are adjusted synchronously.
3. The robot laser spot welding trajectory planning method as described in claim 1, characterized in that, Before updating the overall cumulative deformation variable based on the predicted deformation variable of the current target weld point, the method further includes: Real-time acquisition of 3D image data of the spot welding area; Deformation correction is performed on the predicted deformation based on the real-time data acquired from the three-dimensional image.
4. The robot laser spot welding trajectory planning method as described in claim 3, characterized in that, The method further includes: Acquire multi-source historical error sequence data and real-time error sequence data collected during the welding process. The multi-source historical error sequence data and the real-time error sequence data respectively include robot motion error, sensor measurement error and process disturbance error. The multi-source historical error sequence data and the real-time error sequence data are converted to the robot coordinate system; The predicted deformation after deformation correction is fused with the multi-source historical error sequence data and the real-time error sequence data after coordinate system transformation by the Kalman filter algorithm to obtain the time series error of the welding process. Error compensation is performed on the target welding trajectory, the target weld point position, and the target robot posture data based on the time series error.
5. The robot laser spot welding trajectory planning method as described in claim 1, characterized in that, The step of determining weld information based on multi-source sensing information of the spot welding area includes: Acquire three-dimensional point cloud data and three-dimensional image data of the spot welding area, and preprocess the three-dimensional point cloud data and the three-dimensional image data respectively; Based on the preprocessed 3D point cloud data and 3D image data, 3D point cloud feature points and 3D image feature points are extracted respectively. The 3D point cloud feature points and 3D image feature points are then fused and matched to determine the weld information.
6. The robot laser spot welding trajectory planning method as described in claim 5, characterized in that, The step of fusing and matching the feature points of the three-dimensional point cloud with the feature points of the three-dimensional image to determine the weld information includes: The internal and external parameters of the line laser sensor and the industrial camera were calibrated using a checkerboard calibration board, and the coordinate system transformation relationships between the robot coordinate system, the line laser sensor coordinate system, the camera coordinate system and the workpiece coordinate system were established. The local adaptive KNN algorithm is used to fuse and match feature points in 3D images and 3D point clouds. Based on the established coordinate system transformation relationship, the coordinates of the matched feature points are transformed to the robot coordinate system to obtain the weld boundary coordinates, and the weld information is obtained by fitting the weld boundary coordinates.
7. The robot laser spot welding trajectory planning method as described in claim 1, characterized in that, Before performing trajectory correction based on the target solder joint, the method further includes: Obtain a training dataset, which includes the type of welding workpiece material, laser welding power, and workpiece surface temperature; The laser spot welding deformation prediction model was trained using the training dataset to obtain a well-trained laser spot welding deformation prediction model.
8. A robotic laser spot welding system, characterized in that, include: Industrial robots, sensing modules, and processing modules; The sensing module is used to detect and acquire multi-source sensing information of the spot welding area; The processing module is connected to the industrial robot and the sensing module respectively, and is used to execute the robot laser spot welding trajectory planning method as described in any one of claims 1 to 7.
9. An electronic device, characterized in that, It includes a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the robot laser spot welding trajectory planning method as described in any one of claims 1 to 7.
10. A non-transitory computer storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the robot laser spot welding trajectory planning method as described in any one of claims 1 to 7.