A welding trajectory planning method for industrial robots
Patent Information
- Application Number
- CN202611190973.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2046-08-06
AI Technical Summary
Existing industrial robot welding trajectory planning methods are difficult to adapt to workpiece misalignment, weld boundary changes, or bevel width changes, resulting in trajectory adaptation deviations. In particular, they are difficult to reflect the matching relationship between the robot end effector and the weld boundary in lateral reciprocating motion.
By acquiring weld inspection data, establishing a local coordinate system and correcting the lateral direction, the weld boundary is mapped as a local trajectory adaptation window. Combined with the lateral reciprocating motion parameters, the end pose and trajectory variables are solved under robot motion constraints. The envelope and window deviation are compared, and the trajectory variables are iteratively corrected by solving the sensitivity matrix through perturbation, and the trajectory planning is updated layer by layer.
It reduces trajectory adaptation deviations caused by weld boundaries deviating from the theoretical contour or misalignment, quantifies the matching relationship between lateral reciprocating motion and local weld boundaries, reduces the possibility of mismatch in the robot's end effector motion range, and achieves more accurate welding trajectory planning.
Smart Images

Figure CN122683767B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial robot control technology, specifically to a welding trajectory planning method for industrial robots. Background Technology
[0002] Industrial robots are widely used in continuous trajectory operations such as welding. When an industrial robot performs a continuous trajectory operation, it is necessary to plan the motion path, end pose, and trajectory variables of the robot's end effector based on the spatial position and local geometry of the work object, and ensure that the planning results satisfy robot kinematic constraints, joint limit constraints, end effector reachability constraints, and posture continuity constraints.
[0003] With the development of inspection technologies such as 3D vision and laser scanning, existing systems can acquire weld inspection data such as weld centerline, weld boundary, weld normal, and misalignment, and generate robot end-effector trajectories based on this data. Existing trajectory planning methods typically use the weld centerline as the reference path, combined with preset posture, movement speed, or lateral reciprocating motion parameters to generate trajectories, which can meet the operational needs of most regular welds and conventional assembly scenarios.
[0004] However, when the workpiece has misalignment, weld boundary changes, or bevel width variations, generating the robot end effector trajectory solely based on the weld centerline and fixed trajectory variables is insufficient to fully reflect the local geometric state at different locations, and it is also difficult to evaluate the fit between the actual range of motion of the robot end effector and the weld boundary. For robot trajectories with lateral reciprocating motion, the robot end effector moves laterally while advancing along the weld centerline, and the envelope of the lateral reciprocating motion can reflect the spatial occupancy range of the robot end effector.
[0005] Therefore, how to transform the weld centerline, weld boundary, weld normal, and misalignment into local trajectory adaptation constraints, solve the robot end pose and trajectory variables under robot motion constraints, and correct the trajectory variables based on the deviation between the lateral reciprocating motion envelope and the local trajectory adaptation window is a problem that needs to be solved in industrial robot trajectory planning.
[0006] To address this, a welding trajectory planning method for industrial robots is proposed. Summary of the Invention
[0007] This invention aims to provide a welding trajectory planning method for industrial robots. It determines the weld centerline, boundary, normal, and misalignment by acquiring weld inspection data. Discrete task points are generated along the centerline, and a local coordinate system corrected for misalignment is established. The weld boundary is mapped as a local trajectory adaptation window. Under robot motion constraints, a candidate sequence of end-effector pose trajectories containing lateral reciprocating motion parameters is solved. The deviation vector is obtained by comparing its motion envelope with the adaptation window, and iterative correction is performed by applying perturbations to solve the sensitivity matrix. Multiple task layers to be planned are determined based on preset task layer parameters. The boundary of the task area and the local trajectory adaptation window are updated layer by layer according to the target trajectory corresponding to each task layer until trajectory planning is completed for each task layer, resulting in welding trajectory planning data.
[0008] To achieve the above objectives, the present invention provides the following technical solution: A welding trajectory planning method for industrial robots includes: Obtain weld inspection data for the workpiece to be welded. The weld inspection data includes the weld centerline, weld boundary, weld normal, and misalignment. Discrete task points are generated along the weld centerline. A local coordinate system is established based on the tangent, weld normal, and transverse direction of the discrete task points. The transverse direction is corrected based on the misalignment amount, and the weld boundary is mapped to the corrected local coordinate system to obtain the local trajectory adaptation window. Based on discrete task points and local trajectory adaptation windows, the end-effector pose and trajectory variables are solved under robot motion constraints to obtain a candidate sequence of pose trajectories; the trajectory variables include the robot end-effector lateral reciprocating motion parameters. The lateral reciprocating motion envelope of the robot end effector is determined based on the lateral reciprocating motion parameters, and the lateral reciprocating motion envelope is compared with the local trajectory adaptation window to obtain the trajectory adaptation deviation vector. When the trajectory adaptation deviation vector does not meet the preset conditions, the trajectory variables are corrected according to the trajectory adaptation deviation vector, and the pose trajectory candidate sequence is regenerated based on the corrected trajectory variables; when the trajectory adaptation deviation vector meets the preset conditions, the corresponding pose trajectory candidate sequence is determined as the target trajectory, and welding trajectory planning data is obtained.
[0009] Preferably, the step of acquiring weld inspection data of the workpiece to be welded includes: scanning the weld area of the workpiece to be welded by a three-dimensional vision sensor set at the end of the robot to obtain three-dimensional point cloud data of the weld area; segmenting the three-dimensional point cloud data to obtain point cloud subsets corresponding to the two sides of the weld, and fitting the point cloud subsets corresponding to the two sides of the weld to obtain the weld centerline, weld boundary and normal vectors of the two sides of the weld; determining the weld normal based on the normal vectors of the two sides of the weld, and determining the misalignment amount based on the height difference of the two sides of the weld along the weld normal.
[0010] Preferably, obtaining the local trajectory adaptation window includes: sampling along the weld centerline at preset intervals to obtain discrete task points; for each discrete task point, determining the tangent and weld normal corresponding to the discrete task point, and performing a vector cross product between the tangent and weld normal to obtain the initial lateral direction; establishing an initial local coordinate system with the discrete task point as the origin and the tangent, weld normal, and initial lateral direction corresponding to the discrete task point as coordinate axes; determining the lateral deflection angle based on the misalignment amount and preset deflection coefficient corresponding to the discrete task point, and rotating the initial lateral direction according to the lateral deflection angle. The direction is determined by obtaining the corrected lateral direction; the corrected weld normal is determined based on the tangent corresponding to the discrete task point and the corrected lateral direction; the tangent corresponding to the discrete task point is kept unchanged, and the initial local coordinate system is updated based on the corrected lateral direction and the corrected weld normal to obtain the local coordinate system; the weld boundary coordinates corresponding to the discrete task point are transformed from the workpiece coordinate system to the local coordinate system corresponding to the discrete task point to obtain the mapped weld boundary coordinates, and the center reference point, the distance reference value from the weld, and the lateral coverage width reference value of the local trajectory adaptation window are determined based on the mapped weld boundary coordinates.
[0011] Preferably, obtaining the candidate sequence of pose trajectories includes: robot motion constraints including robot kinematic constraints, joint limit constraints, end-effector reachability constraints, and posture continuity constraints; determining the range of values for the robot end-effector pose and trajectory variables based on the coordinates of each discrete task point and the corresponding local trajectory adaptation window; performing inverse kinematics solution on the robot end-effector pose within the range of values to obtain the corresponding joint angle solutions, and filtering the joint angle solutions based on the joint limit constraints, end-effector reachability constraints, and posture continuity constraints to determine the robot end-effector pose and corresponding trajectory variables; arranging the obtained robot end-effector pose and trajectory variables according to the arrangement order of each discrete task point on the weld centerline to obtain the candidate sequence of pose trajectories.
[0012] Preferably, obtaining the trajectory adaptation deviation vector includes: lateral reciprocating motion parameters including the amplitude, frequency, and dwell time on both sides of the lateral reciprocating motion; calculating the lateral position trajectory curve of the robot end effector within one reciprocating motion cycle based on the amplitude, frequency, and dwell time on both sides of the lateral reciprocating motion in the trajectory variables; determining the lateral reciprocating motion envelope as the area formed by sweeping the lateral position trajectory curve along the tangential direction of the weld centerline between adjacent discrete task points; obtaining the weld gap distance deviation and the lateral coverage deviation based on the deviation of the lateral reciprocating motion envelope relative to the center reference point, weld gap distance reference value, and lateral coverage width reference value of the local trajectory adaptation window; for each discrete task point, using the weld gap distance deviation as the first component and the lateral coverage deviation as the second component, and forming a two-dimensional column vector according to the order of the first component and the second component, as the trajectory adaptation deviation vector corresponding to the discrete task point.
[0013] Preferably, determining the corresponding candidate sequence of pose trajectories as the target trajectory includes: comparing the trajectory adaptation deviation vector with a preset threshold to determine whether the trajectory adaptation deviation vector meets a preset condition; if the trajectory adaptation deviation vector does not meet the preset condition, determining the variable component to be corrected in the trajectory variable, applying a perturbation to the variable component to be corrected and recalculating the trajectory adaptation deviation vector, constructing a sensitivity matrix based on the trajectory adaptation deviation vector before and after the perturbation and the corresponding perturbation amount, and correcting the variable component to be corrected based on the sensitivity matrix to regenerate the candidate sequence of pose trajectories; if the trajectory adaptation deviation vector meets the preset condition, determining the corresponding candidate sequence of pose trajectories as the target trajectory.
[0014] Preferably, obtaining the welding trajectory planning data includes: determining multiple planned working layers and working area boundaries for the workpiece to be welded based on weld inspection data and preset working layer parameters; for the current planned working layer, updating the corresponding local trajectory adaptation window based on the working area boundary corresponding to the current planned working layer, and determining the target trajectory corresponding to the current planned working layer based on the updated local trajectory adaptation window; updating the working area boundary corresponding to the next planned working layer based on the target trajectory corresponding to the current planned working layer and preset working layer parameters; repeatedly determining the target trajectory corresponding to each planned working layer, and integrating the target trajectories corresponding to each planned working layer to obtain welding trajectory planning data.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention establishes a local coordinate system for each discrete task point and corrects the lateral direction based on the misalignment amount, mapping the weld boundary as a local trajectory adaptation window containing geometric references. This allows the trajectory planning process to be based on the actual local geometric state of the weld, which helps to reduce trajectory adaptation deviations caused by the weld boundary deviating from the theoretical contour or the presence of misalignment.
[0016] 2. This invention incorporates the lateral reciprocating motion parameters into the synchronous solution range of the end-effector pose, and compares the lateral reciprocating motion envelope determined by these parameters with the local trajectory adaptation window. This allows for a quantitative assessment of the matching relationship between the space occupied by the swinging motion and the local boundary of the weld, which helps to reduce the possibility that the lateral reciprocating motion range of the robot end-effector exceeds or fails to reach the lateral geometric range represented by the local trajectory adaptation window.
[0017] 3. This invention solves for the sensitivity matrix by applying perturbation to the trajectory variables, and then corrects the trajectory variables within the constraints and iteratively regenerates the candidate sequence of pose trajectories, so that the trajectory adaptation deviation can gradually converge to the preset conditions under the premise of satisfying motion constraints. At the same time, multiple planned operation layers and their operation area boundaries are determined according to weld inspection data and preset operation layer parameters, and the operation area boundaries and local trajectory adaptation windows of subsequent operation layers are updated layer by layer in combination with the target trajectory corresponding to each operation layer. This is beneficial to generate the operation area boundaries and local trajectory adaptation windows corresponding to different planning heights layer by layer according to the preset operation layer parameters and the initial bevel geometry of the workpiece to be welded. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the overall process of a welding trajectory planning method for industrial robots according to the present invention. Figure 2 This is a flowchart illustrating the construction process of the local trajectory adaptation window in this invention. Figure 3 This is a schematic diagram illustrating the determination of the trajectory adaptation deviation vector in this invention. Detailed Implementation
[0019] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and 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.
[0020] Example 1: This invention provides a welding trajectory planning method for industrial robots, the overall flowchart of which is as follows: Figure 1 As shown in the diagram, the flowchart for constructing the local trajectory adaptation window is as follows: Figure 2As shown in the diagram, the trajectory adaptation deviation vector is determined as follows: Figure 3 As shown. In this embodiment, the method is executed by an industrial control computer, which includes a point cloud processing module, a coordinate transformation module, a trajectory parameter parsing module, an inverse kinematics solution module, a geometric deviation calculation module, a logic judgment module, a sensitivity calculation module, a trajectory data management module, and a task scheduling module. The inverse kinematics solution module calls the robot kinematic model to solve the robot's end-effector pose and perform related kinematic calculations; the robot's underlying real-time servo controller provides the robot's operating status and hardware parameters to the industrial control computer, and controls the industrial robot's movement according to the target trajectory output by the industrial control computer. Specifically, it includes: Obtain weld inspection data for the workpiece to be welded. The weld inspection data includes the weld centerline, weld boundary, weld normal, and misalignment. Discrete task points are generated along the weld centerline. A local coordinate system is established based on the tangent, weld normal, and transverse direction of the discrete task points. The transverse direction is corrected based on the misalignment amount, and the weld boundary is mapped to the corrected local coordinate system to obtain the local trajectory adaptation window. Based on discrete task points and local trajectory adaptation windows, the end-effector pose and trajectory variables are solved under robot motion constraints to obtain a candidate sequence of pose trajectories; the trajectory variables include the robot end-effector lateral reciprocating motion parameters. The lateral reciprocating motion envelope of the robot end effector is determined based on the lateral reciprocating motion parameters, and the lateral reciprocating motion envelope is compared with the local trajectory adaptation window to obtain the trajectory adaptation deviation vector. When the trajectory adaptation deviation vector does not meet the preset conditions, the trajectory variables are corrected according to the trajectory adaptation deviation vector, and the pose trajectory candidate sequence is regenerated based on the corrected trajectory variables; when the trajectory adaptation deviation vector meets the preset conditions, the corresponding pose trajectory candidate sequence is determined as the target trajectory, and welding trajectory planning data is obtained.
[0021] In this embodiment, the lateral reciprocating motion parameters include amplitude, frequency, and dwell time on both sides. The lateral reciprocating motion amplitude represents the maximum lateral offset of the robot's end effector relative to the center of the lateral reciprocating motion on one side; the lateral reciprocating motion amplitude referred to below refers to the single-side amplitude. The lateral reciprocating motion amplitude is used to determine the lateral reciprocating motion envelope and serves as a variable to be corrected in the geometric adaptation iteration; the frequency and dwell time on both sides are read from the welding process parameter library according to the current welding process scheme and remain unchanged during the geometric adaptation iteration, and do not participate in the sensitivity matrix calculation.
[0022] Furthermore, the acquisition of weld inspection data of the workpiece to be welded includes: scanning the weld area of the workpiece to be welded by a three-dimensional vision sensor set at the end of the robot to obtain three-dimensional point cloud data of the weld area; segmenting the three-dimensional point cloud data to obtain point cloud subsets corresponding to the two sides of the weld, and fitting the point cloud subsets corresponding to the two sides of the weld to obtain the weld centerline, weld boundary and normal vectors of the two sides of the weld; determining the weld normal based on the normal vectors of the two sides of the weld, and determining the misalignment amount based on the height difference of the two sides of the weld along the weld normal.
[0023] Specifically, the industrial control computer reads the original 3D point cloud data of the weld area from the 3D vision sensor installed at the end of the industrial robot. The point cloud processing module first verifies the number of valid points in the original 3D point cloud data. The point cloud validity safety threshold is determined based on the sampling resolution of the 3D vision sensor, the expected scanning area, and the minimum effective point cloud density per unit area. The minimum number of valid points can be determined by multiplying the expected scanning area by the minimum effective point cloud density per unit area. If the number of valid points is lower than the point cloud validity safety threshold, the current planned task is terminated.
[0024] When the number of valid points meets the requirements, the original 3D point cloud data is subjected to point cloud filtering, outlier removal, and region segmentation. Region segmentation adopts a combination of spatial distance and normal angle: when the Euclidean distance and normal angle between adjacent points both meet the corresponding thresholds, the adjacent points are assigned to the same candidate surface region; otherwise, the positions between adjacent points are used as the boundaries of the candidate region.
[0025] After obtaining multiple candidate surface regions, the point cloud processing module removes candidate surface regions whose point density per unit area is lower than the minimum effective point cloud density per unit area, and determines the central axis of the scanning range based on the calibration parameters of the 3D vision sensor and the scanning pose. On both sides of the central axis of the scanning range, the candidate surface regions with the smallest centroid lateral distance are selected. When there are candidates with the same lateral distance, the candidate surface region with more points is selected, thereby obtaining the point cloud subsets corresponding to the surfaces on both sides of the weld.
[0026] The distance threshold and normal angle threshold are determined by repeatedly scanning a standard plane and a calibrated workpiece of the same type based on the spatial resolution of the three-dimensional vision sensor, measurement noise, and the bevel type of the workpiece to be welded, and are stored in the system configuration file; they are recalibrated when the sensor installation status, scanning conditions, or bevel type change.
[0027] This embodiment uses a dual-plane fitting method to obtain weld geometry data. It is suitable for situations where the surfaces to be welded on both sides of the weld can be approximated by planes within a local scanning range, and the intersection of the two locally fitted planes can serve as the local weld geometry baseline. The industrial control computer performs local plane fitting on the point cloud subsets of the left and right sides respectively, determines the intersection of the two locally fitted planes as the weld centerline, determines the weld boundary based on the spatial edge contours of the point cloud subsets on both sides, and obtains the normal vectors of the two locally fitted planes.
[0028] Before summing the normal vectors, the industrial control computer uses the direction from the viewpoint of the 3D vision sensor to the centroid of the corresponding point cloud subset as the orientation reference direction; when the dot product of the local normal vector and the corresponding orientation reference direction is less than zero, the local normal vector is inverted. The two local normal vectors after unified orientation are vector-summed and normalized to obtain the weld normal.
[0029] The industrial control computer uses the corresponding positions on the weld centerline as the pairing references for the left and right surfaces to determine the corresponding left and right boundary points. If no directly corresponding boundary points exist, interpolation is performed based on adjacent boundary points. The coordinate difference vector between the left and right boundary points is projected onto the weld normal, and the signed projection value is determined as the misalignment amount. The sign of the misalignment amount indicates the relative height relationship between the left and right surfaces along the weld normal and is used to determine the rotation direction of the subsequent lateral deflection angle.
[0030] Through the above processing, this step can provide an anomaly alert when the point cloud data is insufficient, and provide basic geometric data such as weld centerline, weld boundary, weld normal and misalignment for the subsequent trajectory planning process.
[0031] Further, obtaining the local trajectory adaptation window includes: sampling along the weld centerline at preset intervals to obtain discrete task points; for each discrete task point, determining the tangent and weld normal corresponding to the discrete task point, and performing a vector cross product between the tangent and weld normal to obtain the initial lateral direction; establishing an initial local coordinate system with the discrete task point as the origin and the tangent, weld normal, and initial lateral direction corresponding to the discrete task point as coordinate axes; determining the lateral deflection angle based on the misalignment amount and preset deflection coefficient corresponding to the discrete task point, and rotating the initial lateral direction according to the lateral deflection angle. The corrected lateral direction is obtained by first determining the tangential direction corresponding to the discrete task point and the corrected lateral direction; the corrected weld normal is determined based on the tangential direction corresponding to the discrete task point and the corrected weld normal; the tangential direction corresponding to the discrete task point is kept unchanged, and the initial local coordinate system is updated based on the corrected lateral direction and the corrected weld normal to obtain the local coordinate system; the weld boundary coordinates corresponding to the discrete task point are transformed from the workpiece coordinate system to the local coordinate system corresponding to the discrete task point to obtain the mapped weld boundary coordinates, and the center reference point, the distance reference value from the weld, and the lateral coverage width reference value of the local trajectory adaptation window are determined based on the mapped weld boundary coordinates.
[0032] The industrial control computer samples the arc length along the weld centerline at preset intervals to obtain discrete task points. The preset interval is the arc length distance between adjacent discrete task points along the weld centerline, determined based on the robot trajectory control accuracy and the changes in local curvature, boundary, and misalignment of the weld. A larger preset interval is used when the local geometric changes are relatively slow, and a smaller preset interval is used when the local geometric changes are relatively fast.
[0033] For each discrete task point, the industrial control computer determines the tangential direction based on the first-order difference result of the weld centerline and performs a cross product between the tangential direction and the weld normal. If the magnitude of the cross product result is not less than the zero vector threshold configured by the vector normalization function, the cross product result is normalized to obtain the initial lateral direction. If the magnitude of the cross product result is less than the threshold, for non-first discrete task points, the initial lateral direction of the previous normal discrete task point is projected onto the vertical plane of the current tangential direction and normalized; for the first discrete task point, the direction vector between the two boundaries of the weld is projected onto the vertical plane of the tangential direction and normalized. If the projection result still cannot be normalized, the current discrete task point is marked as an abnormal task point, and smooth interpolation is performed using the initial lateral direction of adjacent normal discrete task points. An initial local coordinate system is established with the discrete task point as the origin and the tangential direction, weld normal, and initial lateral direction as coordinate axes.
[0034] The industrial control computer reads the plate thickness corresponding to the discrete task points from the workpiece design model or welding process parameter library, and calculates the ratio of the misalignment to the plate thickness to obtain the dimensionless misalignment ratio. For workpieces of uniform thickness, the same plate thickness is used for each discrete task point; for workpieces of varying thickness, the corresponding local plate thickness is read according to the position of the discrete task points.
[0035] The industrial control computer determines the lateral deflection angle based on the misalignment ratio, a pre-calibrated deflection coefficient, and an angle compensation constant. The deflection coefficient and angle compensation constant are obtained through least-squares fitting of trial welding data or robot teaching data from similar workpieces. The calibration data includes at least the misalignment amount, plate thickness, and the corresponding expected lateral deflection angle. Recalibration is performed when the workpiece material type, plate thickness range, or bevel type changes. The lateral deflection angle can be expressed as:
[0036] In the formula, Indicates the first The lateral deflection angle corresponding to each discrete task point is expressed in radians. Indicates the first The misalignment amount corresponding to each discrete task point is expressed in millimeters. Indicates the first The thickness of the sheet metal corresponding to each discrete task point is expressed in millimeters. For workpieces of uniform thickness... ; It is a dimensionless ratio; This represents the pre-calibrated deflection coefficient, which is a dimensionless parameter; This represents the angle compensation constant, expressed in radians. The angle compensation constant is not a preset value arbitrarily set by the operator, but rather an intercept term obtained by performing least-squares fitting on multiple sets of trial welding data or robot teaching data of the same type of workpiece. It characterizes the fixed residual deflection amount corresponding to a zero misalignment ratio in the calibration data. When the calibration data indicates that there is no fixed residual deflection amount when the misalignment ratio is zero, or that the fixed residual deflection amount can be ignored, the angle compensation constant is set to zero; otherwise, the intercept value obtained from the fitting is used. Therefore, the angle compensation constant has a clear data source, and the calculation relationship of the lateral deflection angle maintains dimensional consistency.
[0037] The coordinate transformation module of the industrial control computer rotates the initial lateral direction around the tangential axis by the lateral deflection angle according to the three-dimensional rotation matrix, obtaining a corrected lateral direction vector. Subsequently, the corrected lateral direction is cross-multiplied with the tangential direction and normalized to obtain a corrected weld seam normal vector. The system constructs a new orthogonal basis using the tangential direction, the corrected weld seam normal, and the corrected lateral direction, and uses the new orthogonal basis to update the attitude transformation matrix of the initial local coordinate system, obtaining the final local coordinate system and outputting it to the trajectory planning module.
[0038] A homogeneous transformation matrix is used to transform the coordinates of weld boundary data points in the global workpiece coordinate system to the local coordinate system, resulting in a mapped set of weld boundary coordinate points. The geometric midpoint between the left and right boundaries is extracted as the center reference point. The industrial control computer calculates the Euclidean distance from the mapped weld boundary coordinate points to the center reference point, and the maximum value of the Euclidean distance is determined as the reference value for the weld seam distance. Simultaneously, the mapped weld boundary coordinate points are projected onto the corrected lateral direction, and the difference between the maximum and minimum projected coordinate values is calculated and determined as the reference value for the lateral coverage width.
[0039] By incorporating geometric parameters such as plate thickness and misalignment during coordinate system transformation, this step enables the local trajectory adaptation window to better reflect the local spatial state of the weld, thereby providing a constraint basis for subsequent end pose and trajectory variable solving.
[0040] Further, obtaining the candidate sequence of pose trajectories includes: robot motion constraints including robot kinematic constraints, joint limit constraints, end-effector reachability constraints, and posture continuity constraints; determining the value range of robot end-effector pose and trajectory variables based on the coordinates of each discrete task point and the corresponding local trajectory adaptation window; performing inverse kinematics solution on the robot end-effector pose within the value range to obtain the corresponding joint angle solutions, and filtering the joint angle solutions based on the joint limit constraints, end-effector reachability constraints, and posture continuity constraints to determine the robot end-effector pose and corresponding trajectory variables; arranging the obtained robot end-effector pose and trajectory variables according to the arrangement order of each discrete task point on the weld centerline to obtain the candidate sequence of pose trajectories.
[0041] The robot end effector pose includes the three-dimensional position and orientation of the robot end effector in the workpiece coordinate system. The three-dimensional position of the robot end effector is determined based on the three-dimensional coordinates of the corresponding discrete task point and the position range defined by the local trajectory adaptation window; the unit of the position coordinates is millimeters. The robot end effector orientation is represented by a local coordinate system orientation matrix corresponding to the discrete task point. This orientation matrix, arranged according to the coordinate axes of the local coordinate system, consists of the tangent direction corresponding to the discrete task point, the corrected weld normal, and the corrected transverse direction, and is a dimensionless matrix. The candidate pose trajectory sequence is formed by combining the robot end effector pose and trajectory variables corresponding to each discrete task point according to their arrangement order on the weld centerline.
[0042] The industrial control computer reads the robot's link parameters and joint limit parameters from the robot control system and establishes a robot motion constraint model. For each discrete task point, the industrial control computer determines the allowable range of values for the robot's end-effector pose and trajectory variables based on the local trajectory adaptation window.
[0043] The inverse kinematics solution module performs inverse kinematics solutions on the robot's end-effector pose within the allowed value range, and eliminates joint angle solutions that do not meet the requirements based on joint limit constraints, end-effector reachability constraints, and attitude continuity constraints. For inverse kinematics solutions that are unsolvable or singular task points, transitional candidate poses are generated based on adjacent normal discrete task points, and the inverse kinematics solution and the above constraint verification are re-executed; if the verification fails, the corresponding local trajectory segment planning is marked as failed.
[0044] When multiple joint angle solutions satisfy the constraints for the same discrete task point, the first discrete task point selects the solution with the smallest joint space distance to the robot's current joint angle. Subsequent discrete task points select the solution with the smallest joint space distance to the previously determined joint angle. If the distances are the same, the solution with the smaller Jacobian matrix condition number is selected. The industrial control computer determines the robot's end-effector pose and trajectory variables based on the finally selected joint angle solutions.
[0045] The trajectory data management module organizes the pose and trajectory variables of each robot end effector according to the arrangement order of discrete task points on the weld centerline, and obtains the candidate sequence of pose trajectory.
[0046] This step, by reading the robot's hardware parameters and performing interpolation transition processing on some abnormal task points, helps to improve the continuity of the pose trajectory candidate sequence generation process and its consistency with the robot's motion constraints.
[0047] Further, obtaining the trajectory adaptation deviation vector includes: lateral reciprocating motion parameters including the amplitude, frequency, and dwell time on both sides of the lateral reciprocating motion; calculating the lateral position trajectory curve of the robot end effector within one reciprocating motion cycle based on the amplitude, frequency, and dwell time on both sides of the lateral reciprocating motion in the trajectory variables; determining the area formed by sweeping the lateral position trajectory curve along the tangential direction of the weld centerline between adjacent discrete task points as the lateral reciprocating motion envelope; obtaining the seam distance deviation and lateral coverage deviation based on the deviation of the lateral reciprocating motion envelope relative to the center reference point, seam distance reference value, and lateral coverage width reference value of the local trajectory adaptation window; for each discrete task point, using the seam distance deviation as the first component and the lateral coverage deviation as the second component, and forming a two-dimensional column vector according to the order of the first component and the second component, as the trajectory adaptation deviation vector corresponding to the discrete task point.
[0048] Specifically, the trajectory parameter parsing module reads the lateral reciprocating motion amplitude, frequency, and dwell time on both sides from the trajectory variables, and generates a lateral position trajectory curve within one reciprocating motion cycle. The lateral position trajectory curve uses the projected coordinates of the central reference point in the corrected lateral direction as the center of the lateral reciprocating motion. The center of the lateral reciprocating motion is not treated as an independent variable to be corrected, and the overall lateral position of the lateral reciprocating motion envelope is defined by the central reference point.
[0049] The industrial control computer reads the welding forward speed from the welding process database or robot operation program, and samples the lateral position trajectory curve according to the existing trajectory sampling period of the robot trajectory planning program. Based on the forward displacement and lateral position at each sampling moment, three-dimensional trajectory sampling points are generated, and a three-dimensional sweep envelope is formed based on the three-dimensional trajectory sampling points and the lateral movement range, which serves as the lateral reciprocating motion envelope of the robot end effector.
[0050] For each discrete task point, the geometric deviation calculation module establishes a local cross section with the tangent as the plane normal and extracts the local envelope section profile of the transverse reciprocating motion envelope on the local cross section. The local envelope section profile is then transformed to the local coordinate system corresponding to the discrete task point, so that the local envelope section profile and the local trajectory adaptation window are located in the same local cross section.
[0051] The geometric deviation calculation module calculates the Euclidean distance from each contour point in the local envelope section profile to the central reference point, and subtracts the gap distance reference value from the maximum Euclidean distance to obtain the gap distance deviation. Each contour point is projected onto the corrected lateral direction, and the actual lateral coverage width is obtained by the difference between the maximum and minimum projected coordinates. The lateral coverage deviation is obtained by subtracting the lateral coverage width reference value from the actual lateral coverage width. Both deviations retain a positive or negative sign: a positive value indicates that the actual value is greater than the corresponding reference value, and a negative value indicates that the actual value is less than the corresponding reference value.
[0052] For each discrete task point, the geometric deviation calculation module uses the gap distance deviation as the first component of a two-dimensional column vector and the lateral coverage deviation as the second component to form the corresponding trajectory adaptation deviation vector. When constructing the sensitivity matrix and solving for the lateral reciprocating motion amplitude correction, the signs of the two deviations are retained. When determining whether the trajectory adaptation deviation vector meets the preset conditions, the absolute values of the two deviations are compared with the corresponding allowable deviation thresholds.
[0053] This step, by combining the welding forward speed parameter in the calculation of the lateral reciprocating motion envelope, can describe the superposition relationship between the robot end effector's forward motion along the weld and the lateral reciprocating motion, thus providing a calculation basis for comparing the envelope with the local trajectory adaptation window.
[0054] Further, determining the corresponding candidate sequence of pose trajectories as the target trajectory includes: comparing the trajectory adaptation deviation vector with a preset threshold to determine whether the trajectory adaptation deviation vector meets a preset condition; if the trajectory adaptation deviation vector does not meet the preset condition, determining the variable component to be corrected in the trajectory variable, applying a perturbation to the variable component to be corrected and recalculating the trajectory adaptation deviation vector, constructing a sensitivity matrix based on the trajectory adaptation deviation vector before and after the perturbation and the corresponding perturbation amount, and correcting the variable component to be corrected based on the sensitivity matrix to regenerate the candidate sequence of pose trajectories; if the trajectory adaptation deviation vector meets the preset condition, determining the corresponding candidate sequence of pose trajectories as the target trajectory.
[0055] Specifically, the logic judgment module compares the absolute values of the seam distance deviation and the lateral coverage deviation with the corresponding deviation tolerance thresholds. If both deviations do not exceed the corresponding thresholds, the trajectory adaptation deviation vector is determined to meet the preset conditions; otherwise, iterative correction is initiated. The deviation tolerance thresholds are determined based on the assembly accuracy of the workpiece to be welded, the robot positioning accuracy, and the target trajectory adaptation accuracy requirements, or can be read from the welding process parameter library.
[0056] After entering the iterative correction phase, the industrial control computer determines whether the current iteration count has reached the preset maximum iteration count. The preset maximum iteration count is determined based on the robot control cycle, the allowable calculation time for single-segment trajectory planning, and the calculation time required for one amplitude correction.
[0057] If the preset maximum number of iterations is not reached, the lateral reciprocating motion amplitude is determined as the variable to be corrected. The preset small perturbation starts from a numerical resolution of the lateral reciprocating motion amplitude parameter and increases step by step with a numerical resolution. When the change of any deviation component after the perturbation reaches the minimum resolution of the corresponding deviation calculation result, the perturbation amount that first meets the condition is determined as the preset small perturbation. If the two deviations still show no identifiable change after the lateral reciprocating motion amplitude reaches the boundary of the allowable value range, the sensitivity data of the current discrete task point is determined to be invalid, and the data of the adjacent normal discrete task point is used for smoothing.
[0058] The sensitivity calculation module uses the ratio of the change in the gap distance deviation before and after the disturbance to the amplitude disturbance as the sensitivity of the gap distance deviation to the amplitude of the lateral reciprocating motion, and the ratio of the change in the lateral coverage deviation to the amplitude disturbance as the sensitivity of the lateral coverage deviation to the amplitude of the lateral reciprocating motion, and constructs a sensitivity matrix of two rows and one column in the aforementioned order.
[0059] To eliminate the influence of the difference in dimensions and numerical scales between the lateral reciprocating motion amplitude and the two deviation components, the industrial control computer uses the allowable range of lateral reciprocating motion amplitude as the amplitude normalization scale, and the allowable thresholds for gap distance deviation and lateral coverage deviation as the normalization scales for the corresponding deviation components. This yields the normalized trajectory variables, the normalized trajectory adaptation deviation vector, and the normalized sensitivity matrix. The normalized correction is then solved using a damped least squares approach.
[0060] In the formula, This represents the correction amount for the normalized trajectory variable; This represents the normalized sensitivity matrix; This represents the normalized trajectory adaptation bias vector; This represents the dimensionless damping coefficient that is greater than zero. The unit matrix is represented by [value], and all the quantities mentioned above are dimensionless. The damping coefficient is determined adaptively. The industrial control computer uses the ratio of the numerical resolution of the lateral reciprocating motion amplitude to the allowable range of the lateral reciprocating motion amplitude as the initial value of the damping coefficient, which is dimensionless. The industrial control computer calculates the normalized correction of the lateral reciprocating motion amplitude based on the current damping coefficient, and forms a trial lateral reciprocating motion amplitude based on the normalized correction, limiting the trial lateral reciprocating motion amplitude to the allowable range of the lateral reciprocating motion amplitude; the industrial control computer regenerates the lateral reciprocating motion envelope based on the limited trial lateral reciprocating motion amplitude, and recalculates the normalized trajectory adaptation deviation vector. When the L2 norm of the normalized trajectory adaptation deviation vector obtained from the trial calculation is less than the L2 norm of the normalized trajectory adaptation deviation vector before correction, the current damping coefficient and the corresponding normalized correction amount are retained, and the lateral reciprocating motion amplitude update step is entered. When the L2 norm of the normalized trajectory adaptation deviation vector obtained from the trial calculation is not less than the L2 norm of the normalized trajectory adaptation deviation vector before correction, the trial calculation of the lateral reciprocating motion amplitude is discarded, and the damping coefficient is increased in a doubling manner before resolving. Each increase in the damping coefficient and resolving is included in the iteration count of the current local optimization task. When the iteration count reaches the preset maximum iteration count, the damping coefficient adjustment and resolving are stopped, and non-convergence exit processing is performed. In this embodiment, the normalized trajectory variable correction amount is the normalized correction amount of the lateral reciprocating motion amplitude. The trajectory adaptation deviation vector includes two components: gap distance deviation and lateral coverage deviation. The variable to be corrected only includes the lateral reciprocating motion amplitude. Therefore, the amplitude correction amount obtained from the damped least squares solution is used to reduce the L2 norm of the normalized trajectory adaptation deviation vector in the least squares sense, without requiring both gap distance deviation and lateral coverage deviation to be simultaneously zero as a convergence condition. The industrial control computer restores the normalized correction amount to an amplitude correction amount in millimeters according to the allowable range of the lateral reciprocating motion amplitude, and adds the amplitude correction amount to the current lateral reciprocating motion amplitude. When the corrected lateral reciprocating motion amplitude exceeds the allowable range, the industrial control computer limits the corrected lateral reciprocating motion amplitude to within the allowable range.
[0061] The industrial computer regenerates the lateral reciprocating motion envelope based on the corrected lateral reciprocating motion amplitude, and recalculates the gap distance deviation and lateral coverage deviation. When both the gap distance deviation and the lateral coverage deviation meet the corresponding allowable deviation thresholds, the industrial computer determines the current pose trajectory candidate sequence as the target trajectory and stores the target trajectory file.
[0062] If any deviation component fails to meet its corresponding tolerance threshold, and the current iteration count has not reached the preset maximum iteration count, the industrial control computer continues to perform iterative correction of the lateral reciprocating motion amplitude. If any deviation component fails to meet its corresponding tolerance threshold, and the current iteration count has reached the preset maximum iteration count, the industrial control computer determines that an amplitude solution satisfying the current local trajectory adaptation window requirement has not been obtained within the allowable range of lateral reciprocating motion amplitude, outputs a non-convergence warning, terminates the current local optimization task, and does not determine the current pose trajectory candidate sequence as the target trajectory.
[0063] Through the above processing, when the lateral reciprocating motion amplitude is a single variable component to be corrected, the damped least squares method is used to reduce the normalized trajectory adaptation deviation vector formed by the two deviation components, and the gap distance deviation and lateral coverage deviation satisfy the corresponding deviation tolerance thresholds as the conditions for determining the target trajectory.
[0064] Further, obtaining the welding trajectory planning data includes: determining multiple planned operation layers and operation area boundaries for the workpiece to be welded based on weld inspection data and preset operation layer parameters; for the current planned operation layer, updating the corresponding local trajectory adaptation window based on the operation area boundary corresponding to the current planned operation layer, and determining the target trajectory corresponding to the current planned operation layer based on the updated local trajectory adaptation window; updating the operation area boundary corresponding to the next planned operation layer based on the target trajectory corresponding to the current planned operation layer and preset operation layer parameters; repeatedly determining the target trajectory corresponding to each planned operation layer, and integrating the target trajectories corresponding to each planned operation layer to obtain welding trajectory planning data.
[0065] Specifically, the industrial control computer reads preset working layer parameters from a manufacturing process expert database or a welding process parameter database. These preset working layer parameters include at least the desired filling depth. The industrial control computer determines the starting height of the bevel bottom and the ending height of the bevel top based on weld inspection data. Using the desired filling depth as the nominal height interval between adjacent working layer slicing planes, multiple slicing planes are sequentially set from the bevel bottom to the bevel top. When the remaining height between the bevel top and the previous slicing plane is less than the desired filling depth, the height corresponding to the bevel top is determined as the height boundary of the last working layer.
[0066] For each slice plane, the industrial control computer calculates the intersection line between the slice plane and the fitted result of the bevel surfaces on both sides of the weld, and determines the area enclosed by the intersection line within the slice plane as the two-dimensional polygonal work area corresponding to the planned work layer. The industrial control computer arranges the planned work layers in ascending order of the Z-axis height of the slice planes, and associates and stores the Z-axis height coordinates of each slice plane with the corresponding two-dimensional polygonal work area boundary coordinate set, forming multiple planned work layer sequences.
[0067] The industrial control computer uses a pointer structure to extract the first job layer to be planned in the above sequence as the current processing object, re-inputs the bound boundary point set data of the job area to be planned into the coordinate transformation module, updates the original boundary data and outputs the updated local trajectory adaptation window; then calls the aforementioned damped least squares iterative correction process based on the sensitivity matrix to calculate and output the target trajectory structure array corresponding to the current job layer to be planned.
[0068] After confirming the completion of trajectory planning calculations for the current planned work layer, the task scheduling module of the industrial control computer reads the planned height corresponding to the target trajectory of the current planned work layer and uses this planned height as the lower height reference for the next planned work layer. The task scheduling module adds the desired fill depth to the planned height to obtain the nominal slice height of the next planned work layer; when the nominal slice height is higher than the bevel top height, the bevel top height is determined as the slice height of the next planned work layer. Subsequently, the task scheduling module calculates the intersection line between the slice plane corresponding to this slice height and the fitting results of the bevel surfaces on both sides of the weld, and redetermines the boundary of the two-dimensional polygonal work area corresponding to the next planned work layer based on the intersection line.
[0069] The task scheduling module of the industrial control computer sequentially traverses the unplanned task layers in the sequence of task layers, outputs the local target trajectory data of each individual layer in a pipeline manner, and finally calls the data splicing function to package and concatenate the target trajectories of all layers into a unified JSON format multi-layer welding trajectory planning data package containing complete three-dimensional spatial coordinates and robot timing motion control information.
[0070] By obtaining hierarchical guidance parameters from the process expert database or process parameter database, this step can generate target trajectories layer by layer according to multiple planned operation layers, and integrate the trajectories of each layer, which helps to improve the continuity of the multi-layer welding trajectory planning data generation process.
[0071] Example 2: Furthermore, in scenarios where a local trajectory adaptation window is generated and the lateral deflection angle is determined, the lateral deflection angle can be smoothed based on the directional changes of the weld centerline between adjacent discrete task points. Specifically, the industrial control computer extracts the three-dimensional coordinates of the current discrete task point and its adjacent task points, and calculates the tangential change trend between adjacent task points using a differential method. When the tangential change between adjacent task points is large, the lateral deflection angle corresponding to the current discrete task point is smoothed to ensure continuous change in the lateral deflection angle between adjacent task points. This helps reduce the amplitude of attitude changes between adjacent task points in areas with large local curvature changes.
[0072] Specifically, after sampling a series of discrete task points at preset intervals, the industrial control computer extracts the coordinates of the current discrete task point and its preceding and following adjacent task points in three-dimensional space, and uses a three-point circular arc fitting method to determine the local radius of curvature. Let the coordinates of the previous discrete task point, the current discrete task point, and the next discrete task point be respectively... , and The industrial control computer calculates the distance between the three discrete task points and obtains the local curvature radius corresponding to the current discrete task point based on the circumradius determined by the three discrete task points. When the three discrete task points cannot form a stable circular arc fitting result with a finite circumradius, the local curvature corresponding to the current discrete task point is considered to be close to zero, and curvature compensation for the lateral deflection angle is not triggered at the current discrete task point.
[0073] The logic judgment module of the industrial control computer compares the local radius of curvature corresponding to the current discrete task point with a preset curvature threshold. The local radius of curvature obtained by three-point circular arc fitting is used to characterize the local curvature state of the weld centerline in the neighborhood of the current discrete task point. In this embodiment, a local constant curvature approximation is used between adjacent discrete task points, and the preset interval is defined as the arc length interval between adjacent discrete task points along the weld centerline. Under the condition of local constant curvature approximation, the arc length interval between adjacent discrete task points is equal to the product of the local radius of curvature and the corresponding direction change angle.
[0074] The industrial control computer (ICC) reads the maximum permissible attitude angle change between adjacent discrete task points from the attitude continuity constraints of the robot trajectory planning program. This maximum permissible attitude angle change is expressed in radians. The ICC divides the maximum permissible attitude angle change by a preset arc length interval along the weld centerline to obtain a preset curvature threshold. This preset curvature threshold characterizes the following: at the current sampling interval of discrete task points, when the local curvature radius is less than the preset curvature threshold, the directional change caused by the local curvature of the weld centerline may reach the maximum permissible attitude angle change range defined by the attitude continuity constraints, thus triggering curvature compensation for the lateral deflection angle.
[0075] The preset curvature threshold is stored in the system configuration file. When the preset arc length interval along the weld centerline or the maximum allowable change in the attitude continuity constraint changes, the preset curvature threshold is recalculated. When the local curvature radius is not less than the preset curvature threshold, the lateral deflection angle calculated according to the aforementioned lateral deflection angle formula remains unchanged; when the local curvature radius is less than the preset curvature threshold, the ratio of the current local curvature radius to the preset curvature threshold is used as the attenuation coefficient.
[0076] The industrial control computer applies an attenuation coefficient to the deflection portion of the lateral deflection angle caused by the misalignment ratio, while keeping the angle compensation constant, to obtain the lateral deflection angle after curvature compensation. A smaller local radius of curvature indicates a larger weld curvature, resulting in greater attenuation of the misalignment deflection portion. The industrial control computer uses the curvature-compensated lateral deflection angle to update the local coordinate system and robot end-effector pose corresponding to the current discrete task point. When the same discrete task point simultaneously satisfies both the curvature compensation condition and the Jacobian matrix condition number scaling condition, the industrial control computer first performs lateral deflection angle compensation based on the local radius of curvature, and determines the local coordinate system and candidate robot end-effector pose corresponding to the discrete task point. Subsequently, it calculates the Jacobian matrix condition number based on the joint angles and robot kinematics model corresponding to the candidate pose, and adjusts the perturbation amount used for calculating the sensitivity of the lateral reciprocating motion amplitude based on this condition number. Curvature compensation applies to the local coordinate system and candidate pose determination stage, while condition number scaling applies to the subsequent sensitivity matrix construction stage; both are executed in the above order.
[0077] By compensating for the lateral deflection angle based on local curvature changes, this step can reduce the impact of rapid changes in the misalignment compensation amount on the continuity of the end pose to a certain extent.
[0078] As an optional preprocessing method for dwell time on both sides, after the local trajectory adaptation window is determined and before the iteration of lateral reciprocating motion amplitude sensitivity begins, the industrial control computer adjusts the dwell time on both sides based on the reference value of the lateral coverage width of the local trajectory adaptation window and the local cross-sectional area deviation. The adjusted dwell time on both sides serves as the input for calculating the lateral reciprocating motion envelope and remains unchanged during subsequent iterations of lateral reciprocating motion amplitude sensitivity, without participating in the sensitivity matrix calculation. The industrial control computer determines the distribution direction of the dwell time correction based on the relative size of the distances from the center reference point to the left and right boundaries of the local trajectory adaptation window, and determines the dwell time correction based on the smoothing area deviation and dwell time correction coefficient described later. The adjustment of the dwell time on both sides is performed within the allowable range of robot motion constraints, end-effector velocity constraints, and attitude continuity constraints, and the dwell time changes between adjacent discrete task points are smoothed to maintain the continuity of the lateral reciprocating motion trajectory.
[0079] Specifically, the trajectory parameter parsing module of the industrial control computer extracts the center reference point, weld seam distance reference value, misalignment amount, and mapped weld seam boundary coordinates of the local trajectory adaptation window corresponding to the current discrete task point. The geometric deviation calculation module of the industrial control computer determines the local unfilled section boundary at the current discrete task point based on the misalignment amount and the mapped weld seam boundary coordinates, and performs numerical integration on the area enclosed by the local unfilled section boundary to obtain the actual local cross-sectional area corresponding to the current discrete task point.
[0080] The industrial control computer (ICC) reads the preset ideal area value corresponding to the target weld bead's designed cross-sectional area from the current welding process scheme or welding process parameter library, and subtracts the preset ideal area from the actual local cross-sectional area corresponding to the current discrete task point to obtain the area deviation. A positive area deviation indicates that the actual cross-sectional area to be filled in the current local area is greater than the preset ideal area; a negative area deviation indicates that the actual cross-sectional area to be filled in the current local area is less than the preset ideal area. The system does not directly perform real-time high-frequency adjustment based on the area deviation of a single discrete task point. For discrete task points located between the first and last discrete task points, the ICC calculates the arithmetic mean of the area deviations corresponding to the previous, current, and next discrete task points, and determines the arithmetic mean as the smoothed area deviation corresponding to the current discrete task point; for the first discrete task point, the ICC calculates the arithmetic mean of the area deviations corresponding to the first and next discrete task points; for the last discrete task point, the ICC calculates the arithmetic mean of the area deviations corresponding to the previous and last discrete task points.
[0081] When the smoothing area deviation is positive, the system increases the dwell time on the corresponding side or both sides within the preset upper limit of dwell time to increase the lateral coverage time; when the smoothing area deviation is negative, the system decreases the dwell time on the corresponding side or both sides within the preset lower limit of dwell time; when the smoothing area deviation is within the preset area tolerance range, the current dwell time on both sides remains unchanged. If the distances from the left and right boundaries of the local trajectory adaptation window to the center reference point are inconsistent, the system allocates dwell time corrections based on the relative magnitudes of the distances between the two boundaries, prioritizing the adjustment of the dwell time on the side with the larger boundary distance. The adjusted dwell times on both sides must also meet the variation limits between adjacent discrete task points and keep the robot's end-effector velocity, acceleration, and trajectory continuity within the allowable range of robot motion constraints.
[0082] In one implementation, the dwell time correction is determined based on the smoothed area deviation and limited within the allowable dwell time range specified in the current welding process plan. The dwell time correction coefficient is determined using trial welding data of similar workpieces: for different local area deviations, the dwell time correction corresponding to making the actual filled cross-sectional area close to the preset ideal area is recorded. The area deviation is used as the fitting input, and the corresponding dwell time correction is used as the fitting target. The least squares fitting method is used to determine the dwell time correction coefficient. The fitted dwell time correction coefficient is stored in the welding process parameter library; when the workpiece type or welding process plan changes, trial welding calibration is performed again.
[0083] The area deviation is measured in square millimeters, the dwell time correction factor is measured in seconds per square millimeter, and the dwell time correction obtained by multiplying the area deviation by the dwell time correction factor is measured in seconds. The upper and lower limits of dwell time and the area tolerance range are retrieved from the welding process parameter library corresponding to the current welding process scheme. The dwell time variation limits between adjacent discrete task points are determined based on the robot's end-effector velocity constraints, acceleration constraints, and attitude continuity constraints. Therefore, the dwell time correction factor and related limits have clear sources and ensure that the adjusted dwell times on both sides are dimensionally consistent.
[0084] This step involves adjusting the dwell time on both sides based on the local geometry, which helps maintain a good match between the lateral reciprocating motion parameters and the local trajectory adaptation window without changing the reciprocating frequency.
[0085] Furthermore, in scenarios where the trajectory adaptation deviation vector does not meet preset conditions and requires iterative correction, the industrial control computer adjusts the lateral reciprocating motion amplitude disturbance based on the condition number of the Jacobian matrix corresponding to the current robot end-effector pose. When the robot end-effector pose approaches a singular region, the industrial control computer reduces the lateral reciprocating motion amplitude disturbance; when the robot end-effector pose is far from a singular region, the industrial control computer uses the original preset small disturbance for sensitivity matrix calculation. In this embodiment, the Jacobian matrix used to adjust the lateral reciprocating motion amplitude disturbance is the position Jacobian matrix. The position Jacobian matrix is the part of the robot geometric Jacobian matrix that describes the relationship between robot joint motion and robot end-effector linear displacement, excluding the angular velocity mapping part that describes the relationship between robot end-effector angular displacement. Since the lateral reciprocating motion amplitude corresponds to the geometric disturbance in the robot end-effector position direction, the position Jacobian matrix is used to calculate the condition number to avoid the influence of different scales on the condition number calculation results when the end-effector linear displacement component and angular displacement component are used.
[0086] The position Jacobian matrix and its condition number are calculated by the inverse kinematics solver based on the current robot joint angles, robot link parameters, and the robot kinematic model. Subsequent Jacobian matrix condition numbers used for adjusting the lateral reciprocating motion amplitude perturbation all refer to the position Jacobian matrix condition number. The lateral reciprocating motion amplitude perturbation is limited to the allowable range of values. This helps to reduce the impact of excessive perturbations near singular regions on iterative stability.
[0087] Specifically, when the industrial control computer determines that the trajectory adaptation deviation vector does not meet the preset conditions, the inverse kinematics solution module obtains the robot joint angles corresponding to the candidate pose to be evaluated in the candidate sequence of pose trajectories, and inputs the robot joint angles and robot link parameters into the robot kinematic model to calculate the position Jacobian matrix corresponding to the candidate pose to be evaluated. The inverse kinematics solution module performs singular value decomposition on the position Jacobian matrix to obtain the maximum and minimum singular values of the position Jacobian matrix; when the minimum singular value is greater than zero, the ratio of the maximum singular value to the minimum singular value is determined as the condition number of the Jacobian matrix corresponding to the candidate pose to be evaluated; when the minimum singular value is zero, the candidate pose to be evaluated is determined to be in a singular state of the position Jacobian matrix. The inverse kinematics solution module sends the condition number of the Jacobian matrix or the singular state judgment result to the logic judgment module.
[0088] The logic judgment module of the industrial control computer receives the current Jacobian matrix condition number output by the inverse kinematics solution module and compares it with the warning condition number and singular condition number recorded in the configuration file of the inverse kinematics solution module. The warning condition number and singular condition number are preferentially read from the condition number threshold configuration data provided by the robot manufacturer. When the robot manufacturer does not provide the warning condition number and singular condition number, the industrial control computer assembles a test joint angle set by the candidate joint angles corresponding to the current planning task, the singular configuration given by the robot kinematic model, and the transition joint angles between the candidate joint angles and the singular configurations. The transition joint angles are generated according to the existing joint angle sampling interval of the robot trajectory planning program, without setting a separate independent sampling interval. For each set of test joint angles in the test joint angle set, the inverse kinematics solution module calculates the corresponding Jacobian matrix condition number and generates the end-effector pose increment according to the minimum resolution of the robot end-effector position data, and performs inverse kinematics solution. When there is no solution for inverse kinematics, or the joint angle increment obtained by the solution exceeds the allowable joint angle change of the robot in one control cycle, the corresponding test joint angle is marked as an unstable test joint angle. The minimum Jacobian matrix condition number corresponding to the unstable test joint angle is determined as the singular condition number, and the maximum Jacobian matrix condition number less than the singular condition number among the stable test joint angles is determined as the warning condition number. The warning condition number and singular condition number are stored in the inverse kinematics solution module configuration file. The online calculation of the Jacobian matrix condition number uses the same position Jacobian matrix definition as the determination of the warning condition number and singular condition number. When the warning condition number and singular condition number are read from the condition number threshold configuration data provided by the robot manufacturer, only the condition number threshold corresponding to the position Jacobian matrix definition is used; when the robot manufacturer does not provide a condition number threshold corresponding to the position Jacobian matrix, the warning condition number and singular condition number are determined according to the aforementioned test joint angle set. The testing process and the online judgment process use the same inverse kinematics solution module, robot kinematics model, and position Jacobian matrix calculation method.
[0089] When the Jacobian matrix condition number is not greater than the warning condition number, the original preset small disturbance is used to calculate the sensitivity of the lateral reciprocating motion amplitude. When the Jacobian matrix condition number is greater than the warning condition number but less than the singular condition number, the original preset small disturbance corresponding to the warning condition number and the zero disturbance corresponding to the singular condition number are used as two linear interpolation endpoints. Linear interpolation is performed based on the position of the current Jacobian matrix condition number between the warning condition number and the singular condition number to obtain the disturbance corresponding to the lateral reciprocating motion amplitude. When the Jacobian matrix condition number is not less than the singular condition number, the sensitivity matrix correction is not performed at the discrete task point, and the data of the adjacent normal task points are used for smooth interpolation transition according to the aforementioned singular point processing method.
[0090] This step adjusts the perturbation amount based on the condition number of the Jacobian matrix, which can reduce the perturbation amplitude when the robot's end-effector pose approaches a singular region, and helps to improve the stability of the trajectory variable correction process near the constraint boundary.
[0091] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A welding trajectory planning method for industrial robots, characterized in that, include: Obtain weld inspection data for the workpiece to be welded. The weld inspection data includes the weld centerline, weld boundary, weld normal, and misalignment. Discrete task points are generated along the weld centerline. A local coordinate system is established based on the tangent, weld normal, and lateral direction of the discrete task points. The lateral direction is corrected based on the misalignment, and the weld boundary is mapped to the corrected local coordinate system to obtain a local trajectory adaptation window. Specifically: discrete task points are obtained by sampling along the weld centerline at preset intervals; for each discrete task point, the corresponding tangent and weld normal are determined, and the initial lateral direction is obtained by performing a vector cross product between the corresponding tangent and weld normal; an initial local coordinate system is established with the discrete task point as the origin and the corresponding tangent, weld normal, and initial lateral direction as coordinate axes; based on the discrete task points... The lateral deflection angle is determined by the misalignment amount corresponding to the task point and the preset deflection coefficient. The initial lateral direction is rotated according to the lateral deflection angle to obtain the corrected lateral direction. The corrected weld normal is determined according to the tangent corresponding to the discrete task point and the corrected lateral direction. The tangent corresponding to the discrete task point is kept unchanged, and the initial local coordinate system is updated according to the corrected lateral direction and the corrected weld normal to obtain the local coordinate system. The weld boundary coordinates corresponding to the discrete task point are transformed from the workpiece coordinate system to the local coordinate system corresponding to the discrete task point to obtain the mapped weld boundary coordinates. The center reference point, the distance reference value from the weld, and the lateral coverage width reference value of the local trajectory adaptation window are determined according to the mapped weld boundary coordinates. Based on discrete task points and local trajectory adaptation windows, the end-effector pose and trajectory variables are solved under robot motion constraints to obtain a candidate sequence of pose trajectories; the trajectory variables include the robot end-effector lateral reciprocating motion parameters. The lateral reciprocating motion envelope of the robot end effector is determined based on the lateral reciprocating motion parameters, and the lateral reciprocating motion envelope is compared with the local trajectory adaptation window to obtain the trajectory adaptation deviation vector. Specifically, the lateral reciprocating motion parameters include the amplitude, frequency, and dwell time on both sides of the lateral reciprocating motion. Based on the amplitude, frequency, and dwell time on both sides of the lateral reciprocating motion in the trajectory variables, the lateral position trajectory curve of the robot end effector within one reciprocating motion cycle is calculated. The area formed by sweeping the lateral position trajectory curve along the tangential direction of the weld centerline between adjacent discrete task points is determined as the lateral reciprocating motion envelope. Based on the deviation of the lateral reciprocating motion envelope from the center reference point, the weld distance reference value, and the lateral coverage width reference value of the local trajectory adaptation window, the weld distance deviation and the lateral coverage deviation are obtained. For each discrete task point, the weld distance deviation is used as the first component, and the lateral coverage deviation is used as the second component. A two-dimensional column vector is formed according to the order of the first component and the second component, which serves as the trajectory adaptation deviation vector corresponding to the discrete task point. When the trajectory adaptation deviation vector does not meet the preset conditions, the trajectory variables are corrected according to the trajectory adaptation deviation vector, and the pose trajectory candidate sequence is regenerated based on the corrected trajectory variables; when the trajectory adaptation deviation vector meets the preset conditions, the corresponding pose trajectory candidate sequence is determined as the target trajectory, and welding trajectory planning data is obtained; specifically: the trajectory adaptation deviation vector is compared with the preset threshold to determine whether the trajectory adaptation deviation vector meets the preset conditions. If the trajectory adaptation deviation vector does not meet the preset conditions, the variable component to be corrected in the trajectory variable is determined, a perturbation is applied to the variable component to be corrected and the trajectory adaptation deviation vector is recalculated, a sensitivity matrix is constructed based on the trajectory adaptation deviation vector before and after the perturbation and the corresponding perturbation amount, and the variable component to be corrected is corrected based on the sensitivity matrix, and a new pose trajectory candidate sequence is generated. If the trajectory adaptation deviation vector meets the preset conditions, the corresponding pose trajectory candidate sequence will be determined as the target trajectory.
2. The welding trajectory planning method for industrial robots according to claim 1, characterized in that, The process of acquiring weld seam inspection data of the workpiece to be welded includes: scanning the weld seam area of the workpiece to be welded using a three-dimensional vision sensor installed at the end of the robot to obtain three-dimensional point cloud data of the weld seam area; segmenting the three-dimensional point cloud data to obtain point cloud subsets corresponding to the two sides of the weld seam, and fitting the point cloud subsets corresponding to the two sides of the weld seam to obtain the weld seam centerline, weld seam boundary, and normal vectors of the two sides of the weld seam; determining the weld seam normal based on the normal vectors of the two sides of the weld seam, and determining the misalignment amount based on the height difference of the two sides of the weld seam along the weld seam normal.
3. The welding trajectory planning method for industrial robots according to claim 1, characterized in that, The process of obtaining the candidate sequence of pose trajectories includes: robot motion constraints including robot kinematic constraints, joint limit constraints, end-effector reachability constraints, and posture continuity constraints; determining the range of values for the robot end-effector pose and trajectory variables based on the coordinates of each discrete task point and the corresponding local trajectory adaptation window; performing inverse kinematics on the robot end-effector pose within the range of values to obtain the corresponding joint angle solutions, and filtering the joint angle solutions based on the joint limit constraints, end-effector reachability constraints, and posture continuity constraints to determine the robot end-effector pose and corresponding trajectory variables; and arranging the obtained robot end-effector pose and trajectory variables according to the arrangement order of each discrete task point on the weld centerline to obtain the candidate sequence of pose trajectories.
4. The welding trajectory planning method for industrial robots according to claim 3, characterized in that, The process of obtaining welding trajectory planning data includes: determining multiple planned work layers and work area boundaries for the workpiece to be welded based on weld inspection data and preset work layer parameters; updating the corresponding local trajectory adaptation window for the current planned work layer based on the work area boundary corresponding to the current planned work layer, and determining the target trajectory corresponding to the current planned work layer based on the updated local trajectory adaptation window; updating the work area boundary corresponding to the next planned work layer based on the target trajectory corresponding to the current planned work layer and preset work layer parameters; repeatedly determining the target trajectory corresponding to each planned work layer, and integrating the target trajectories corresponding to each planned work layer to obtain welding trajectory planning data.
Citation Information
Patent Citations
Welding robot trajectory planning method and system based on point cloud and modeling data
CN121523320A
Intelligent welding track and posture optimization method and system for complex component
CN122100187A
