A method for compensating the trajectory error of robot gluing
Through trajectory image acquisition based on grid background and finite element method inverse solution combined with B-spline curve fitting, the problem of low end position accuracy of high-speed moving robot arms is solved, and efficient and accurate trajectory error compensation is achieved, which is suitable for high-precision robot arms motion control.
Patent Information
- Application Number
- CN202411840834.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-12-13
AI Technical Summary
In high-speed motion state, the end position accuracy of the robot arm is low, especially in the multi-degree of freedom robot arm, the mutual influence of each joint will aggravate the trajectory error. The existing real-time compensation method is complex and costly, making it difficult to ensure accuracy.
The trajectory image acquisition method based on grid background is adopted, and the finite element method is reverse solution and B-spline fitting, combined with the glue liquid landing theoretical model and deflection angle optimization, high-precision compensation of trajectory points is achieved, reducing the dependence on camera internal parameters, and simplifying the operation process.
No high-precision vision sensors and complex camera calibration are required, which improves the accuracy and efficiency of trajectory extraction, improves the accuracy and efficiency of robotic arm motion control, and is suitable for scenarios with high accuracy requirements.
Smart Images

Figure CN119760285B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of trajectory optimization, and particularly relates to a method for compensating the trajectory error of a robot for gluing. Background Technique
[0002] With the complication of the application scenarios of robotic arms, robots are constantly developing towards higher speed, higher acceleration, higher precision and lighter weight, resulting in increased flexibility of their mechanisms. The influence of inertial forces and centrifugal forces on joints and end effectors will be significantly enhanced, and elastic vibrations during the operation of the mechanism will also increase. These dynamic effects will cause deviations in the displacement, speed and acceleration of joints, thus causing position errors of the end effector. Especially in multi-degree-of-freedom robotic arms, the mutual influence of each joint will exacerbate this deviation. Therefore, it is particularly important to compensate for the trajectory error of the robotic arm under high-speed motion conditions.
[0003] The methods for compensating the trajectory error of a robot are mainly divided into real-time compensation and post-compensation. Although real-time compensation can immediately correct errors, it is difficult to implement, costly, and complex to operate. It requires writing complex control algorithms and coordinating the collaborative work of multiple parts such as robots and sensors (such as cameras), and it is difficult to guarantee the accuracy. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for compensating the trajectory error of a robot for gluing to solve the problem of low position accuracy of the end of the robotic arm under high-speed motion conditions.
[0005] To achieve the above purpose, the technical solutions adopted by the present invention are as follows:
[0006] A method for compensating the trajectory error of a robot for gluing, the method for compensating the trajectory error of a robot for gluing includes:
[0007] Step 1, obtaining a trajectory image of the robot for gluing according to the target trajectory points based on a grid background;
[0008] Step 2, extracting the initial trajectory points in the trajectory image, correcting each initial trajectory point through a reverse solution method of the finite element method, and fitting the corrected initial trajectory points with a B-spline curve to obtain the final actual trajectory points;
[0009] Step 3, obtaining the offset amount of the glue drop at the target trajectory points according to the theoretical model of the glue drop landing point;
[0010] Step 4, deflecting the actual trajectory points according to the deflection angle to obtain deflected trajectory points, and obtaining compensated trajectory points according to the target trajectory points and the deflected trajectory points;
[0011] Step 5, superimposing the offset amount of the glue drop at the compensated trajectory points to obtain the offset trajectory points for gluing, and calculating the first error amount based on the offset trajectory points for gluing and the target trajectory points;
[0012] Step 6: Continuously and incrementally update the deflection angle, and then return to Step 4 until the deflection angle exceeds the deflection range, obtaining multiple compensated trajectory points and corresponding first error amounts. Select the compensated trajectory point with the smallest first error amount as the optimized target trajectory point;
[0013] Step 7: Control the robot to apply glue according to the optimized target trajectory point, and obtain the optimized actual trajectory point. Calculate the second error amount between the optimized actual trajectory point and the target trajectory point. If the second error amount meets the accuracy requirements, output the optimized target trajectory point and end; otherwise, return to Step 1 and execute again.
[0014] The following also provides several optional methods, which are not additional limitations to the above overall solution, but only further supplements or optimizations. Without technical or logical contradictions, each optional method can be combined with the above overall solution alone, or multiple optional methods can be combined with each other.
[0015] Preferably, the extraction of the initial trajectory points from the trajectory image includes:
[0016] Preprocess the trajectory image to obtain a trajectory line including an inner contour and an outer contour;
[0017] Collect the coordinates of all black pixel points in the preprocessed trajectory image, and fit a curve by the least squares method;
[0018] Discretize the curve into several discrete points, and draw normal lines between each pair of adjacent discrete points. The normal lines intersect with the inner contour and the outer contour respectively, and take the midpoint of the intersection points of the inner contour and the outer contour as the extracted initial trajectory points.
[0019] Preferably, the correction of each initial trajectory point by the inverse solution method of the finite element method includes:
[0020] Select a standard grid template, and perform pixel matching between the grid template and the grid background in the trajectory image to obtain a matching map;
[0021] Select a point on the matching map as the coordinate origin and establish a plane coordinate system to obtain the pixel coordinates of all pixel points in this coordinate system. According to the size of the grid template, obtain the actual coordinates of the four vertices and the center point of each matching unit in the matching map;
[0022] Use the inverse solution method of the finite element method to calculate the true coordinates of the initial trajectory point as follows:
[0023] Establish a quadrilateral element: Select four known coordinate points around the initial trajectory point as the four vertices of the quadrilateral element. The true coordinates are (x1, y1), (x2, y2), (x3, y3), and (x4, y4) respectively, and the pixel coordinates are (p1, q1), (p2, q2), (p3, q3), and (p4, q4) respectively. The pixel coordinates (p, q) of the initial trajectory point are within the quadrilateral element;
[0024] Define the shape function N k (ξ, η) of the quadrilateral element, k = 1, 2, 3, 4 is shown as follows:
[0025]
[0026] Construct the interpolation function as follows, and inversely solve the relative coordinates (ξ, η) of the initial trajectory point in the parent element:
[0027]
[0028] From the interpolation function as follows, solve the true coordinates (x, y) of the trajectory point in the sub - element:
[0029]
[0030] Correct each initial trajectory point in turn to obtain the true coordinates of the initial trajectory point as the actual trajectory point.
[0031] Preferably, the construction process of the theoretical model of the glue drop landing point is as follows:
[0032] Given the motion position and motion time interval of the robot, the speed v of the robot's end - effector i The calculation formula is as follows:
[0033]
[0034] In the formula, v i represents the speed of the robot's end - effector corresponding to the i - th target trajectory point, (x i , y i ) represents the coordinates of the i - th target trajectory point, (x i-1 , y i-1 ) represents the coordinates of the (i - 1) - th target trajectory point, and dt represents the motion time interval;
[0035] The calculation formulas for the sine and cosine values of the speed direction angle are as follows:
[0036]
[0037] In the formula, sinθ iIt represents the sine value of the velocity direction angle of the robot's end effector corresponding to the i-th target trajectory point, cosθ i It represents the cosine value of the velocity direction angle of the robot's end effector corresponding to the i-th target trajectory point;
[0038] Given that the velocity of the glue liquid spraying downward from the nozzle is v′ and the height from the nozzle to the working surface is h, the calculation formula for the dripping time t of the glue liquid is as follows:
[0039]
[0040] In the formula, g is the acceleration due to gravity;
[0041] Then the calculation formula for the deviation radius of the glue liquid is as follows:
[0042]
[0043] Considering the influence of the deformation of the robot mechanism under high-speed working conditions, taking the mechanism deformation coefficient as k, the calculation formula for the offset of the glue liquid landing point is as follows:
[0044] Δx = (k·v i +r i )cosθ i
[0045] Δy = (k·v i +r i )sinθ i
[0046] In the formula, r i represents the deviation radius of the glue liquid corresponding to the i-th target trajectory point, Δx represents the offset of the glue liquid landing point on the x-axis, and Δy represents the offset of the glue liquid landing point on the y-axis.
[0047] Preferably, the initial value of the deflection angle is 0.
[0048] Preferably, obtaining the compensation trajectory points according to the target trajectory points and the deflection trajectory points includes:
[0049] Taking the i-th target trajectory point (x i ,y i ) as a reference, determining the point symmetric to the i-th deflection trajectory point (x Ti ,y Ti ) at an equal distance in the reverse direction as the compensation trajectory point. Then the calculation formula for the i-th compensation trajectory point (x Ri ,y Ri ) is as follows:
[0050] x Ri =2x i -x Ti
[0051] y Ri = 2y i -y Ti
[0052] In the formula, x Ri represents the x-axis coordinate value of the i-th compensated trajectory point, and y Ri represents the y-axis coordinate value of the i-th compensated trajectory point, and x i represents the x-axis coordinate value of the i-th target trajectory point, and y i represents the y-axis coordinate value of the i-th target trajectory point, and x Ti represents the x-axis coordinate value of the i-th deflection trajectory point, and y Ti is the y-axis coordinate value of the i-th deflection trajectory point.
[0053] A method for compensating the trajectory error of a robot provided by the present invention has the following beneficial effects compared with the prior art:
[0054] (1) No need for high-precision calibration technology of camera internal parameters: Traditional vision processing systems rely on precise calibration of cameras and must obtain camera internal parameters (such as focal length, optical center, distortion coefficient, etc.) to achieve coordinate system conversion and error correction. The present invention does not require a high-precision vision sensor, nor does it require complex camera calibration. By using an inexpensive camera and simple operations, relatively high precision can be achieved, reducing the equipment and technical thresholds. This method is also insensitive to image distortion or warping of the grid paper. The reference relationship of the grid paper is utilized in the algorithm to ensure the calibration accuracy.
[0055] (2) High-precision extraction of the trajectory and coordinate calculation based on the grid background: To obtain the true coordinates of the trajectory points, different from traditional interpolation methods (such as linear interpolation, polynomial interpolation), the present invention uses a high-precision background grid and the four-node interpolation shape function in the finite element method to accurately calculate the actual coordinate points. This idea of combining the grid background with the finite element method has a certain novelty in the field of robot trajectory compensation.
[0056] (3) Obtaining a high-precision trajectory by B-spline curve fitting: During the trajectory extraction process, problems such as depressions or discontinuities may exist in the trajectory line due to uneven gluing or improper image processing. The present invention uses a B-spline curve to fit the trajectory points to generate a complete and smooth trajectory curve. This fitting method can further improve the smoothness and continuity of the trajectory, effectively improving the accuracy and efficiency of trajectory extraction and solving the problem of uneven or discontinuous distribution of trajectory points.
[0057] (4)Combination of theoretical model and optimization compensation: A theoretical model of the glue droplet landing point considering the coating jet direction, height, speed, and the motion parameters of the robot end effector is constructed. Through iterative calculation of the angle increment, the optimal compensation point is found. This method of combining physical models with algorithm optimization ensures the convergence of the compensation results and improves the accuracy and efficiency of compensation.
[0058] (5)Application of the compensation method combining simulation and actuality: By combining the two-step optimization method of optimizing compensation through the theoretical model and actual compensation, the iterative times of trajectory optimization are effectively reduced, the operation process is optimized, and the accuracy of the compensation results is improved.
[0059] (6)Improving the motion control accuracy of the robotic arm: Through the combination of the above-mentioned various innovative technologies, the present invention realizes the control of the high-precision motion trajectory of the robotic arm, greatly improving the overall efficiency and accuracy of trajectory extraction, error compensation, and trajectory fitting, and is applicable to scenarios with high-precision requirements for robotic arm motion control. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 is a flowchart of a method for compensating the trajectory error of glue coating of a robot according to the present invention;
[0061] Figure 2 is a schematic diagram of a Delta parallel robot according to the present invention;
[0062] Figure 3 is a schematic diagram of an embodiment of the trajectory image obtained according to the present invention;
[0063] Figure 4 is a schematic diagram of an embodiment of the trajectory image after preprocessing according to the present invention;
[0064] Figure 5 is a schematic diagram of an embodiment of the grid template according to the present invention;
[0065] Figure 6 is based on Figure 5 the matching graph obtained by grid template matching according to the present invention;
[0066] Figure 7 is a schematic diagram of the principle of trajectory curve discretization according to the present invention;
[0067] Figure 8 is a schematic diagram of the calculation of the compensation trajectory points according to the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0068] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0069] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the present invention.
[0070] This embodiment provides a method for compensating the trajectory error of a robot for gluing, which is a post-compensation method, simple and easy to implement, low in cost, good in effect, and does not require writing complex control algorithms, effectively improving production quality and efficiency.
[0071] As Figure 1 shown, the method for compensating the trajectory error of the robot for gluing in this embodiment includes the following steps:
[0072] Step 1: Obtain the trajectory image of the robot for gluing according to the target trajectory points based on the grid background.
[0073] Manufacture a ceramic plate with high-precision grid lines, or use an electronic display board with a high-precision grid map. The simplest method is to use a piece of grid paper with high-precision dimensions as the background for the gluing operation. These grids are used for subsequent extraction and precise positioning of the gluing contour.
[0074] The upper computer sends a position command to make the robot perform the gluing operation according to the established speed and trajectory, record the gluing trajectory on standard graph paper, and use an ordinary camera to collect the trajectory image. As Figure 2 shown, the experimental platform in this embodiment consists of a Delta robot 10, a gluing nozzle fixing device 20, a gluing nozzle 30, and a moving platform (end effector) 11 of the robot for installing the gluing nozzle. In this case, a standard elliptical curve is used as the target trajectory, the curve is discretized into a finite number of trajectory points, and then converted into G-code executable by the robot, and the gluing nozzle on the robot is controlled to move on the grid board or grid paper to draw the expected trajectory pattern.
[0075] Step 2: Extract the initial trajectory points in the trajectory image, correct each initial trajectory point through the inverse solution method of the finite element method, and use the B-spline curve to fit the corrected initial trajectory points to obtain the final actual trajectory points.
[0076] In the image data preprocessing stage, this embodiment combines denoising, binarization, and morphological operations, and particularly optimizes the clarity of the motion trajectory. The inner and outer contours of the preliminarily extracted trajectory are further optimized in terms of accuracy through geometric algorithms. Among them, extracting the initial trajectory points in the trajectory image includes the following steps:
[0077] Preprocess the trajectory image, including steps such as binarization, closing operation, and opening operation, to effectively remove noise points, so that the trajectory lines are smoother and clearer, and obtain a trajectory line including an inner contour and an outer contour, as Figure 3 shown as the original trajectory image, Figure 4 is the trajectory line after preprocessing. Since the trajectory line after preprocessing still has a certain width, it is necessary to further extract its central trajectory curve for subsequent trajectory compensation processing.
[0078] Collect the coordinates of all black pixel points in the preprocessed trajectory image, and fit the curve by the least squares method. In this embodiment, a standard ellipse is used as the target trajectory, so the fitted curve is a standard ellipse; discretize the curve into several discrete points, and draw normal lines between each pair of adjacent discrete points. The normal lines intersect with the inner contour and the outer contour respectively, and take the midpoint of the intersection points of the inner contour and the outer contour as the extracted initial trajectory points. Different from the first time using a standard ellipse to extract the trajectory center, this time the trajectory points extracted for the first time are used, and the same geometric algorithm is used for secondary calculation to further obtain high-precision initial trajectory points.
[0079] Since the camera is not calibrated, the lens distortion and the images are taken at random angles or positions, resulting in image distortion (such as distortion from a square to a rhombus or an irregular shape). This embodiment proposes a method based on template matching and inverse solution of the finite element method. Compared with the traditional image processing method based on a simple correction model, this method can take images at any angle without obtaining the internal parameters of the camera, effectively improving the operation flexibility. By applying the finite element method combined with shape functions, the accuracy of trajectory coordinates and the calculation efficiency are significantly improved. The specific solution process is as follows.
[0080] Select a standard grid template, as Figure 5 shown. In this embodiment, a grid with a size of 5mm×5mm is selected as the template, and pixel matching is performed between the grid template and the grid background in the trajectory image to obtain a matching map as Figure 6 shown.
[0081] Select a point on the matching map as the coordinate origin and establish a plane coordinate system to obtain the pixel coordinates of all pixel points in this coordinate system. According to the size of the grid template, obtain the actual coordinates of the four vertices and the center point of each matching unit in the matching map; use the inverse solution method of the finite element method to calculate the true coordinates of the initial trajectory points, and the steps are as follows:
[0082] Establish a quadrilateral element: Select four known coordinate points around the initial trajectory point as the four vertices of the quadrilateral element. The true coordinates are (x1, y1), (x2, y2), (x3, y3), and (x4, y4) respectively, and the pixel coordinates are (p1, q1), (p2, q2), (p3, q3), and (p4, q4) respectively. The pixel coordinates (p, q) of the initial trajectory point are within the quadrilateral element.
[0083] Define the shape function N k of the quadrilateral element (ξ, η), k = 1, 2, 3, 4 as shown in the following formula:
[0084]
[0085] Construct the interpolation function as follows, and solve the relative coordinates (ξ, η) of the initial trajectory point in the parent element by reverse solution:
[0086]
[0087] From the interpolation function as follows, solve the true coordinates (x, y) of the trajectory point in the sub-element:
[0088]
[0089] Correct each initial trajectory point in turn to obtain the true coordinates of the initial trajectory point as the actual trajectory point.
[0090] In particular, in this embodiment, B-spline curve fitting is adopted, which can effectively complement the missing part of the trajectory, and realizes the optimization of the continuity, smoothness and operability of the trajectory point data, constructs a more accurate and smooth trajectory mathematical model, and makes the trajectory points continuous and the transition smooth. Compared with the existing methods, this method provides higher reliability of trajectory data and is applicable to more complex operating environments. The specific steps are as follows:
[0091] Given the knot vector T = [t0, t1,..., t n+k , where n represents the number of control points and k is the order of the B-spline. Select an appropriate value of k to maintain appropriate control of local details while ensuring the smoothness of the curve. The recursive relationship of the formula is:
[0092] Base case: When the order k = 1, the basis function is a step function, as shown in the following formula:
[0093]
[0094] Recursive formula: When the order k > 1, the recursive relationship of the basis function is:
[0095]
[0096] The B-spline curve can be expressed as:
[0097]
[0098] where the parameter u can be understood as the "position" on the curve, is the value of the basis function of the j-th control point at u, which controls the influence of this point on the curve shape; C(u) is the coordinate of the curve at the parameter u; P j is the j-th control point. Thus, the actual motion trajectory during the robot's operation, that is, the actual trajectory points, can be obtained.
[0099] Step 3: Obtain the offset of the glue drop at the target trajectory point according to the glue drop theoretical model.
[0100] To establish an approximate correspondence between the input target trajectory points and the output actual trajectory points and find the optimal compensation trajectory points, information such as the spraying direction, spraying height, spraying speed of the glue during the glue application process, as well as the motion speed and acceleration of the robot's end effector needs to be considered. A glue drop theoretical model is established to accurately compensate the actual trajectory. Compared with the traditional method of directly compensating the trajectory, the method of finding the best matching compensation points by establishing a theoretical model can greatly improve the accuracy and efficiency of compensation. The construction process is as follows:
[0101] Given the motion position and motion time interval of the robot, which are specified by the operator, the speed v of the robot's end effector i The calculation formula is as follows:
[0102]
[0103] In the formula, v i represents the speed of the robot's end effector corresponding to the i-th target trajectory point, (x i , y i ) represents the coordinates of the i-th target trajectory point, (x i-1 , y i-1 ) represents the coordinates of the (i - 1)-th target trajectory point, and dt represents the motion time interval.
[0104] The calculation formulas for the sine and cosine values of the speed direction angle are as follows:
[0105]
[0106] In the formula, sinθ i represents the sine value of the speed direction angle of the robot's end effector corresponding to the i-th target trajectory point, and cosθ i represents the cosine value of the speed direction angle of the robot's end effector corresponding to the i-th target trajectory point.
[0107] It is known that the downward spraying speed of the glue liquid from the nozzle is v′, and the height from the nozzle to the working surface is h, which is set by the operator. Then, the calculation formula for the dripping time t of the glue liquid is as follows:
[0108]
[0109] In the formula, g is the acceleration due to gravity.
[0110] Then, the calculation formula for the deviation radius of the glue liquid is as follows:
[0111]
[0112] Meanwhile, considering the influence of the deformation of the robot mechanism under high-speed working conditions, taking the mechanism deformation coefficient as k, the calculation formula for the offset of the glue liquid landing point is as follows:
[0113] Δx = (k·v i +r i )cosθ i
[0114] Δy = (k·v i +r i )sinθ i
[0115] In the formula, r i represents the deviation radius of the glue liquid corresponding to the i-th target trajectory point, Δx represents the offset of the glue liquid landing point on the x-axis, and Δy represents the offset of the glue liquid landing point on the y-axis.
[0116] Step 4: Deflect the actual trajectory points according to the deflection angle to obtain the deflected trajectory points, and obtain the compensated trajectory points based on the target trajectory points and the deflected trajectory points.
[0117] According to the position of the actual trajectory points, taking the target trajectory points as the reference, determine the points symmetric to the output trajectory points at equal distances in the reverse direction as the compensated input trajectory points (i.e., as the compensated trajectory points). At the same time, to ensure the one-to-one correspondence between the compensated trajectory points and the reference positions, select an angular range (such as -5° to the left and +5° to the right), and perform iterative calculations at a certain angular increment (such as 0.5°) to find the optimal compensated points and obtain a more accurate compensation effect. To check whether the compensation effect meets the glue application operation, combine the theoretical model of the glue liquid landing point in Step 3 to establish a result evaluation function to ensure the convergence and accuracy of the compensation results.
[0118] In this embodiment, the actual trajectory points are deflected according to the deflection angle to obtain the deflected trajectory points, such as Figure 7As shown, the actual trajectory and the target trajectory are placed together. With the center of the extracted elliptical trajectory as the origin, rays are drawn in all directions at regular intervals (a suitable angle is selected according to the number of trajectory discretization points), intersecting the target trajectory at several points. The original ray is deflected by an angle increment (such as 0.5°), and it also intersects the actual trajectory at several points, which are the deflected trajectory points. The target trajectory points where the same ray intersects the target trajectory and the deflected trajectory points where the ray intersects the actual trajectory after deflection are used as a set of points for compensation. The specific compensation process is as follows:
[0119] As Figure 8 shown, taking the i-th target trajectory point (x i , y i ) as a reference, symmetric points equidistant in the reverse direction from the i-th deflected trajectory point (x Ti , y Ti ) are determined as the compensated trajectory points. Then, the calculation formula for the i-th compensated trajectory point (x Ri , y Ri ) is as follows:
[0120] x Ri = 2x i - x Ti
[0121] y Ri = 2y i - y Ti
[0122] In the formula, x Ri represents the x-axis coordinate value of the i-th compensated trajectory point, y Ri represents the y-axis coordinate value of the i-th compensated trajectory point, x i represents the x-axis coordinate value of the i-th target trajectory point, y i represents the y-axis coordinate value of the i-th target trajectory point, x Ti represents the x-axis coordinate value of the i-th deflected trajectory point, and y Ti is the y-axis coordinate value of the i-th deflected trajectory point.
[0123] Step 5: Add the glue drop landing offset to the compensated trajectory points to obtain the glue application offset trajectory points, and calculate the first error amount based on the glue application offset trajectory points and the target trajectory points.
[0124] To reduce the number of iterations and ensure the convergence of the results, the optimal deviation angle that minimizes the overall error is initially found in combination with the glue drop landing theoretical model to determine the theoretically optimal compensated trajectory points. The specific iteration method is as follows:
[0125] The glue application offset trajectory points (x i ′, y i ′) after considering the influence of the glue application operation are calculated as follows:
[0126] x i ′ = x Ri + Δx
[0127] y i ′ = y Ri + Δy
[0128] The result evaluation function established in this embodiment is as follows. In other embodiments, any trajectory error evaluation function can be introduced, such as displacement error, absolute trajectory error, etc.:
[0129]
[0130] Where H(x) is the first error value, and n is the number of points after discretization of the trajectory curve.
[0131] Step 6: Continuously incrementally update the deflection angle, and then return to Step 4 until the deflection angle exceeds the deflection range, obtaining multiple compensated trajectory points and the corresponding first error amounts. Select the compensated trajectory point with the smallest first error amount as the optimized target trajectory point.
[0132] Iterative calculation is performed with a fixed deflection angle increment within a certain deflection range. The initial value of the deflection angle can be set to 0. By traversing all deflection angle increments within the deflection range, the optimal deflection angle that minimizes the first error amount is found to determine the theoretically optimal compensated estimation point.
[0133] Step 7: Control the robot to apply glue according to the optimized target trajectory point, and obtain the optimized actual trajectory point. Calculate the second error amount between the optimized actual trajectory point and the target trajectory point. If the second error amount meets the accuracy requirement, output the optimized target trajectory point and end; otherwise, return to Step 1 and execute again.
[0134] Verification of the compensation result: Use the compensated trajectory point obtained in the previous step as the new target trajectory point, re-control the robot to perform the glue application operation, and then execute Steps 1 and 2 to obtain the new actual trajectory point. Calculate the second error amount based on the target trajectory point and the new actual trajectory point. If the error of the actual drawing curve meets the accuracy requirement, the finally corrected target trajectory point can be obtained. If the accuracy requirement cannot be met, it is necessary to further repeat Steps 1 to 6 until the accuracy requirement is satisfied. It should be noted that before re-operation, it is necessary to erase the trajectory of the previous operation or replace the grid paper. And when calculating the second error amount, the evaluation function in Step 5 can also be used, and of course, other trajectory error evaluation functions can also be used.
[0135] In the trajectory control of the robot end effector, achieving precise trajectory tracking often requires effective error compensation for the actual trajectory to make it approach the ideal trajectory. However, traditional trajectory optimization methods rely on repeated feedback adjustments. By successively controlling the movement of the robotic arm, evaluating the error, and then performing compensation iterations until the error meets the requirements. This method usually has long steps, large error accumulation, and uncertain result convergence, making it difficult to meet the high-precision control requirements. The present invention establishes a theoretical model and a result evaluation function. Taking the evaluation function as the optimization objective, combining the theoretical model and the optimal compensation algorithm to seek the optimal compensation point, and efficiently finding the optimal control trajectory. This method improves the optimization efficiency and enables the trajectory accuracy to converge rapidly in each iteration, achieving efficient error compensation. At the same time, to ensure that the optimized trajectory meets the actual production requirements, the optimized trajectory is used to control the robot for glue application operations. If the compensation result does not meet the actual requirements, multiple compensation iterations can be performed until the accuracy requirements are met. The method combining the theoretical model and iterative optimization provides an efficient and accurate solution for the robot glue application trajectory optimization, helping to meet the high-precision real-time control requirements under complex working conditions.
[0136] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0137] The above-described embodiments merely represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.
Claims
1. A robot gluing trajectory error compensation method, characterized in that: The robot gluing trajectory error compensation method comprises: Step 1: Based on the grid background, obtain the trajectory image of the robot applying glue according to the target trajectory point; Step 2, extracting the initial trajectory points in the trajectory image, correcting each initial trajectory point by the inverse solution of the finite element method, and fitting the corrected initial trajectory points with the B-spline curve to obtain the final actual trajectory points; Step 3: Obtain the glue drop point offset of the target trajectory point according to the glue drop point theoretical model, wherein the glue drop point theoretical model is constructed as follows: Given the robot's motion position and motion time interval, the speed of the robot's end effector The calculation formula is as follows: ; In the formula, Indicates The speed of the robot end effector corresponding to the target trajectory point, Indicates The coordinates of the target trajectory points, Indicates The coordinates of the target trajectory points, Indicates the time interval of movement; The calculation formulas for the sine and cosine values of the velocity direction angle are as follows: ; In the formula, Indicates The sine value of the velocity direction angle of the robot end effector corresponding to the target trajectory point, Indicates The cosine value of the velocity direction angle of the robot end effector corresponding to each target trajectory point; It is known that the speed of the glue spraying downward from the nozzle is , the height from the nozzle to the working surface is , then the time for the glue to drip The calculation formula is as follows: ; In the formula, is the acceleration due to gravity; The calculation formula of the deviation radius of the glue is as follows: ; At the same time, considering the influence of robot mechanism deformation under high-speed working conditions, the mechanism deformation coefficient is taken as , then the calculation formula of the glue drop point offset is as follows: ; In the formula, Indicates The deviation radius of the glue corresponding to the target trajectory point, Indicated in The offset of the glue drop point on the axis, Indicated in The offset of the glue drop point on the axis; Step 4, deflecting the actual trajectory point according to the deflection angle to obtain a deflected trajectory point, and obtaining a compensated trajectory point according to the target trajectory point and the deflected trajectory point; Step 5, superimposing the glue drop point offset on the compensation trajectory point to obtain a glue coating offset trajectory point, and calculating a first error amount based on the glue coating offset trajectory point and the target trajectory point; Step 6, continuously incrementally updating the deflection angle, and returning to step 4 until the deflection angle exceeds the deflection range, obtaining multiple compensation trajectory points and corresponding first error amounts, and taking the compensation trajectory point with the smallest first error amount as the optimized target trajectory point; Step 7: Control the robot to apply glue according to the optimized target trajectory point, and obtain the optimized actual trajectory point, calculate the second error between the optimized actual trajectory point and the target trajectory point, and if the second error meets the accuracy requirement, output the optimized target trajectory point and end; otherwise, return to step 1 and execute again.
2. The robot gluing trajectory error compensation method according to claim 1 is characterized in that: The extracting of initial trajectory points in the trajectory image comprises: Preprocess the trajectory image to obtain a trajectory line including an inner contour and an outer contour; Collect the coordinates of all black pixels in the preprocessed trajectory image and fit the curve using the least squares method; The curve is discretized into several discrete points, and a normal line is drawn between each pair of adjacent discrete points. The normal line intersects with the inner contour and the outer contour respectively, and the midpoint of the intersection of the inner contour and the outer contour is taken as the initial trajectory point for extraction.
3. The robot gluing trajectory error compensation method according to claim 1 is characterized in that: The method of correcting each initial trajectory point by using the finite element method inverse solution includes: Select a standard grid template, use the grid template to perform pixel matching with the grid background in the trajectory image, and obtain a matching map; Select a point on the matching image as the coordinate origin and establish a plane coordinate system to obtain the pixel coordinates of all pixels in the coordinate system. According to the size of the grid template, obtain the actual coordinates of the four vertices and the center point of each matching unit in the matching image. Use the finite element method to calculate the true coordinates of the initial trajectory points. The steps are as follows: Establish quadrilateral unit: Select four known coordinate points around the initial trajectory point as the four vertices of the quadrilateral unit, and the real coordinates are , , and , the pixel coordinates are , , and , pixel coordinates of the initial trajectory point In the quadrilateral unit; Define the shape functions of the quadrilateral element As shown below: ; The interpolation function is constructed as follows, and the relative coordinates of the initial trajectory point in the mother unit are solved in reverse : ; The interpolation function is as follows to solve the real coordinates of the trajectory point in the subunit : ; Each initial trajectory point is corrected in turn to obtain the true coordinates of the initial trajectory point as the actual trajectory point.
4. The robot gluing trajectory error compensation method according to claim 1 is characterized in that: The initial value of the deflection angle is 0.
5. The robot gluing trajectory error compensation method according to claim 1 is characterized in that: The compensation trajectory points are obtained according to the target trajectory points and the deflection trajectory points, including: First Target track points As the reference, the reverse equidistance is determined with the Deflection trajectory points The symmetrical point is used as the compensation trajectory point, then Compensation trajectory points The calculation formula is: ; In the formula, Indicates Compensation trajectory points Axis coordinate values, Indicates Compensation trajectory points Axis coordinate values, Indicates The target trajectory points Axis coordinate values, Indicates The target trajectory points Axis coordinate values, Indicates Deflection trajectory points Axis coordinate values, For the Deflection trajectory points Axis coordinate values.
Citation Information
Patent Citations
Real-time trajectory planning method for autonomous vehicle
CN109375632A
Gluing track correction method based on least square method
CN115464644A