Dovetail welding seam automatic grinding control method based on robot visual positioning
The global optimal grinding path is generated by robot vision positioning and B-spline curve method, and the control point set is optimized by genetic algorithm. The problem of poor adaptability of dovetail weld grinding path in the existing technology is solved, and the precise grinding and efficient assembly of dovetail welds are achieved.
Patent Information
- Application Number
- CN202510968695.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-12
AI Technical Summary
Existing automatic grinding equipment is difficult to accurately match the three-dimensional shape of the complex structure of the dovetail weld, resulting in poor adaptability of the grinding path and prone to local excessive or untimely grinding, affecting the fatigue life and assembly accuracy of the component.
Using robot vision positioning technology, the dovetail weld image data is converted into three-dimensional space coordinates through visual algorithms. The B-spline curve method and genetic algorithm are combined to generate the global optimal grinding path. The deviation is monitored in real time through the end sensor of the grinding robot, and the grinding process parameters are dynamically adjusted to ensure the grinding quality.
It achieves precise grinding of dovetail welds, improves the fatigue life and assembly accuracy of components, and ensures the adaptability and efficiency of the grinding path.
Smart Images

Figure CN120619979A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual positioning engineering, and in particular to a dovetail weld automatic grinding control method based on robot visual positioning. Background Art
[0002] In industrial manufacturing, dovetail welds are a critical connection in welded structures, and their polishing quality directly impacts the fatigue life and assembly accuracy of components. Inadequate polishing can easily lead to fatigue cracks when subjected to repeated loads, further impacting the component's service life. Furthermore, the geometric accuracy of dovetail welds significantly impacts assembly accuracy. Imprecise polishing can lead to errors during component assembly, impacting the stability and functionality of the entire structure.
[0003] However, existing automatic grinding equipment mostly uses preset fixed paths or simple algorithms to generate grinding paths, which makes it difficult to accurately match the three-dimensional shape of the complex structure of the dovetail weld, resulting in poor adaptability of the grinding path and prone to local over-grinding or inadequate grinding. Summary of the Invention
[0004] In response to the shortcomings of the existing technology, the present invention provides an automatic grinding control method for dovetail welds based on robot vision positioning, which solves the problem that existing automatic grinding equipment mostly uses preset fixed paths or simple algorithms to generate grinding paths, which makes it difficult to accurately match the three-dimensional shape of the complex structure of the dovetail weld, resulting in poor adaptability of the grinding path.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a dovetail weld automatic grinding control method based on robot vision positioning, comprising the following steps:
[0006] Step S1: After the weldment is completed, image data of the dovetail weld is collected, the image data of the dovetail weld is converted into three-dimensional spatial coordinates through a visual algorithm, and a three-dimensional point cloud of the dovetail weld is generated based on the three-dimensional spatial coordinates;
[0007] Step S2: performing smooth interpolation on the three-dimensional point cloud of the dovetail weld using a B-spline curve method to obtain a parameterized curve, and optimizing the control point set in the parameterized curve using a genetic algorithm to generate a global optimal grinding path;
[0008] Step S3: The polishing robot performs the polishing task along the global optimal polishing path. The real-time polishing path is collected by the polishing robot end sensor. The path deviation value is calculated based on the global optimal polishing path and the real-time polishing path. When the path deviation value is greater than a preset threshold, the inverse kinematics solution is triggered, and the joint angle command is sent to the polishing robot controller to correct the real-time polishing path.
[0009] Step S4: While the grinding robot is performing the grinding task, the hardness value of the dovetail weld is obtained by using laser induced breakdown spectroscopy on the dovetail weld, the hardness value of the weld matrix is obtained by retrieving a known matrix hardness database, and the comprehensive hardness value of the dovetail weld is obtained by combining the hardness value of the dovetail weld and the hardness value of the weld matrix; at the same time, the grinding robot collects the dovetail weld through a visual sensor to obtain the surface state of the weld area, and the grinding robot dynamically adjusts the grinding process parameters according to the surface state and comprehensive hardness value of the dovetail weld;
[0010] Step S5: After the grinding task is completed, the dovetail weld grinding result is detected by a visual sensor to obtain the weld angle and flatness of the dovetail weld. Based on the weld angle and flatness of the dovetail weld, it is judged whether the dovetail weld grinding result meets the design requirements. If not, the grinding path and grinding process parameters of the grinding robot are adjusted, and the dovetail weld grinding result is polished again.
[0011] Preferably, after the weldment is completed, collecting image data of the dovetail weld includes:
[0012] When the welded parts are welded, the high-resolution vision sensor mounted on the polishing robot captures images of the dovetail weld area at a fixed viewing angle;
[0013] Assume that the camera intrinsic parameter matrix is K, a point P in the dovetail weld area in the world coordinate system is w (x w ,y w ,z w ) After being projected by the camera, the coordinates on the image plane are P i (u,v), satisfies the pinhole imaging model:
[0014]
[0015] Where s is the scaling factor, R∈SO(3) is the rotation matrix, which describes the rotation relationship from the world coordinate system to the camera coordinate system, and t trans ∈R 3 is the translation vector, The camera is calibrated in advance to obtain K, R, t as the internal parameter matrix; the global shutter mode is used to reduce motion blur, and the trigger signal is synchronized with the motion of the polishing robot;
[0016] The captured image I(u,v) directly corresponds to the pixel matrix on the image plane coordinates (u,v) generated by the camera projection.
[0017] Preferably, converting the image data of the dovetail weld into three-dimensional space coordinates by a visual algorithm, and generating a three-dimensional point cloud of the dovetail weld based on the three-dimensional space coordinates includes:
[0018] 3D coordinate generation:
[0019] Process Description: Camera Coordinate System O c and the polishing robot base coordinate system O b Obtain the transformation matrix T through hand-eye calibration b←c ∈SE(3);
[0020] Known image coordinates (u, v) and depth z w , according to the inverse transformation of the pinhole model, the camera coordinates and image coordinates are P c (x c ,y c ,z c ):
[0021]
[0022] Among them, f x ,f y ,c x ,c y is the camera internal parameter, depth Derived from the parallax formula;
[0023] Then its three-dimensional coordinate P in the polishing robot base coordinate system is b (x b ,y b ,z b )for:
[0024]
[0025] Among them, R b←c is the rotation matrix, t b←c is the translation vector, T b←c It is the transformation matrix obtained through hand-eye calibration. After all edge points are transformed into coordinates, a three-dimensional point cloud of the dovetail weld is generated.
[0026] Preferably, the step of smoothly interpolating the three-dimensional point cloud of the dovetail weld using a B-spline curve method to obtain a parameterized curve includes:
[0027] Assume that the input dovetail weld 3D point cloud is The goal of path planning is to convert the point cloud into a parameterized curve Γ(t) = (x(t), y(t), z(t)), where t is limited to the interval Δt before and after the theoretical path point;
[0028] Mathematical definition of curve:
[0029] Define the control point set P = {P j ∈R 3 |j=0,1,…,n-1}, node vector U={u0,u1,…,um}(m=n+q-1, q is the order of the spline), the curve C(t) is composed of the B-spline basis function N i,q (t) linear combination, the curve equation Γ(t) is expressed as:
[0030] t∈[u q ,u m-q
[0031] Among them, P j is the jth control point, the "anchor point" that determines the shape of the curve, there are n of them in three-dimensional space; the basis function N j,q (t) is the q-order B-spline basis function, a piecewise polynomial defined on the node vector, which describes the "weight" of the local influence of the control point on the curve and has local support. t is a one-dimensional continuous variable in the B-spline curve, and the effective interval of t is [u q ,u m-q}, since m=n+q-1, then u m-q =u n-1 , that is, the domain is [u q ,u n-1 ].
[0032] Preferably, the optimizing the control point set in the parameterized curve by using a genetic algorithm to generate a global optimal polishing path comprises:
[0033] Genetic algorithm optimization:
[0034] With the goal of minimizing the total length and curvature change of the polishing path, a fitness function is constructed and the control point set P is optimized;
[0035] The objective function fitness function is defined as:
[0036]
[0037] in: is the path length; ω1 and ω2 are weight coefficients used to balance the priority of path length and curvature change optimization; ω1 has a larger weight, pursuing a shorter path; in the fine polishing stage, ω2 has a larger weight, and by strengthening the weight of the curvature penalty term, the optimization goal prioritizes path smoothness and avoids sharp turns or violent turns; is the first derivative of the curve, and its modulus represents the instantaneous velocity. After integration, the total path length is obtained. Represents the square of the modulus of the second-order derivative of the curve; the second-order derivative reflects the curvature of the curve, and its square integral is used to quantify the magnitude of the overall curvature change of the path;
[0038] Coding and genetic operations:
[0039] Coding method: Discretize the control point coordinates into real vectors:
[0040] X=[x0,y0,z0,x1,y1,z1,…,x n-1 ,y n-1 ,z n-1 ], each component corresponds to a coordinate value in three-dimensional space;
[0041] Selection operator: Roulette wheel method RWS is used to screen parent individuals. The probability of an individual being selected is proportional to its fitness value.
[0042] Crossover operator: Perform a single-point crossover operation, randomly select the crossover point of two parent individuals, exchange the gene fragments of the corresponding interval, and generate offspring individuals with a crossover probability p. c =0.8; mutation operator: the genes of the offspring individuals are mutated with a probability p m =0.01 for random perturbation, and the perturbation range is constrained by the search space boundary;
[0043] Iteration termination condition:
[0044] Set the maximum number of iterations G max When the number of iterations reaches the upper limit or the fitness value converges, the optimization process is terminated and the optimal control point set P is output. * , and substitute it into the B-spline curve equation to generate the global optimal polishing path Γ * (t).
[0045] Preferably, the path deviation value is calculated based on the global optimal grinding path and the real-time grinding path, including:
[0046] Real-time position measurement:
[0047] By obtaining the coordinates of the current tool center point in real time from the position sensor at the end of the grinding robot: real =(x real ,y real ,z real );
[0048] Position deviation calculation:
[0049] Locating the closest point of the theoretical path: on the global theoretical path Γ * (t), find the distance P real The nearest point
[0050] Calculation method: Traverse the theoretical path point set and solve the minimum Euclidean distance:
[0051]
[0052] in, is the distance Preal The nearest point, P real is the coordinate of the current tool center point, is the set of traversal-theoretic path points, represents the Euclidean distance between two points, that is The purpose of this formula is to find the point in the theoretical path point set that is closest to the actual path point for calculation and analysis of path deviation;
[0053] Calculate path deviation:
[0054]
[0055] Among them, d pos is the path deviation, reflecting the deviation size at a certain path point, P real is the coordinate of the current tool center point, is the distance P real The nearest point.
[0056] Preferably, when the path deviation value is greater than a preset threshold, inverse kinematics solution is triggered, joint angle instructions are sent to the polishing robot controller, and the real-time polishing path is corrected, including:
[0057] Deviation threshold determination:
[0058] If d pos >δ threshold , then the inverse kinematics correction is triggered;
[0059] Dynamic threshold adjustment:
[0060] Rough grinding stage: δ threshold =5mm; fine grinding stage: δ threshold =1mm;
[0061] Inverse kinematics solution
[0062] Target position setting: directly based on the nearest point of the theoretical path as the target location;
[0063] q current It is the actual joint configuration of the polishing robot at the current moment, obtained through real-time feedback from the encoder;
[0064] Inverse kinematics solution:
[0065] Δq=J T (JJ T +ξ 2 I) -1 e
[0066] Where Δq is the joint angle adjustment, d posis the path deviation of the end position; I is the identity matrix, a diagonal matrix that maintains the matrix invertibility; J is the Jacobian matrix of the polishing robot; J T is the flip matrix of the Jacobian matrix of the polishing robot; ξ is the damping factor to avoid the singularity of the Jacobian matrix, e is the position deviation vector, d pos =||e||;
[0067] Joint angle update
[0068] Calculate the new joint angles:
[0069] q new =q current +Δq
[0070] Among them, q new is the updated joint angle, Δq is the joint angle adjustment amount, q current Current joint angle vector;
[0071] According to q new , send joint angle instructions to the polishing robot controller.
[0072] Preferably, the comprehensive hardness value of the dovetail weld is obtained by combining the hardness value of the dovetail weld and the hardness value of the weld matrix, comprising:
[0073] Material hardness coefficient acquisition process:
[0074] During welding, the weld seam undergoes a rapid melting-solidification cycle, forming a cast structure accompanied by alloy element burnout and phase transformation, while the parent material generally retains a fine-grained structure from the rolled / forged state. The weld seam is generally harder than the parent material, but its toughness is reduced. A weighted balance is needed between the contributions of both to overall performance: a 70% weld seam weight focuses on the crack risk caused by excessive weld hardness; a 30% parent material weight ensures that performance degradation in the parent material's heat-affected zone does not exceed a safety threshold.
[0075] Taking the dovetail weld hardness as the main factor and the matrix hardness as the constraint, the comprehensive hardness parameters are generated through a weighted algorithm:
[0076] Real-time hardness acquisition of dovetail welds using laser-induced breakdown spectroscopy:
[0077] A pulsed laser is used to bombard the dovetail weld surface to generate plasma. The spectrometer analyzes the intensity of the characteristic spectral lines of multiple elements such as Fe / Cr / Ni, and normalizes the intensity of the characteristic spectral lines of each element to eliminate the dimension effect.
[0078] Convert the model by hardness:
[0079] H 焊缝 =c1·I Fe +c2·ICr +c3·I Ni +...+c n I n
[0080] Among them, H 焊缝 is the hardness value of the dovetail weld, c1, c2 and c3 correspond to the calibration coefficients of Fe, Cr and Ni materials respectively, c n is the calibration coefficient of the nth element, I Fe , I Cr and I Ni are the characteristic spectral line intensities of iron, chromium and nickel in laser-induced plasma, measured by spectrometer, I n is the nth element in the laser-induced plasma;
[0081] Parent body benchmark hardness matching:
[0082] According to the specific material of the dovetail weld matrix, the known matrix hardness database is retrieved to obtain the matrix hardness value H 母体 ;
[0083] Generate comprehensive hardness parameters:
[0084] According to the weighted synthesis of 70% dovetail weld hardness + 30% parent material hardness:
[0085] H 综合 =0.7H 焊缝 +0.3H 母体
[0086] Among them, H 综合 is the comprehensive hardness value of the dovetail weld, H 焊缝 is the hardness value of the dovetail weld, H 母体 It is the hardness value of the matrix, and the weight is defined based on: welding metallurgy research shows that 70% of the energy consumption during grinding is concentrated in the heat-affected zone of the dovetail weld.
[0087] Preferably, it is characterized in that the grinding robot dynamically adjusts the grinding process parameters according to the surface state and comprehensive hardness value of the dovetail weld, including: adjusting the grinding process parameters according to the working condition characteristics: Grinding process parameter calculation formula: Actual grinding pressure: P actual =k p ×P base Among them, k p is the pressure adjustment factor, P base is the reference value of grinding pressure; actual grinding speed: v actual =k v ×v base Among them, k v is the speed adjustment factor, v baseis the reference value of the grinding speed; if there are multiple working condition characteristics superimposed in the actual scene, the priority principle shall prevail: the corresponding pressure adjustment coefficient kp and speed adjustment coefficient kv are selected according to the most stringent working condition. Preferably, it is characterized in that the step S5 includes: performing least squares linear fitting on the weld edge point cloud to obtain the center line of both sides of the weld; calculating the unit normal vector v of both sides 1,实测 、v 2,实测 , solve for the angle using the vector dot product: (Same formula as S1) Where, α 实测 is the measured dovetail weld angle as a result of grinding, v 1,实测 、v 2,实测 are the normal vectors of the two sides respectively; the measured weld angle α 实测 and the designed weld angle α 设计 Compare and calculate the weld angle deviation: Δα=|α 实测 -α 设计 Where Δα is the weld angle deviation, α 实测 is the measured weld angle, α 设计 It is the design weld angle; when the weld angle deviation Δα≤1.5°, the design requirement is met; when the weld angle deviation Δα>2.0°, it needs to be corrected compulsorily;
[0088] Correction process:
[0089] Local path replanning: If Δα exceeds the threshold, the grinding path of the out-of-tolerance area is locally corrected based on the B-spline curve model of S2:
[0090] Adjust the control point P in this area i The coordinates of , regenerate the subpath;
[0091] The curvature of the subpath is optimized using a genetic algorithm to ensure that the angle deviation Δα after correction is ≤ 0.5°;
[0092] Adaptive adjustment of grinding process:
[0093] Dynamically adjust the grinding tool posture according to the angle deviation direction:
[0094] If the angle is too large, increase the grinding pressure on the outside and reduce the feed on the inside; if the angle is too small, adopt a layered grinding strategy, adjusting the tool inclination angle by 0.5° to 1.0° each time;
[0095] Flatness detection process:
[0096] Use the high-resolution visual sensor on the grinding robot to scan the weld area and obtain surface point cloud data;
[0097] Quantitative calculation of leveling:
[0098] Input: Unpolished base material point cloud N is the total number of sampling points in the point cloud;
[0099] Fitting plane equation: Set Ax+By+Cz+D=0, by minimizing the objective function:
[0100]
[0101] Among them, A, B, C are the normal vector components of the plane, which together constitute the normal vector (A, B, C), and D is the intercept of the plane, which determines the position of the plane in space;
[0102] Solve the minimization objective function and obtain the normal vector (A, B, C) and intercept D;
[0103] Output: Datum plane equation Ax+By+Cz+D=0;
[0104] Calculation of vertical distance, weld point after grinding (x n ,y n ,z n ) to the vertical distance of the reference plane:
[0105]
[0106] Where Δh g is the height deviation of the contour of the g-th sampling point, (x g ,y g ,z g ) is the coordinate of the weld point after grinding, A, B, C are the normal vector components of the plane, and D is the intercept of the plane, which determines the position of the plane in space. If Ax g +By g +Cz g +D>0, the point is in the positive direction of the normal vector and is judged to be convex, that is, Δh g is a positive deviation; if Ax g +By g +Cz g +D<0, the point is in the negative direction of the normal vector and is considered concave, i.e. Δh g is a negative deviation;
[0107] Positive deviation processing:
[0108] Arithmetic mean roughness R a :
[0109]
[0110] Among them, R a is the arithmetic mean roughness, N is the total number of measurement sampling points, Δh g is the profile height deviation of the g-th sampling point;
[0111] Maximum height difference H max :Δh g The difference between the maximum and minimum values of ;
[0112] Local area identification and path planning:
[0113] Locate the out-of-tolerance area by threshold segmentation:
[0114] Reshaping unqualified point set: {p i |Δh g |>0.2mm};
[0115] Connected domain marking, determining the continuous area that needs to be corrected;
[0116] Corrected path generation:
[0117] Based on the 8-sample curve of S2, the out-of-tolerance area is re-interpolated to generate the local optimal path;
[0118] The optimization objective of the genetic algorithm is adjusted to "minimize height deviation", and the fitness function is:
[0119]
[0120] Among them, f(P) is the fitness function, which is used to evaluate the quality of each individual P in the genetic algorithm. The smaller the value, the better the solution. P is the individual, L(Γ) is the path length, Δh g is the height deviation of the contour at the g-th sampling point, ω1 and ω2 are the weight of the height deviation and the path length weight respectively;
[0121] Negative deviation processing:
[0122] Grading treatment:
[0123] When there is a slight negative deviation, the S4 process parameters are dynamically adjusted and local fine grinding is automatically performed;
[0124] Moderate negative deviation, repair welding the concave part of the dovetail weld, and then call the S2 path optimization engine:
[0125] Negative deviation fitness function:
[0126] f(P2)=ω3∑|Δh g |+ω4max(0,-Δh g )
[0127] Among them, f(P2) is the negative deviation fitness function, which is used to evaluate the quality of each individual P in the genetic algorithm. The smaller the value, the better the solution. P is the individual, Δh g is the height deviation of the contour of the g-th sampling point, max(0,-Δh g) is to punish the downward deviation of the key target g, ignoring its upward or unchanged situation, ω3 and ω4 are the weight of the height deviation and the weight used to adjust the importance of the decline of the key target g, respectively;
[0128] Severe negative deviation: The ground weldment will be scrapped and removed from the production line;
[0129] Re-inspection and closed-loop control:
[0130] After correction, perform flatness detection again. If R a If it still exceeds 1.6μm and is corrected ≥3 times in a row or the depression height deviation is greater than 0.1mm, the following measures will be triggered: check the wear of the grinding tool; recalibrate the hand-eye transformation matrix of the visual system and the grinding robot.
[0131] Beneficial effects
[0132] The present invention provides a dovetail weld automatic grinding control method based on robot vision positioning, involving machine learning and deep learning technologies, which has the following beneficial effects:
[0133] (1) This dovetail weld automatic grinding control method based on robot vision positioning collects weld images through the visual sensor carried by the grinding robot, extracts geometric features through visual algorithms such as Gaussian filtering and Canny edge detection, and combines parallax calculation and hand-eye calibration to generate a three-dimensional point cloud, thereby achieving accurate digitization of the weld spatial position.
[0134] (2) The automatic grinding control method for dovetail welds based on robot vision positioning detects weld hardness through laser-induced breakdown spectroscopy, generates a comprehensive hardness value based on the matrix hardness database, obtains the surface state through visual scanning, and dynamically adjusts the grinding pressure and speed according to the working condition characteristics.
[0135] (3) The automatic grinding control method for dovetail welds based on robot vision positioning uses B-spline curves to smoothly interpolate the three-dimensional point cloud, combines genetic algorithms to optimize the control point set, and generates a global optimal grinding trajectory with the goal of minimizing the path length and curvature changes, ensuring smooth and efficient movement of the grinding robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0136] Figure 1 This is a flow chart of an automatic grinding control method for dovetail welds based on robot vision positioning proposed by the present invention.
[0137] Figure 2 This is a hierarchical diagram of the automatic grinding control method for dovetail welds based on robot vision positioning proposed in the present invention. DETAILED DESCRIPTION
[0138] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0139] See also Figure 1 The present invention provides a technical solution: a dovetail weld automatic grinding control method based on robot vision positioning. Specifically, the following dovetail weld automatic grinding control method based on robot vision positioning is provided, please refer to Figure 1 , the method comprises the following steps:
[0140] Step S1: After the welding of the weldment is completed, the image data of the dovetail weld is collected, and the image data of the dovetail weld is converted into three-dimensional space coordinates through a visual algorithm. Based on the three-dimensional space coordinates, a three-dimensional point cloud of the dovetail weld is generated.
[0141] When the welded parts are welded, the high-resolution visual sensor (industrial camera + lens) mounted on the polishing robot captures images of the dovetail weld area at a fixed viewing angle.
[0142] Assume that the camera intrinsic parameter matrix is K, a point P in the dovetail weld area in the world coordinate system is w (x w ,y w ,z w ) After being projected by the camera, the coordinates on the image plane are P i (u,v), satisfies the pinhole imaging model:
[0143]
[0144] Where s is the scaling factor, R∈SO(3) is the rotation matrix, which describes the rotation relationship from the world coordinate system to the camera coordinate system.
[0145] t trans ∈R 3 is the translation vector, is the internal parameter matrix (f x ,f y is the focal length, c x ,c y is the optical center coordinate), the camera is calibrated in advance to obtain K, R, t; the global shutter mode is used to reduce motion blur, and the trigger signal is synchronized with the grinding robot motion.
[0146] The collected image I(u,v) (which directly corresponds to the pixel matrix on the image plane coordinates (u,v) generated by camera projection) is subjected to Gaussian filtering and denoising, and edge detection and shape extraction are performed in sequence.
[0147] Edge detection (Canny algorithm):
[0148] First, perform Gaussian filtering on the image:
[0149]
[0150] Among them, G(u,v) represents the value of the image at the coordinate (u,v) after Gaussian filtering; I(u,v) represents the value of the original image at the coordinate (u,v); G σ (u, v) represents the value of the Gaussian kernel function at the coordinate (u, v), where σ is the standard deviation of the Gaussian kernel, which determines the smoothness of the Gaussian filter; is the normalization coefficient, ensuring that the integral of the Gaussian kernel function on the entire plane is equal to 1; is the exponential part, which represents a bell-shaped distribution centered at coordinate (0,0), and u and v represent the distance from the center in the horizontal and vertical directions, respectively.
[0151] Gradient magnitude and direction calculation: Calculate the gradient component of the Gaussian filtered image Get the gradient vector Its modulus (gradient amplitude) and direction (gradient direction) are:
[0152]
[0153] Among them, Δu and Δv represent the gradient components of the image in the horizontal direction (u direction) and the vertical direction (v direction), respectively; and It is to find the partial derivatives of the Gaussian filtered image G(u,v) with respect to u and v respectively. Reflects the edge strength (the larger the gradient amplitude, the more significant the edge); θ represents the local direction of the edge point (such as horizontal edge θ≈0°, vertical edge θ≈90°).
[0154] Through dual thresholds (high and low thresholds T h , T l )Filter edge points and retain weak edge connections:
[0155]
[0156] That is, for gradient amplitude greater than T h Pixels with gradient amplitude less than T are determined as strong edge pixels; l Pixels with gradient magnitudes between T l and T h If the pixels between them are connected to strong edge pixels, they are determined to be edge pixels, otherwise they are discarded.
[0157] Shape extraction (dovetail weld geometry):
[0158] Edge point set Least squares linear fitting was performed to obtain the dovetail weld centerline equation: ax + by + c = 0. Dovetail weld edge points may exhibit discrete deviations due to factors such as noise and uneven illumination. Least squares fitting can be noise-resistant and yield the optimal fitting line, which serves as the core benchmark for the dovetail weld's geometric characteristics.
[0159] Convex hull selection:
[0160] Find the convex hull (the smallest convex polygon that encloses all points) of the edge point set and find a set of points whose convex polygon can contain all given edge points and is the smallest (without extra edges).
[0161] Calculate the dovetail weld angle α by using the convex hull of the contour:
[0162]
[0163] Where v1 and v2 are the unit normal vectors of the two sides of the dovetail. The furthest vertices on either side of the dovetail weld are selected from the convex hull of the edge point set (the smallest convex polygon enclosing all points). The edge direction is approximated by the difference of adjacent points. The unit normal vectors v1 and v2 are then rotated 90° clockwise or counterclockwise, respectively, to obtain the corresponding unit normal vectors. The angle α of the dot product of the unit normal vectors v1 and v2 on both sides of the dovetail is then calculated using the inverse cosine function. This method can accurately quantify the shape characteristics of the dovetail weld.
[0164] 3D depth information acquisition:
[0165] Calculate the depth by the parallax of the left and right cameras (assuming the cameras are placed parallel):
[0166] Δu=u2-u1
[0167] Among them, z w represents the depth in the world coordinate system, f is the camera focal length, B is the baseline distance between the left and right cameras, Δu is the difference in the horizontal coordinates (parallax) between corresponding points in the left and right images, and u1 and u2 correspond to the horizontal coordinates of the left and right images, respectively. Depth information is combined with the 2D image coordinates to form a 3D point cloud in the camera coordinate system, which is the basis for generating the 3D coordinates of the polishing robot's base coordinate system.
[0168] 3D coordinate generation:
[0169] Process Description: Camera Coordinate System O c and the polishing robot base coordinate system O b Obtain the transformation matrix T through hand-eye calibration b←c∈SE(3) (hand-eye calibration transformation matrix from camera coordinate system to base coordinate system);
[0170] Known image coordinates (u, v) and depth z w (obtained by binocular parallax), according to the inverse transformation of the pinhole model, the camera coordinates and image coordinates are P c (x c ,y c ,z c ):
[0171]
[0172] Among them, f x ,f y ,c x ,c y is the camera internal parameter (element of K matrix), depth Derived from the parallax formula.
[0173] Then its P c (x c ,y c ,z c ) The three-dimensional coordinate P in the base coordinate system of the polishing robot b (x b ,y b ,z b )for:
[0174]
[0175] Among them, R b←c is the rotation matrix, t b←c is the translation vector, T b←c The transformation matrix is obtained through hand-eye calibration. After all edge points are transformed, a 3D point cloud of the dovetail weld is generated.
[0176] Step S2: Smoothly interpolate the three-dimensional point cloud of the dovetail weld using a B-spline curve method to obtain a parameterized curve, and optimize the control point set in the parameterized curve using a genetic algorithm to generate a global optimal grinding path.
[0177] Considering the geometric complexity of the dovetail weld, simple straight line fitting cannot meet the grinding accuracy requirements. Therefore, a path model based on B-spline and genetic algorithm is introduced to generate a global optimal path that takes into account both efficiency and smoothness.
[0178] B-spline curve modeling:
[0179] Assume that the input dovetail weld 3D point cloud is (N is the number of point clouds). The goal of path planning is to convert the point cloud into a parameterized curve Γ(t) = (x(t), y(t), z(t)), where t is limited to the interval Δt before and after the current theoretical path point.
[0180] Mathematical definition of curve:
[0181] Define the control point set P = {P j ∈R 3 |j=0,1,…,n-1}(where n is the number of control points), node vector U={u0,u1,…,u m}(m=n+q-1, q is the order of the spline). The curve C(t) is formed by the B-spline basis function N j,q (t) linear combination, the curve equation Γ(t) is expressed as:
[0182] t∈[u q ,u m-q
[0183] Among them, P j is the jth control point, j is the index of the control point, and determines the "anchor point" of the curve shape. There are n of them in total, located in three-dimensional space; the basis function N j,q (t) is the q-order B-spline basis function, a piecewise polynomial defined on the node vector, which describes the "weight" of the local influence of the control point on the curve and has local support (non-zero only in some node intervals). t is a one-dimensional continuous variable in the B-spline curve, and the valid interval of t is [u q ,u m-q Since m=n+q-1, then u m-q =u n-1 , that is, the domain is [u q ,u n-1 ].
[0184] Basis function N j,q (t) is the q-order B-spline basis function, which is calculated by the deBoor recursion formula:
[0185] Basis function initial conditions:
[0186]
[0187] Recursive relation:
[0188]
[0189] Among them, N i,0 (t) is the starting point of recursion, i is the index of the basis function, and each control point is initially controlled only by its own node interval; N i,q(t) is a high-order basis function constructed by linear combination of low-order basis functions (q-1 times), the weight is determined by the node spacing, and the numerator tu i and u i+q+1 -t represents the relative position of the current parameter t within the node interval. i+q -u i Corresponding left subbasis function N i,q-1 (t) the node interval length, u i+q+1 -u i+1 Corresponding to the right sub-basis function N i+1,q-1 (t) is the length of the node interval; when t exceeds the support interval of a certain control point, the basis function it affects automatically "disappears", making it easier to locally modify the curve shape.
[0190] Genetic algorithm optimization:
[0191] With the goal of minimizing the total length and curvature change of the polishing path, a fitness function is constructed and the control point set P is optimized.
[0192] The objective function fitness function is defined as:
[0193]
[0194] in: is the path length; ω1 and ω2 are weight coefficients used to balance the priority of path length and curvature change optimization; ω1 has a larger weight, pursuing a shorter path; in the fine polishing stage, ω2 has a larger weight, and by strengthening the weight of the curvature penalty term, the optimization goal prioritizes path smoothness and avoids sharp turns or violent turns; is the first-order derivative of the curve (tangent vector), whose modulus represents the instantaneous velocity, and the total path length is obtained after integration. Represents the square of the modulus of the second-order derivative of the curve; the second-order derivative reflects the degree of curvature of the curve (directly related to the curvature), and its square integral is used to quantify the magnitude of the overall curvature change of the path.
[0195] Coding and genetic operations:
[0196] Coding method: Discretize the control point coordinates into real vectors:
[0197] X=[x0,y0,z0,x1,y1,z1,…,x n-1 ,y n-1 ,z n-1 ], each component corresponds to a coordinate value in three-dimensional space.
[0198] Selection operator: Roulette wheel method RWS is used to screen parent individuals, and the probability of an individual being selected is proportional to its fitness value.
[0199] Crossover operator: Perform a single-point crossover operation, randomly select the crossover point of two parent individuals, exchange the gene fragments of the corresponding interval, and generate offspring individuals with a crossover probability p. c =0.8 (default value, can be adjusted according to actual situation) Mutation operator: the genes (control point coordinates) of the offspring individuals are mutated with the probability p m = 0.01 for random perturbation, and the perturbation range is constrained by the search space boundary.
[0200] Iteration termination condition:
[0201] Set the maximum number of iterations G max When the number of iterations reaches the upper limit or the fitness value converges (no significant improvement in consecutive k generations), the optimization process is terminated and the optimal control point set P is output. * , and substitute it into the B-spline curve equation to generate the global optimal polishing path Γ * (t).
[0202] In this step, the smooth interpolation of the dovetail weld point cloud is achieved through B-spline curves. The control point set is optimized in combination with a genetic algorithm so that the generated path meets the requirements of C2 continuity, shortest path length, and minimum curvature change, providing a smooth and efficient trajectory planning solution for the grinding robot.
[0203] Step S3: The polishing robot performs the polishing task along the global optimal polishing path, collects the real-time polishing path through the end sensor of the polishing robot, calculates the path deviation value based on the global optimal polishing path and the real-time polishing path, and when the path deviation value is greater than the preset threshold, triggers the inverse kinematics solution, sends the joint angle command to the polishing robot controller, and corrects the real-time polishing path.
[0204] The polishing path optimized using B-spline curves and genetic algorithms has theoretically achieved the optimal solution for path length and curvature variation. However, in actual polishing, factors such as the polishing robot's kinematic errors and workpiece clamping deviations can cause the actual path to deviate from the theoretical value. Therefore, it is necessary to monitor path deviations in real time during the polishing process and trigger a dynamic correction mechanism based on the deviation value. Next, the polishing robot's end-of-line sensor will collect position data in real time, compare it with the theoretical path, and perform inverse kinematics calculations to ensure the accuracy of the polishing trajectory.
[0205] Real-time position measurement:
[0206] By obtaining the coordinates of the current tool center point (TCP) in real time from the position sensor (such as laser tracker or encoder) at the end of the grinding robot: real =(x real ,y real ,z real );
[0207] Position deviation calculation:
[0208] Locating the closest point of the theoretical path: on the global theoretical path Γ * (t) (discrete point set or continuous curve), find the distance P real The nearest point
[0209] Calculation method: Traverse the theoretical path point set and solve the minimum Euclidean distance:
[0210]
[0211] in, is the distance P real The nearest point, P real are the coordinates of the current tool center point (TCP), is the set of traversal-theoretic path points, Represents the Euclidean distance between two points, that is The purpose of this formula is to find the point in the theoretical path point set that is closest to the actual path point for calculation and analysis of path deviation.
[0212] Calculate path deviation:
[0213]
[0214] Among them, d pos is the path deviation, reflecting the deviation size at a certain path point, P real are the coordinates of the current tool center point (TCP), is the distance P real The nearest point.
[0215] Deviation threshold determination:
[0216] If d pos >δ threshold , then the inverse kinematics correction is triggered.
[0217] Dynamic threshold adjustment:
[0218] Rough grinding stage: δ threshold =5mm; fine grinding stage: δ threshold =1mm.
[0219] Inverse kinematics solution
[0220] Target position setting: directly based on the nearest point of the theoretical path As the target position. (Note: The posture remains at the original planned value or fixed angle, and posture correction is ignored according to user requirements);
[0221] q currentIt is the actual joint configuration (joint angle) of the polishing robot at the current moment, obtained through real-time feedback from the encoder.
[0222] Inverse kinematics solution (using damped least squares DLS):
[0223] Δq=J T (JJ T +ξ 2 I) -1 e
[0224] Where Δq is the joint angle adjustment, d pos is the path deviation of the end position; I is the identity matrix, a diagonal matrix that maintains the matrix invertibility; J is the Jacobian matrix of the polishing robot (the current joint state q current Calculated below); J T is the flip matrix of the Jacobian matrix of the polishing robot; ξ is the damping factor (usually 0.01 to 0.1) to avoid the singularity of the Jacobian matrix, e is the position deviation vector, d pos =||e||.
[0225] Joint angle update
[0226] Calculate the new joint angles:
[0227] q new =q current +Δq
[0228] Among them, q new is the updated joint angle, Δq is the joint angle adjustment amount, q current The current joint angle vector.
[0229] According to q new , send joint angle instructions to the polishing robot controller.
[0230] Iteration termination condition:
[0231] Successful convergence: corrected position deviation d pos ≤δ threshold ;
[0232] Over-limit protection: The number of consecutive corrections exceeds N max If it still does not converge (5 times), an alarm will be issued and the system will be paused.
[0233] Step S4: During the polishing task performed by the polishing robot, the hardness value of the dovetail weld is obtained by using laser induced breakdown spectroscopy on the dovetail weld, the hardness value of the weld matrix is obtained by retrieving a known matrix hardness database, and the comprehensive hardness value of the dovetail weld is obtained by combining the hardness value of the dovetail weld and the hardness value of the weld matrix; at the same time, the polishing robot collects the dovetail weld through a visual sensor to obtain the surface state of the weld area, and the polishing robot dynamically adjusts the polishing process parameters according to the surface state and comprehensive hardness value of the dovetail weld.
[0234] Through real-time path correction, the grinding robot can now accurately perform grinding tasks along a preset trajectory. However, variations in the surface condition of the dovetail weld and uneven material hardness (e.g., the heat-affected zone has a higher hardness than the base material) can lead to fluctuations in grinding efficiency and surface quality. Therefore, it is necessary to dynamically adjust the grinding process parameters by combining dovetail weld hardness and surface condition data. Next, laser-induced breakdown spectroscopy (LIBS) and visual scanning will be used to obtain material properties in real time, providing data support for adaptive adjustment of grinding pressure and speed.
[0235] Material hardness coefficient acquisition process:
[0236] During the welding process, the weld area undergoes a rapid melting-solidification cycle, forming a cast structure (such as columnar crystals), accompanied by alloy element burnout and phase transformation (such as martensite formation). The parent material (substrate) usually retains the fine-grained structure of the rolled / forged state. The hardness of the weld is generally higher than that of the parent material (especially steel structures), but the toughness decreases. The contribution of the two to the overall performance needs to be balanced by weighting. 70% weld weight: focus on the crack risk caused by excessive weld hardness; 30% parent material weight: ensure that the performance degradation of the parent material heat-affected zone (HAZ) does not exceed the safety threshold.
[0237] Taking the dovetail weld hardness as the main factor and the matrix hardness as the constraint, the comprehensive hardness parameters are generated through a weighted algorithm:
[0238] Real-time hardness acquisition of dovetail welds using laser-induced breakdown spectroscopy (LIBS):
[0239] A pulsed laser (wavelength 1064nm, energy 100mJ) was used to bombard the dovetail weld surface to generate plasma. The characteristic spectral line intensities of multiple elements such as Fe, Cr, and Ni were analyzed by a spectrometer. The characteristic spectral line intensities of each element were normalized to eliminate the dimension effect.
[0240] Convert the model by hardness:
[0241] H 焊缝 =c1·I Fe +c2·I Cr +c3·I Ni +...+c nI n
[0242] Among them, H 焊缝 is the hardness value of the dovetail weld, c1, c2 and c3 correspond to the calibration coefficients of Fe, Cr and Ni materials respectively, c n is the calibration coefficient of the nth element, I Fe , I Cr and I Ni are the characteristic spectral line intensities of iron (Fe), chromium (Cr) and nickel (Ni) in laser-induced plasma, measured by spectrometer, I n It is the nth element in laser-induced plasma.
[0243] Parent body benchmark hardness matching:
[0244] According to the specific material of the dovetail weld matrix, the known matrix hardness database is retrieved to obtain the matrix hardness value H 母体 .
[0245] Generate comprehensive hardness parameters:
[0246] According to the weighted synthesis of 70% dovetail weld hardness + 30% parent material hardness:
[0247] H 综合 =0.7H 焊缝 +0.3H 母体
[0248] Among them, H 综合 is the comprehensive hardness value of the dovetail weld, H 焊缝 is the hardness value of the dovetail weld, H 母体 It is the hardness value of the matrix, and the weight is defined based on: welding metallurgy research shows that 70% of the energy consumption during grinding is concentrated in the heat-affected zone of the dovetail weld.
[0249] The visual sensor collects the dovetail weld and obtains the geometric characteristic parameters of the weld surface, including:
[0250] Surface profile coordinates: Collect the horizontal coordinates (x i ,y i ) and actual height z i (Unit: mm).
[0251] Surface condition: local depth of dovetail weld, defective area of dovetail weld
[0252] Reference plane fitting formula:
[0253] z 基准 =αx+βy+γ
[0254] Among them, z基准 is the height of the reconstructed undeformed base material plane at point (x, y) (unit: mm); α is the slope of the reference plane in the x direction (dimensionless); β is the slope of the reference plane in the y direction (dimensionless); γ is the intercept of the reference plane (unit: mm); x, y are the horizontal coordinates (unit: mm).
[0255] Local depth calculation:
[0256] Δh i =z i -z 基准 (x i ,y i )
[0257] Where Δh i is the local depth of point i, the difference between the actual height and the reference height; z i is the actual measured height of point i; z 基准 (x i ,y i ) is at coordinate (x i ,y i ) at the reference height;
[0258] Determination conditions for deep dovetail welds:
[0259] When Δh i ≥3.0mm process threshold, it is judged as a deep dovetail weld
[0260] Defective areas of dovetail welds:
[0261] Curvature calculation:
[0262]
[0263] Where κ is the curvature, the degree of surface curvature, and the larger the value, the steeper the depression. is the first derivative of the surface height z with respect to the horizontal coordinate x or y, is the second derivative of the surface height z (Laplacian operator); represents the acceleration of the change in altitude, is the gradient modulus in the z direction.
[0264] Stoma: Judgment condition: κ i >0.3mm -1 And Δh i >0.2mm, while curvature>0.3mm -1 (steep depression) and weld depth > 0.2mm (significant depression) can be determined as pores.
[0265] Point cloud preprocessing input: dovetail weld area point cloud Use curvature thresholding to segment potential crack defect regions:
[0266] {p′ j}={p i |κ(p i )>0.25mm -1}
[0267] The connected component marking algorithm is applied to mark the connected components in the 8-neighborhood connected components:
[0268] C k =ConnectedComponents({p′ j})
[0269] Where ConnectedComponents(·) is the operator of the connected component labeling algorithm, C k is the connected domain currently being processed, p′ j The curvature of the dovetail weld area point cloud is greater than 0.25mm -1 part.
[0270] Get a set of spatially continuous outlier points C = {C1, C2, ..., C M}, C is the final set of all connected components, where each Cm is a spatially continuous subset of outliers, the internal pixels are connected through 8-neighborhoods, and there is no 8-neighborhood connection between different Cm.
[0271] Principal component analysis (PCA) for each connected domain C k :
[0272] Barycentric coordinates:
[0273]
[0274] Among them, μ is the coordinate of the center of gravity of the connected domain, p i is any point cloud data point in the connected domain, C k is the connected domain currently being processed.
[0275] Covariance matrix:
[0276]
[0277] Among them, Σ is a 3×3 covariance matrix that describes the distribution characteristics of the point cloud in space, C k is the connected domain currently being processed, p i is any point cloud data point in the connected domain, and μ is the coordinate of the center of gravity of the connected domain.
[0278] Eigenvalue decomposition:
[0279] Σv j =λ j vj (j=1,2,3)
[0280] Among them, v j is the corresponding eigenvector, λ j is the eigenvalue (λ1≥λ2≥λ3) corresponding to the eigenvector vj, the eigenvalue λ of the covariance matrix Σ i Quantize the point cloud in three orthogonal directions (v i )’s discrete degree: λ1 is the main extension direction of the maximum point cloud; λ2 is the secondary extension direction of the second point cloud; λ3 is the minimum point cloud thickness direction.
[0281] The calculation formula for the total span of the point cloud in the longest direction and the total span of the point cloud in the second longest direction is:
[0282]
[0283] Among them, L major is the total span of the point cloud in the longest direction, indicating the extension direction of the crack; L minor is the total span of the point cloud in the secondary direction, indicating the width of the crack. Assuming that the point cloud obeys a three-dimensional normal distribution, and The interval contains 95% of the points in the longest and second longest directions (expanded according to the 3σ rule).
[0284] Crack judgment:
[0285] L major / L minor >5→large aspect ratio; maxΔh>0.1mm→continuous deep groove
[0286] Grinding process adjustment rules:
[0287]
[0288] Adjust the grinding process parameters according to the working conditions:
[0289] Calculation formula for grinding process parameters:
[0290] Actual grinding pressure:
[0291] P actual =k p ×P base
[0292] Among them, k p is the pressure adjustment factor, P base It is the base value of grinding pressure;
[0293] Actual grinding speed:
[0294] v actual =k v×v base
[0295] Among them, k v is the speed adjustment factor, v base It is the benchmark value of grinding speed;
[0296] If there are multiple working condition characteristics superimposed in the actual scenario, the priority principle shall prevail: select the corresponding pressure adjustment coefficient kp and speed adjustment coefficient kv according to the most stringent working condition (such as the characteristic that has the greatest impact on the processing quality, such as defective areas taking precedence over high hardness areas).
[0297] Step S5: After the grinding task is completed, the dovetail weld grinding result is detected by a visual sensor to obtain the weld angle and flatness of the dovetail weld. Based on the weld angle and flatness of the dovetail weld, it is judged whether the dovetail weld grinding result meets the design requirements. If not, the grinding path and grinding process parameters of the grinding robot are adjusted, and the dovetail weld grinding result is polished again.
[0298] Dovetail weld angle detection process:
[0299] The high-resolution visual sensor (same as S1) carried by the grinding robot is used to scan the grinding results of the dovetail weld to obtain surface point cloud data.
[0300] Through the camera intrinsic parameter matrix K and the hand-eye calibration matrix T c→b (See S1), and convert the point cloud into three-dimensional coordinates in the base coordinate system of the polishing robot.
[0301] Angle calculation method:
[0302] Perform least squares linear fitting on the weld edge point cloud to obtain the center lines of both sides of the weld (same as S1 shape extraction).
[0303] Calculate the unit normal vector v of both sides 1,实测 、v 2,实测 , solve for the angle using the vector dot product:
[0304]
[0305] Among them, α 实测 is the measured dovetail weld angle as a result of grinding, v 1,实测 、v 2,实测 are the normal vectors of the two sides respectively.
[0306] The measured weld angle α 实测 and the designed weld angle α 设计 Compare and calculate the weld angle deviation:
[0307] Δα=|α 实测 -α 设计
[0308] Where Δα is the weld angle deviation, α 实测 is the measured weld angle, α 设计 is the design weld angle.
[0309] When the weld angle deviation Δα≤1.5°, the design requirements are met; when the weld angle deviation Δα>2.0°, mandatory correction is required.
[0310] Correction process:
[0311] Local path replanning: If Δα exceeds the threshold, the grinding path of the out-of-tolerance area is locally corrected based on the B-spline curve model of S2:
[0312] Adjust the control point P in this area i The coordinates of , regenerate the subpath (maintain C2 continuity).
[0313] The curvature of the subpath is optimized using a genetic algorithm to ensure that the angle deviation Δα is ≤ 0.5° after correction.
[0314] Adaptive adjustment of grinding process
[0315] Dynamically adjust the grinding tool posture based on the angle deviation direction (such as left / right deviation):
[0316] If the angle is too large, increase the outer grinding pressure (pressure coefficient k p =1.1~1.2), reduce the inner feed; if the angle is too small, adopt a layered grinding strategy (grinding in 2 times), and adjust the tool inclination angle by 0.5°~1.0° each time.
[0317] Re-inspection process after correction:
[0318] After the correction is completed, repeat the detection steps. If Δα still exceeds 1.5°, the over-limit protection is triggered:
[0319] Pause grinding and issue an alarm, prompting manual intervention to check tooling positioning errors or visual calibration parameters (same as S1 camera calibration).
[0320] Flatness detection process:
[0321] Use the high-resolution visual sensor (same as S1) carried by the grinding robot to scan the weld area and obtain surface point cloud data;
[0322] Quantitative calculation of leveling:
[0323] Input: Unpolished base material point cloud (excluding weld area points), N is the total number of sampling points in the point cloud.
[0324] Fitting plane equation: Set Ax+By+Cz+D=0, by minimizing the objective function:
[0325] (Constraint: A 2 +B 2 +C 2 =1)
[0326] Among them, A, B, and C are the normal vector components of the plane, which together constitute the normal vector (A, B, C). D is the intercept of the plane, which determines the position of the plane in space.
[0327] Solve the minimization objective function and obtain the normal vector (A, B, C) and intercept D.
[0328] Output: Datum plane equation Ax+By+Cz+D=0.
[0329] Calculation of vertical distance, weld point after grinding (x g ,y g ,z g ) to the vertical distance of the reference plane:
[0330]
[0331] Where Δh g is the height deviation of the contour of the g-th sampling point, (x g ,y g ,z g ) is the coordinate of the weld point after grinding, A, B, C are the normal vector components of the plane, and D is the intercept of the plane, which determines the position of the plane in space. If Ax g +By g +Cz g +D>0, the point is in the positive direction of the normal vector and is judged to be convex, that is, Δh g is a positive deviation; if Ax g +By g +Cz g +D<0, the point is in the negative direction of the normal vector and is considered concave, i.e. Δh g is a negative deviation.
[0332] Positive deviation treatment (Δh g >0):
[0333] Calculate the arithmetic mean roughness R a :
[0334]
[0335] Among them, R a is the arithmetic mean roughness, N is the total number of measurement sampling points, Δh gis the contour height deviation of the g-th sampling point.
[0336] Maximum height difference H max :Δh g The difference between the maximum and minimum values of .
[0337] Flatness judgment criteria and tolerance threshold:
[0338]
[0339] Local area identification and path planning:
[0340] Locate the out-of-tolerance area by threshold segmentation:
[0341] Reshaping unqualified point set: {p i |Δh g |>0.2mm};
[0342] Connected domain marking (same as the 8-neighborhood algorithm of S4 stomatal detection) determines the continuous area that needs to be corrected.
[0343] Corrected path generation:
[0344] Based on the 8-sample curve of S2, the out-of-tolerance area is re-interpolated to generate the local optimal path (sampling point spacing ≤ 0.2 mm);
[0345] The optimization objective of the genetic algorithm is adjusted to "minimize height deviation", and the fitness function is:
[0346]
[0347] Among them, f(P) is the fitness function, which is used to evaluate the quality of each individual (solution) P in the genetic algorithm. The smaller the value, the better the solution. P is the individual, L(Γ) is the path length, Δh g is the height deviation of the contour at the g-th sampling point, ω1 and ω2 are the weight of the height deviation and the path length weight, respectively (ω1 = 0.7 is the height deviation weight, ω2 = 0.3 is the path length weight).
[0348] Negative deviation processing (Δh g <0):
[0349] Grading treatment:
[0350] When the small negative deviation (-0.1mm≤Δh g <0), triggering dynamic adjustment of S4 process parameters and automatically performing local fine grinding (single removal amount ≤ 0.05mm);
[0351] Moderate negative deviation (-0.3mm<Δh g<-0.1mm), repair the concave part of the dovetail weld, and then call the S2 path optimization engine:
[0352] Negative deviation fitness function:
[0353] f(P2)=ω3∑|Δh g |+ω4max(0,-Δh g )(Based on step s2)
[0354] Among them, f(P2) is the negative deviation fitness function, which is used to evaluate the quality of each individual (solution) P in the genetic algorithm. The smaller the value, the better the solution. P is the individual, Δh g is the height deviation of the contour of the g-th sampling point, max(0,-Δh g ) is to punish the downward deviation of the key target g and ignore its upward or unchanged situation. ω3 and ω4 are the weight of the height deviation and the weight used to adjust the importance of the decline of the key target g, respectively.
[0355] Severe negative deviation (Δh g <-0.3mm): The ground weldment is scrapped and removed from the production line.
[0356] Re-inspection and closed-loop control:
[0357] After correction, perform flatness detection again. If R a If the deviation is still greater than 1.6 μm and the correction is repeated for ≥3 times or the concave height deviation is greater than 0.1 mm, the following measures will be triggered: check the wear of the grinding tool (such as whether the grinding wheel grain size matches); recalibrate the hand-eye transformation matrix of the visual system and the grinding robot (same as T v→r calibration).
[0358] Summary: This invention uses a polishing robot vision sensor to accurately identify the position and geometric features of welds, ensuring that the polishing path precisely aligns with the weld shape. Especially for complex dovetail welds, the vision system provides real-time feedback on subtle changes in the weld surface, enabling real-time correction of the polishing path during the polishing process. This avoids the errors and unevenness that can occur with traditional manual polishing, thereby achieving consistent and high-precision processing of the weld surface. After polishing, the weld angle and flatness are inspected. If they do not meet design requirements, the path and process parameters are adjusted and polishing is repeated, forming a closed-loop quality control system.
[0359] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions. The sentence "including an element defined by..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element."
[0360] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A dovetail weld automatic grinding control method based on robot vision positioning, characterized in that: The method comprises the following steps: Step S1: After the weldment is completed, image data of the dovetail weld is collected, the image data of the dovetail weld is converted into three-dimensional spatial coordinates through a visual algorithm, and a three-dimensional point cloud of the dovetail weld is generated based on the three-dimensional spatial coordinates; Step S2: performing smooth interpolation on the three-dimensional point cloud of the dovetail weld using a B-spline curve method to obtain a parameterized curve, and optimizing the control point set in the parameterized curve using a genetic algorithm to generate a global optimal grinding path; Step S3: The polishing robot performs the polishing task along the global optimal polishing path. The real-time polishing path is collected by the polishing robot end sensor. The path deviation value is calculated based on the global optimal polishing path and the real-time polishing path. When the path deviation value is greater than a preset threshold, the inverse kinematics solution is triggered, and the joint angle command is sent to the polishing robot controller to correct the real-time polishing path. Step S4: While the grinding robot is performing the grinding task, the hardness value of the dovetail weld is obtained by using laser induced breakdown spectroscopy on the dovetail weld, the hardness value of the weld matrix is obtained by retrieving a known matrix hardness database, and the comprehensive hardness value of the dovetail weld is obtained by combining the hardness value of the dovetail weld and the hardness value of the weld matrix; at the same time, the grinding robot collects the dovetail weld through a visual sensor to obtain the surface state of the weld area, and the grinding robot dynamically adjusts the grinding process parameters according to the surface state and comprehensive hardness value of the dovetail weld; Step S5: After the grinding task is completed, the dovetail weld grinding result is detected by a visual sensor to obtain the weld angle and flatness of the dovetail weld. Based on the weld angle and flatness of the dovetail weld, it is judged whether the dovetail weld grinding result meets the design requirements. If not, the grinding path and grinding process parameters of the grinding robot are adjusted, and the dovetail weld grinding result is polished again.
2. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 1 is characterized in that: After the weldment is completed, image data of the dovetail weld is collected, including: When the welded parts are welded, the high-resolution vision sensor mounted on the polishing robot captures images of the dovetail weld area at a fixed viewing angle; Assume that the camera intrinsic parameter matrix is K, a point P in the dovetail weld area in the world coordinate system is w (x w ,y w ,z w ) After being projected by the camera, the coordinates on the image plane are P i (u,v), satisfies the pinhole imaging model: Where s is the scaling factor, R∈SO(3) is the rotation matrix, which describes the rotation relationship from the world coordinate system to the camera coordinate system, and t trans ∈R 3 is the translation vector, The camera is calibrated in advance to obtain K, R, t as the internal parameter matrix; the global shutter mode is used to reduce motion blur, and the trigger signal is synchronized with the motion of the polishing robot; The captured image I(u,v) directly corresponds to the pixel matrix on the image plane coordinates (u,v) generated by the camera projection.
3. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 2 is characterized in that: The method of converting the image data of the dovetail weld into three-dimensional space coordinates by a visual algorithm and generating a three-dimensional point cloud of the dovetail weld based on the three-dimensional space coordinates includes: 3D coordinate generation: Process Description: Camera Coordinate System O c and the polishing robot base coordinate system O b Obtain the transformation matrix T through hand-eye calibration b←c ∈SE(3); Known image coordinates (u, v) and depth z w , according to the inverse transformation of the pinhole model, the camera coordinates and image coordinates are P c (x c ,y c ,z c ): Among them, f x ,f y ,c x ,c y is the camera internal parameter, depth Derived from the parallax formula; Then its three-dimensional coordinate P in the polishing robot base coordinate system is b (x b ,y b ,z b )for: Among them, R b←c is the rotation matrix, t b←c is the translation vector, T b←c It is the transformation matrix obtained through hand-eye calibration. After all edge points are transformed into coordinates, a three-dimensional point cloud of the dovetail weld is generated.
4. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 3 is characterized in that: The method of smoothly interpolating the three-dimensional point cloud of the dovetail weld using the B-spline curve method to obtain a parameterized curve includes: Assume that the input dovetail weld 3D point cloud is The goal of path planning is to convert the point cloud into a parameterized curve Γ(t) = (x(t), y(t), z(t)), where t is limited to the interval Δt before and after the theoretical path point; Mathematical definition of curve: Define the control point set P = {P j ∈R 3 |j=0,1,…,n-1}, node vector U={u0,u1,…,u m }(m=n+q-1, q is the order of the spline), the curve C(t) is composed of the B-spline basis function N i,q (t) linear combination, the curve equation Γ(t) is expressed as: Among them, P j is the jth control point, the "anchor point" that determines the shape of the curve, there are n of them in three-dimensional space; the basis function N j,q (t) is the q-order B-spline basis function, a piecewise polynomial defined on the node vector, which describes the "weight" of the local influence of the control point on the curve and has local support. t is a one-dimensional continuous variable in the B-spline curve, and the effective interval of t is [u q ,u m-q ], since m=n+q-1, then u m-q =u n-1 , that is, the domain is [u q ,u n-1 ].
5. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 4 is characterized in that: The method of optimizing the control point set in the parameterized curve using a genetic algorithm to generate a global optimal polishing path includes: Genetic algorithm optimization: With the goal of minimizing the total length and curvature change of the polishing path, a fitness function is constructed and the control point set P is optimized; The objective function fitness function is defined as: in: is the path length; ω1 and ω2 are weight coefficients used to balance the priority of path length and curvature change optimization; ω1 has a larger weight, pursuing a shorter path; in the fine polishing stage, ω2 has a larger weight, and by strengthening the weight of the curvature penalty term, the optimization goal prioritizes path smoothness and avoids sharp turns or violent turns; is the first derivative of the curve, and its modulus represents the instantaneous velocity. After integration, the total path length is obtained. Represents the square of the modulus of the second-order derivative of the curve; the second-order derivative reflects the curvature of the curve, and its square integral is used to quantify the magnitude of the overall curvature change of the path; Coding and genetic operations: Coding method: Discretize the control point coordinates into real vectors: X=[x0,y0,z0,x1,y1,z1,…,x n-1 ,y n-1 ,z n-1 ], each component corresponds to a coordinate value in three-dimensional space; Selection operator: Roulette wheel method RWS is used to screen parent individuals. The probability of an individual being selected is proportional to its fitness value. Crossover operator: Perform a single-point crossover operation, randomly select the crossover point of two parent individuals, exchange the gene fragments of the corresponding interval, and generate offspring individuals with a crossover probability p. c =0.8; mutation operator: the genes of the offspring individuals are mutated with a probability p m =0.01 for random perturbation, and the perturbation range is constrained by the search space boundary; Iteration termination condition: Set the maximum number of iterations G max When the number of iterations reaches the upper limit or the fitness value converges, the optimization process is terminated and the optimal control point set P is output. * , and substitute it into the B-spline curve equation to generate the global optimal polishing path Γ * (t).
6. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 5 is characterized in that: Based on the global optimal grinding path and the real-time grinding path, the path deviation value is calculated, including: Real-time position measurement: By obtaining the coordinates of the current tool center point in real time from the position sensor at the end of the grinding robot: real =(x real ,y real ,z real ); Position deviation calculation: Locating the closest point of the theoretical path: on the global theoretical path Γ * (t), find the distance P real The nearest point Calculation method: Traverse the theoretical path point set and solve the minimum Euclidean distance: in, is the distance P real The nearest point, P real is the coordinate of the current tool center point, is the set of traversal-theoretic path points, represents the Euclidean distance between two points, that is The purpose of this formula is to find the point in the theoretical path point set that is closest to the actual path point for calculation and analysis of path deviation; Calculate path deviation: Among them, d pos is the path deviation, reflecting the deviation size at a certain path point, P real is the coordinate of the current tool center point, is the distance P real The nearest point.
7. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 6 is characterized in that: When the path deviation value is greater than a preset threshold, the inverse kinematics solution is triggered, and the joint angle command is sent to the polishing robot controller to correct the real-time polishing path, including: Deviation threshold determination: If d pos >δ threshold , then the inverse kinematics correction is triggered; Dynamic threshold adjustment: Rough grinding stage: δ threshold =5mm; fine grinding stage: δ threshold =1mm; Inverse kinematics solution Target position setting: directly based on the nearest point of the theoretical path as the target location; q current It is the actual joint configuration of the polishing robot at the current moment, obtained through real-time feedback from the encoder; Inverse kinematics solution: Δq=J T (JJ T +ξ 2 I) -1 e Where Δq is the joint angle adjustment, d pos is the path deviation of the end position; I is the identity matrix, a diagonal matrix that maintains the matrix invertibility; J is the Jacobian matrix of the polishing robot; J T is the flip matrix of the Jacobian matrix of the polishing robot; ξ is the damping factor to avoid the singularity of the Jacobian matrix, e is the position deviation vector, d pos =||e||; Joint angle update Calculate the new joint angles: q new =q current +Δq Among them, q new is the updated joint angle, Δq is the joint angle adjustment amount, q current Current joint angle vector; According to q new , send joint angle instructions to the polishing robot controller.
8. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 7 is characterized in that: The comprehensive hardness value of the dovetail weld is obtained by combining the hardness value of the dovetail weld and the hardness value of the weld matrix, including: Material hardness coefficient acquisition process: During welding, the weld seam undergoes a rapid melting-solidification cycle, forming a cast structure accompanied by alloy element burnout and phase transformation, while the parent material generally retains a fine-grained structure from the rolled / forged state. The weld seam is generally harder than the parent material, but its toughness is reduced. A weighted balance is needed between the contributions of both to overall performance: a 70% weld seam weight focuses on the crack risk caused by excessive weld hardness; a 30% parent material weight ensures that performance degradation in the parent material's heat-affected zone does not exceed a safety threshold. Taking the dovetail weld hardness as the main factor and the matrix hardness as the constraint, the comprehensive hardness parameters are generated through a weighted algorithm: Real-time hardness acquisition of dovetail welds using laser-induced breakdown spectroscopy: A pulsed laser is used to bombard the dovetail weld surface to generate plasma. The spectrometer analyzes the intensity of the characteristic spectral lines of multiple elements such as Fe / Cr / Ni, and normalizes the intensity of the characteristic spectral lines of each element to eliminate the dimension effect. Convert the model by hardness: H 焊缝 =c1·I Fe +c2·I Cr +c3·I Ni +...+c n ·I n Among them, H 焊缝 is the hardness value of the dovetail weld, c1, c2 and c3 correspond to the calibration coefficients of Fe, Cr and Ni materials respectively, c n is the calibration coefficient of the nth element, I Fe , I Cr and I Ni are the characteristic spectral line intensities of iron, chromium and nickel in laser-induced plasma, measured by spectrometer, I n is the nth element in the laser-induced plasma; Parent body benchmark hardness matching: According to the specific material of the dovetail weld matrix, the known matrix hardness database is retrieved to obtain the matrix hardness value H 母体 ; Generate comprehensive hardness parameters: According to the weighted synthesis of 70% dovetail weld hardness + 30% parent material hardness: <h2 style=";text-align:left;direction:ltr">H<h2 style=";text-align:left;direction:ltr"> 综合 <h2 style=";text-align:left;direction:ltr"> <0.7H<h2 style=";text-align:left;direction:ltr"> 焊缝 <h2 style=";text-align:left;direction:ltr"> +0.3H<h2 style=";text-align:left;direction:ltr"> 母体 Among them, H 综合 is the comprehensive hardness value of the dovetail weld, H 焊缝 is the hardness value of the dovetail weld, H 母体 It is the hardness value of the matrix, and the weight is defined based on: welding metallurgy research shows that 70% of the energy consumption during grinding is concentrated in the heat-affected zone of the dovetail weld.
9. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 8 is characterized in that: The grinding robot dynamically adjusts the grinding process parameters according to the surface condition and comprehensive hardness value of the dovetail weld, including: Adjust the grinding process parameters according to the working conditions: Calculation formula for grinding process parameters: Actual grinding pressure: P actual =k p ×P base Among them, k p is the pressure adjustment factor, P base It is the base value of grinding pressure; Actual grinding speed: v actual =k v ×v base Among them, k v is the speed adjustment factor, v base It is the benchmark value of grinding speed; If multiple operating conditions are superimposed in the actual scenario, the priority principle shall prevail: select the corresponding pressure adjustment coefficient kp and speed adjustment coefficient kv according to the most stringent operating condition.
10. The automatic grinding control method for dovetail welds based on robot vision positioning according to claim 9, characterized in that: The step S5 comprises: Perform least squares linear fitting on the weld edge point cloud to obtain the center lines of both sides of the weld; Calculate the unit normal vector v of both sides 1,实测 、v 2,实测 , solve for the angle using the vector dot product: Among them, α 实测 is the measured dovetail weld angle as a result of grinding, v 1,实测 、v 2,实测 are the normal vectors of the two sides respectively; The measured weld angle α 实测 and the designed weld angle α 设计 Compare and calculate the weld angle deviation: Dα=|α 实测 -a 设计 Where Δα is the weld angle deviation, α 实测 is the measured weld angle, α 设计 is the design weld angle; When the weld angle deviation Δα≤1.5°, the design requirements are met; when the weld angle deviation Δα>2.0°, mandatory correction is required; Correction process: Local path replanning: If Δα exceeds the threshold, the grinding path of the out-of-tolerance area is locally corrected based on the B-spline curve model of S2: Adjust the control point P in this area i The coordinates of , regenerate the subpath; The curvature of the subpath is optimized using a genetic algorithm to ensure that the angle deviation Δα after correction is ≤ 0.5°; Adaptive adjustment of grinding process: Dynamically adjust the grinding tool posture according to the angle deviation direction: If the angle is too large, increase the grinding pressure on the outside and reduce the feed on the inside; if the angle is too small, adopt a layered grinding strategy, adjusting the tool inclination angle by 0.5° to 1.0° each time; Flatness detection process: Use the high-resolution visual sensor on the grinding robot to scan the weld area and obtain surface point cloud data; Quantitative calculation of leveling: Input: Unpolished base material point cloud N is the total number of sampling points in the point cloud; Fitting plane equation: Set Ax+By+Cz+D=0, by minimizing the objective function: Among them, A, B, C are the normal vector components of the plane, which together constitute the normal vector (A, B, C), and D is the intercept of the plane, which determines the position of the plane in space; Solve the minimization objective function and obtain the normal vector (A, B, C) and intercept D; Output: Datum plane equation Ax+By+Cz+D=0; Calculation of vertical distance, weld point after grinding (x n ,y n ,z n ) to the vertical distance of the reference plane: Where Δh g is the height deviation of the contour of the g-th sampling point, (x g ,y g ,z g ) is the coordinate of the weld point after grinding, A, B, C are the normal vector components of the plane, and D is the intercept of the plane, which determines the position of the plane in space. If Ax g +By g +Cz g +D>0, the point is in the positive direction of the normal vector and is judged to be convex, that is, Δh g is a positive deviation; if Ax g +By g +Cz g +D<0, the point is in the negative direction of the normal vector and is considered concave, i.e. Δh g is a negative deviation; Positive deviation processing: Arithmetic mean roughness R a : Among them, R a is the arithmetic mean roughness, N is the total number of measurement sampling points, Δh g is the profile height deviation of the g-th sampling point; Maximum height difference H max :Δh g The difference between the maximum and minimum values of ; Local area identification and path planning: Locate the out-of-tolerance area by threshold segmentation: Reshaping unqualified point set: {p i |Δh g |>0.2mm}; Connected domain marking, determining the continuous area that needs to be corrected; Corrected path generation: Based on the 8-sample curve of S2, the out-of-tolerance area is re-interpolated to generate the local optimal path; The optimization objective of the genetic algorithm is adjusted to "minimize height deviation", and the fitness function is: Among them, f(P) is the fitness function, which is used to evaluate the quality of each individual P in the genetic algorithm. The smaller the value, the better the solution. P is the individual, L(Γ) is the path length, Δh g is the height deviation of the contour at the g-th sampling point, ω1 and ω2 are the weight of the height deviation and the path length weight respectively; Negative deviation processing: Grading treatment: When there is a slight negative deviation, the S4 process parameters are dynamically adjusted and local fine grinding is automatically performed; Moderate negative deviation, repair welding the concave part of the dovetail weld, and then call the S2 path optimization engine: Negative deviation fitness function: f(P2)=ω3∑|Δh g |+ω4max(0,-Δh g ) Among them, f(P2) is the negative deviation fitness function, which is used to evaluate the quality of each individual P in the genetic algorithm. The smaller the value, the better the solution. P is the individual, Δh g is the height deviation of the contour of the g-th sampling point, max(0,-Δh g ) is to punish the downward deviation of the key target g, ignoring its upward or unchanged situation, ω3 and ω4 are the weight of the height deviation and the weight used to adjust the importance of the decline of the key target g, respectively; Severe negative deviation: The ground weldment will be scrapped and removed from the production line; Re-inspection and closed-loop control: After correction, perform flatness detection again. If R a If it still exceeds 1.6μm and is corrected ≥3 times in a row or the depression height deviation is greater than 0.1mm, the following measures will be triggered: check the wear of the grinding tool; recalibrate the hand-eye transformation matrix of the visual system and the grinding robot.
Citation Information
Cited By
Machining track generation method and system of side edge grinding equipment
CN120941260A
Tubular pile end face polishing method and system based on sensor data interaction
CN121302929A
Insulated cable on-line monitoring method and device
CN121385557A
Thin plate welding seam polishing control method
CN121733436A
Laser welding self-adaptive path planning method and system
CN121847963A