Robot gluing track error compensation method

Through trajectory image processing based on grid background and finite element method inverse solution, combined with the iterative optimization method of the glue liquid landing theory model, the problem of low end position accuracy of high-speed motion robot arm is solved, and high-precision trajectory error compensation is achieved.

CN119760285AActive Publication Date: 2025-04-04ZHEJIANG UNIV OF TECH

Patent Information

Application Number
CN202411840834.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-04
Estimated Expiration
2044-12-13

Smart Images

  • Figure CN119760285A_ABST
    Figure CN119760285A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of trajectory optimization, and discloses a robot gluing trajectory error compensation method, which comprises the following steps: acquiring a trajectory image based on a grid background; extracting an initial track point in the track image, and obtaining a final actual track point; obtaining the glue solution drop point offset of the target track point according to the glue solution drop point theoretical model; the actual track point is deflected according to the deflection angle to obtain a deflection track point, and a compensation track point is obtained according to the target track point and the deflection track point; the glue solution drop point offset is superposed on the compensation track point to obtain a gluing offset track point, and a first error amount is calculated based on the gluing offset track point and the target track point; taking the compensation track point with the minimum first error amount as an optimized target track point; and if so, outputting the optimized target track point meeting the precision requirement. The problem that the position precision of the tail end of the mechanical arm is low in the high-speed motion state is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of trajectory optimization, and in particular relates to a robot gluing trajectory error compensation method. Background Art

[0002] As the application scenarios of robotic arms become more complex, robots continue to develop in the direction of high speed, high acceleration, high precision and lightweight, which leads to greater flexibility of their mechanisms, and the influence of inertia and centrifugal force on joints and end effectors will be significantly enhanced, and elastic vibration during mechanism operation will also increase. These dynamic effects will cause deviations in joint displacement, velocity and acceleration, thereby causing position errors of the end effectors. Especially in multi-DOF robotic arms, the mutual influence of each joint will aggravate this deviation. It is particularly important to compensate for the trajectory error of the robotic arm under high-speed motion conditions.

[0003] The robot trajectory error compensation methods are mainly divided into real-time compensation and post-compensation. Although real-time compensation can correct errors immediately, it is difficult to implement, costly, and complex to operate. It requires writing complex control algorithms and coordinating the robot and sensors (such as cameras) to work together, and the accuracy is difficult to guarantee. Summary of the invention

[0004] The object of the present invention is to provide a robot gluing trajectory error compensation method to solve the problem of low position accuracy of the end of the robot arm under high-speed motion state.

[0005] To achieve the above object, the technical solution adopted by the present invention is:

[0006] A robot gluing trajectory error compensation method, the robot gluing trajectory error compensation method comprising:

[0007] Step 1: Based on the grid background, obtain the trajectory image of the robot applying glue according to the target trajectory point;

[0008] 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;

[0009] Step 3, obtaining the glue drop point offset of the target trajectory point according to the glue drop point theoretical model;

[0010] 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;

[0011] 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;

[0012] 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;

[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 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.

[0014] Several optional methods are also provided below, but they are not intended to be additional limitations on the above-mentioned overall solution, but are merely further supplements or preferences. Under the premise that there are no technical or logical contradictions, each optional method can be combined with the above-mentioned overall solution separately, and multiple optional methods can also be combined.

[0015] Preferably, the extracting initial trajectory points in the trajectory image comprises:

[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 pixels in the preprocessed trajectory image and fit the curve using the least squares method;

[0018] 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.

[0019] Preferably, the correction of each initial trajectory point by inverse solution of finite element method comprises:

[0020] 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;

[0021] 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.

[0022] Use the finite element method to calculate the true coordinates of the initial trajectory points. The steps are as follows:

[0023] Establish a quadrilateral unit: select four known coordinate points around the initial trajectory point as the four vertices of the quadrilateral unit, the real coordinates are (x1, y1), (x2, y2), (x3, y3) and (x4, y4), the pixel coordinates are (p1, q1), (p2, q2), (p3, q3) and (p4, q4), and the pixel coordinates (p, q) of the initial trajectory point are within the quadrilateral unit;

[0024] Define the shape function N of the quadrilateral element k (ξ,η), k=1,2,3,4 as shown below:

[0025]

[0026] The interpolation function is constructed as follows, and the relative coordinates (ξ,η) of the initial trajectory point in the mother unit are solved inversely:

[0027]

[0028] The interpolation function is as follows to solve the real coordinates (x, y) of the trajectory point in the subunit:

[0029]

[0030] Each initial trajectory point is corrected in turn to obtain the true coordinates of the initial trajectory point as the actual trajectory point.

[0031] Preferably, the theoretical model of the glue drop point is constructed as follows:

[0032] Given the robot's motion position and motion time interval, 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 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-1th target trajectory point, and dt represents the motion time interval;

[0035] The calculation formulas for the sine and cosine values ​​of the velocity direction angle are as follows:

[0036]

[0037] In the formula, sinθ iRepresents the sine value of the velocity direction angle of the robot end effector corresponding to the i-th target trajectory point, cosθ i Represents the cosine value of the velocity direction angle of the robot end effector corresponding to the i-th target trajectory point;

[0038] It is known that the speed of the glue liquid spraying downward from the nozzle is v', and the height from the nozzle to the working surface is h, then the calculation formula for the time t of the glue liquid dripping is as follows:

[0039]

[0040] Where g is the acceleration due to gravity;

[0041] The calculation formula of the deviation radius of the glue is as follows:

[0042]

[0043] At the same time, considering the influence of robot mechanism deformation under high-speed working conditions, taking the mechanism deformation coefficient as k, the calculation formula for the offset of the glue drop 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 corresponding to the i-th target trajectory point, Δx represents the offset of the glue landing point on the x-axis, and Δy represents the offset of the glue landing point on the y-axis.

[0047] Preferably, the initial value of the deflection angle is 0.

[0048] Preferably, obtaining the compensation trajectory point according to the target trajectory point and the deflection trajectory point includes:

[0049] Take the i-th target trajectory point (x i ,y i ) as the reference, determine the i-th deflection trajectory point (x Ti ,y Ti ) is taken as the compensation trajectory point, then the i-th compensation trajectory point (x Ri ,y Ri ) is calculated by the formula:

[0050] x Ri =2x i -x Ti

[0051] y Ri =2y i -y Ti

[0052] In the formula, x Ri Indicates the x-axis coordinate value of the i-th compensation trajectory point, y Ri represents the y-axis coordinate value of the i-th compensation 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 deflection trajectory point, y Ti is the y-axis coordinate value of the i-th deflection trajectory point.

[0053] Compared with the prior art, the robot gluing trajectory error compensation method provided by the present invention has the following beneficial effects:

[0054] (1) High-precision calibration technology without camera intrinsic parameters: Traditional visual processing systems rely on accurate calibration of the camera, and must obtain the camera's intrinsic parameters (such as focal length, optical center, distortion coefficient, etc.) to achieve coordinate system conversion and error correction. The present invention does not require high-precision visual sensors, nor does it require complex camera calibration. By using inexpensive cameras and simple operations, higher accuracy can be achieved, reducing the equipment and technical thresholds. This method is also insensitive to image distortion or warping of grid paper. The reference relationship of the grid paper is used in the algorithm to ensure calibration accuracy.

[0055] (2) High-precision trajectory extraction and coordinate calculation based on grid background: To obtain the real coordinates of the trajectory points, the present invention uses a high-precision background grid and a four-node interpolation shape function in the finite element method to accurately calculate the actual coordinate points, which is different from the traditional interpolation method (such as linear interpolation and polynomial interpolation). This idea of ​​combining grid background with finite element method is novel in the field of robot trajectory compensation.

[0056] (3) B-spline curve fitting to obtain high-precision trajectory: During the trajectory extraction process, uneven glue coating or improper image processing may cause the trajectory line to be concave or discontinuous. 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 improve the accuracy and efficiency of trajectory extraction, and solve the problem of uneven or discontinuous distribution of trajectory points.

[0057] (4) Combination of theoretical model and optimization compensation: A theoretical model of glue drop point was constructed that takes into account the glue spraying direction, height, speed, and motion parameters of the robot end effector. The optimal compensation point was found through iterative calculation of angle increments. This method of combining physical model with algorithm optimization ensures the convergence of compensation results and improves the accuracy and efficiency of compensation.

[0058] (5) Application of the compensation method combining simulation and practice: By combining the two-step optimization method of theoretical model optimization compensation and actual compensation, the number of trajectory optimization iterations is 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 robot arm: Through the combination of the above-mentioned multiple innovative technologies, the present invention realizes the control of the high-precision motion trajectory of the robot arm, greatly improving the overall efficiency and accuracy of trajectory extraction, error compensation and trajectory fitting, and is suitable for scenarios with high-precision requirements for the motion control of the robot arm. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a flow chart of a robot gluing trajectory error compensation method of the present invention;

[0061] Figure 2 Schematic diagram of the Delta parallel robot of the present invention;

[0062] Figure 3 A schematic diagram of an embodiment of a trajectory image obtained by the present invention;

[0063] Figure 4 A schematic diagram of an embodiment of a trajectory image after preprocessing of the present invention;

[0064] Figure 5 A schematic diagram of an embodiment of a grid template of the present invention;

[0065] Figure 6 The present invention is based on Figure 5 The matching map obtained by grid template matching;

[0066] Figure 7 It is a schematic diagram of the discretization principle of the trajectory curve of the present invention;

[0067] Figure 8 Schematic diagram of calculation of compensation trajectory points of the present invention. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.

[0069] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. 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 robot gluing trajectory error compensation method, which is a post-compensation method that is simple, easy to implement, low-cost, and effective. It does not require the writing of complex control algorithms, and effectively improves production quality and efficiency.

[0071] like Figure 1 As shown, the robot gluing trajectory error compensation method of this embodiment includes the following steps:

[0072] Step 1: Based on the grid background, obtain the trajectory image of the robot applying glue according to the target trajectory point.

[0073] Make 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 grid paper with high-precision dimensions as a background for the glue application. These grids are used for the subsequent extraction and precise positioning of the glue application contours.

[0074] The host computer sends position instructions to make the robot perform gluing operations at a predetermined speed and trajectory, record the gluing trajectory on standard graph paper, and use an ordinary camera to capture the trajectory image. Figure 2 As shown, the experimental platform of this embodiment is composed of a Delta robot 10, a glue spray head fixing device 20, a glue spray head 30, and a robot moving platform (end effector) 11 for installing the glue spray head. In this case, the standard elliptic 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 to control the glue spray head on the robot to move on the grid plate 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 by using the finite element method inverse solution, 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 especially optimizes the clarity of the motion trajectory. The geometric algorithm is used to perform secondary precision optimization on the inner and outer contours of the initially extracted trajectory. The initial trajectory point in the trajectory image is extracted, including the following steps:

[0077] The trajectory image is preprocessed, including binarization, closing operation and opening operation, to effectively remove noise, so that the trajectory line is smoother and clearer, and the trajectory line containing the inner contour and the outer contour is obtained, such as Figure 3 The original trajectory image is shown. Figure 4 is the trajectory line after preprocessing. The trajectory line after preprocessing still has a certain width, so its central trajectory curve needs to be further extracted for subsequent trajectory compensation processing.

[0078] Collect the coordinates of all black pixels in the trajectory image after preprocessing, and fit the curve by the least square method. In this embodiment, the standard ellipse is used as the target trajectory, so the fitted curve is the standard ellipse; discretize the curve into several discrete points, and draw a normal between each pair of adjacent discrete points. The normal 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 to be extracted. Different from the first use of the standard ellipse to extract the trajectory center, this time the trajectory points extracted for the first time are used, and the same geometric calculation is used for secondary calculation to further obtain high-precision initial trajectory points.

[0079] Since the camera is not calibrated, lens distortion and pictures taken at random angles or positions result in image distortion (such as distortion from the original square to a diamond or irregular shape), this embodiment proposes a method for inverse solution based on template matching and 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 camera's intrinsic parameters, effectively improving the flexibility of the operation. By applying the finite element method in combination with shape functions, the accuracy of trajectory coordinates and the calculation efficiency are significantly improved. The specific solution process is shown below.

[0080] Choose a standard grid template such as Figure 5 As shown, this embodiment selects a grid with a size of 5 mm × 5 mm as a template, and uses the grid template to perform pixel matching with the grid background in the trajectory image to obtain a matching image as shown in FIG. Figure 6 shown.

[0081] Select a point on the matching image as the 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, the actual coordinates of the four vertices and the center point of each matching unit in the matching image are obtained; the real coordinates of the initial trajectory point are calculated using the finite element method inverse solution method. The steps are as follows:

[0082] Establish a quadrilateral unit: select four known coordinate points around the initial trajectory point as the four vertices of the quadrilateral unit. The real coordinates are (x1, y1), (x2, y2), (x3, y3) and (x4, y4), and the pixel coordinates are (p1, q1), (p2, q2), (p3, q3) and (p4, q4). The pixel coordinates (p, q) of the initial trajectory point are within the quadrilateral unit.

[0083] Define the shape function N of the quadrilateral element k (ξ,η), k=1,2,3,4 as shown below:

[0084]

[0085] The interpolation function is constructed as follows, and the relative coordinates (ξ,η) of the initial trajectory point in the mother unit are solved inversely:

[0086]

[0087] The interpolation function is as follows to solve the real coordinates (x, y) of the trajectory point in the subunit:

[0088]

[0089] Each initial trajectory point is corrected in turn to obtain the true coordinates of the initial trajectory point as the actual trajectory point.

[0090] In particular, this embodiment uses B-spline curve fitting to effectively complete the missing part of the trajectory, and optimizes 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 trajectory data reliability and is suitable for more complex operating environments. The specific steps are as follows:

[0091] Given a node vector T = [t0, t1, ..., t n+k ], where n is the number of control points and k is the order of the B-spline. Selecting a suitable k value ensures the smoothness of the curve while maintaining proper control over local details. The recursive relationship of the formula is:

[0092] Base case: When the order k = 1, the basis function is a step function, as shown below:

[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] The parameter u can be understood as the "position" on the curve. is the basis function value of the jth control point at u, which controls the influence of this point on the shape of the curve; C(u) is the coordinate of the curve at parameter u; P j is the jth control point. From this, we can get the actual motion trajectory of the robot during operation, that is, the actual trajectory point.

[0099] Step 3: Obtain the glue drop point offset of the target trajectory point according to the glue drop point theoretical model.

[0100] In order to establish an approximate correspondence between the input target trajectory point and the output actual trajectory point and find the optimal compensation trajectory point, it is necessary to consider the glue spray direction, spray height, spray speed, and movement speed and acceleration of the robot end effector during the gluing process, establish a theoretical model of the glue drop point, and accurately compensate for the actual trajectory. Compared with the traditional method of direct trajectory compensation, the method of finding the best matching compensation point by establishing a theoretical model can greatly improve the accuracy and efficiency of compensation. The construction process is as follows:

[0101] The robot's motion position and motion time interval are given by the operator, and the speed v of the robot's end effector is i The calculation formula is as follows:

[0102]

[0103] In the formula, v i represents the speed of the robot 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-1th target trajectory point, and dt represents the motion time interval.

[0104] The calculation formulas for the sine and cosine values ​​of the velocity direction angle are as follows:

[0105]

[0106] In the formula, sinθ i Represents the sine value of the velocity direction angle of the robot end effector corresponding to the i-th target trajectory point, cosθ i Represents the cosine value of the velocity direction angle of the robot end effector corresponding to the i-th target trajectory point.

[0107] It is known that the speed of the glue liquid spraying downward from the nozzle is v', and the height from the nozzle to the working surface is h, which is set by the operator. The calculation formula for the time t of the glue liquid dripping is as follows:

[0108]

[0109] Where g is the acceleration due to gravity.

[0110] The calculation formula of the deviation radius of the glue is as follows:

[0111]

[0112] At the same time, considering the influence of robot mechanism deformation under high-speed working conditions, taking the mechanism deformation coefficient as k, the calculation formula for the offset of the glue drop 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 corresponding to the i-th target trajectory point, Δx represents the offset of the glue landing point on the x-axis, and Δy represents the offset of the glue landing point on the y-axis.

[0116] Step 4: Deflect the actual trajectory point according to the deflection angle to obtain the deflected trajectory point, and obtain the compensated trajectory point according to the target trajectory point and the deflected trajectory point.

[0117] According to the position of the actual trajectory point, with the target trajectory point as the reference, the point symmetrical to the output trajectory point is determined in the reverse equidistant manner as the input trajectory point after compensation (i.e., as the compensation trajectory point). At the same time, to ensure that the compensated trajectory point corresponds to the reference position one by one, an angle range is selected (such as -5° to the left and +5° to the right), and iterative calculation is performed with a certain angle increment (such as 0.5°) to find the optimal compensation point and obtain a more accurate compensation effect. In order to test whether the compensation effect meets the requirements of the glue coating operation, the result evaluation function is established in combination with the theoretical model of the glue drop point in step 3 to ensure the convergence and accuracy of the compensation result.

[0118] In this embodiment, the actual trajectory point is deflected according to the deflection angle to obtain the deflected trajectory point, such as Figure 7As shown, put the actual trajectory and the target trajectory together, take the center of the extracted elliptical trajectory as the origin, and draw rays in all directions at certain angles (select the appropriate angle according to the number of points in the trajectory discretization), intersecting with the target trajectory at several points. Deflect the original ray by an angle increment (such as 0.5°), and also intersect with the actual trajectory at several points, which are the deflected trajectory points. The target trajectory points where the same ray intersects with the target trajectory, and the deflected trajectory points that intersect with the actual trajectory after deflection are taken as a group of points for compensation. The specific supplementation process is as follows:

[0119] like Figure 8 As shown, the i-th target trajectory point (x i ,y i ) as the reference, determine the i-th deflection trajectory point (x Ti ,y Ti ) is taken as the compensation trajectory point, then the i-th compensation trajectory point (x Ri ,y Ri ) is calculated by the formula:

[0120] x Ri =2x i -x Ti

[0121] y Ri =2y i -y Ti

[0122] In the formula, x Ri Indicates the x-axis coordinate value of the i-th compensation trajectory point, y Ri represents the y-axis coordinate value of the i-th compensation 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 deflection trajectory point, y Ti is the y-axis coordinate value of the i-th deflection trajectory point.

[0123] Step 5: superimpose the glue drop point offset on the compensation trajectory point to obtain the glue coating offset trajectory point, and calculate the first error amount based on the glue coating offset trajectory point and the target trajectory point.

[0124] In order to reduce the number of iterations and ensure the convergence of the results, the optimal deviation angle that minimizes the overall error is preliminarily found in combination with the theoretical model of the glue drop point, so as to determine the theoretically optimal compensation trajectory point. The specific iterative method is as follows:

[0125] The gluing deviation trajectory point (x i ′,y i ′), the calculation formula is 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 may be introduced, such as displacement error, absolute trajectory error, etc.:

[0129]

[0130] Wherein, H(x) is the first error value, and n is the number of discretized points of the trajectory curve.

[0131] Step 6: Continue to incrementally update the deflection angle and return to step 4 until the deflection angle exceeds the deflection range, obtain multiple compensation trajectory points and the corresponding first error amounts, and take the compensation 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, and 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 theoretical optimal compensation 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 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.

[0134] Verification of compensation results: Use the compensation trajectory point obtained in the previous step as the new target trajectory point, re-control the robot to perform the gluing 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 actual curve error meets the accuracy requirements, the final corrected target trajectory point can be obtained. If the accuracy requirements cannot be met, it is necessary to further repeat steps 1 to 6 until the accuracy requirements are met. It is worth noting that before re-operating, it is necessary to erase the trajectory of the last operation or replace the grid paper. And when calculating the second error amount, the evaluation function in step 5 can also be used, of course, other trajectory error evaluation functions can also be used.

[0135] In the trajectory control of the robot end effector, accurate trajectory tracking often requires effective error compensation of the actual trajectory to make it close to the ideal trajectory. However, the traditional trajectory optimization method relies on repeated feedback adjustment, by successively controlling the movement of the robot arm, evaluating the error, and then performing compensation iterations until the error meets the requirements. This method usually has lengthy steps, large error accumulation, and uncertain result convergence, which is difficult to meet the needs of high-precision control. The present invention establishes a theoretical model and a result evaluation function, takes the evaluation function as the optimization target, combines the theoretical model and the optimal compensation algorithm to seek the optimal compensation point, and efficiently finds the optimal control trajectory. This method improves the optimization efficiency, and makes the trajectory accuracy converge quickly in each iteration, achieving efficient error compensation. At the same time, in order to ensure that the optimized trajectory meets the actual production needs, the robot is controlled to perform the gluing operation with the optimized trajectory. If the compensation result does not meet the actual needs, multiple compensation iterations can be performed until the accuracy requirements are met. The method combining the theoretical model with iterative optimization provides an efficient and accurate solution for robot gluing trajectory optimization, which helps to meet the needs of high-precision real-time control under complex working conditions.

[0136] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, 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, they should be considered to be within the scope of this specification.

[0137] The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached 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, obtaining the glue drop point offset of the target trajectory point according to the glue drop point theoretical model; 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 a quadrilateral unit: select four known coordinate points around the initial trajectory point as the four vertices of the quadrilateral unit, the real coordinates are (x1, y1), (x2, y2), (x3, y3) and (x4, y4), the pixel coordinates are (p1, q1), (p2, q2), (p3, q3) and (p4, q4), and the pixel coordinates (p, q) of the initial trajectory point are within the quadrilateral unit; Define the shape function N of the quadrilateral element k (ξ,η), k=1,2,3,4 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 inversely: The interpolation function is as follows to solve the real coordinates (x, y) 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 construction process of the theoretical model of the glue drop point is as follows: Given the robot's motion position and motion time interval, the speed v of the robot's end effector i The calculation formula is as follows: In the formula, v i represents the speed of the robot 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-1th target trajectory point, and dt represents the motion time interval; The calculation formulas for the sine and cosine values ​​of the velocity direction angle are as follows: In the formula, sinθ i Represents the sine value of the velocity direction angle of the robot end effector corresponding to the i-th target trajectory point, cosθ i Represents the cosine value of the velocity direction angle of the robot end effector corresponding to the i-th target trajectory point; It is known that the speed of the glue liquid spraying downward from the nozzle is v', and the height from the nozzle to the working surface is h, then the calculation formula for the time t of the glue liquid dripping is as follows: Where g 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, taking the mechanism deformation coefficient as k, the calculation formula for the offset of the glue drop point is as follows: Δx=(k·v i +r i )cosθ i Δy=(k·v i +r i )sinθ i In the formula, r i represents the deviation radius of the glue corresponding to the i-th target trajectory point, Δx represents the offset of the glue landing point on the x-axis, and Δy represents the offset of the glue landing point on the y-axis.

5. The robot gluing trajectory error compensation method according to claim 1 is characterized in that: The initial value of the deflection angle is 0.

6. 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: Take the i-th target trajectory point (x i ,y i ) as the reference, determine the i-th deflection trajectory point (x Ti ,y Ti ) is taken as the compensation trajectory point, then the i-th compensation trajectory point (x Ri ,y Ri ) is calculated by the formula: x Ri =2x i -x Ti and Ri =2y i -and Ti In the formula, x Ri Indicates the x-axis coordinate value of the i-th compensation trajectory point, y Ri represents the y-axis coordinate value of the i-th compensation 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 deflection trajectory point, y Ti is the y-axis coordinate value of the i-th deflection trajectory point.

Citation Information

Patent Citations

  • Real-time trajectory planning method for autonomous vehicle

    CN109375632A

  • Gluing track correction method based on least square method

    CN115464644A

Cited By

  • Pultrusion strip track control automatic gluing method and system based on servo motor

    CN120228024A

  • Pultrusion track control automatic gluing method and system based on servo motor

    CN120228024B

  • Robot contour error fairing compensation method and system based on polynomial spline

    CN121132625A

  • Medical adhesive spraying track optimization system

    CN121722048A