Robot NURBS curve velocity planning method, device and storage medium

By segmenting the robot NURBS curve and correcting the command speed, combined with the direct transcription method and MATLAB solution, the problem that the interpolation error is not considered is solved, and the accuracy and efficiency of the robot NURBS curve speed planning are improved.

CN114952852BActive Publication Date: 2024-09-20TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210661093.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2024-09-20
Estimated Expiration
2042-06-13

AI Technical Summary

Technical Problem

The existing technology fails to effectively consider the interpolation error in the NURBS curve speed planning of the robot, resulting in inaccurate solution of the limit speed and reducing the smoothness of motion and processing efficiency.

Method used

By segmenting the machining path with NURBS curves, the command speed is corrected according to the robot joint speed constraints, and the objective function and constraint conditions of the time optimal speed planning problem are established. The direct transcription method and MATLAB are used to solve the problem, and finally the planning speed of the first and last segments is carried out. Combinations and constraints are checked until the moment and interpolation error constraints are met.

Benefits of technology

It achieves more precise control information transmission, improves processing efficiency, reduces interpolation errors while maintaining stability and accuracy, and improves the accuracy of robot NURBS curve speed planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114952852B
    Figure CN114952852B
Patent Text Reader

Abstract

The present invention discloses a robot NURBS curve speed planning method, which divides the processing path into NURBS curve segments and obtains the parameters of each segment; corresponding to each segment of the curve, the terminal limit speed obtained by the joint speed constraint is compared to correct the command speed; the objective function and constraint conditions of the time optimal speed planning problem are established; the first and last segments are planned, and the shortest processing time is used as the objective function. The constraint conditions include the robot torque constraint and the correction command speed constraint, and the optimal solution of the objective function is solved to obtain the first and last segment planning speed and combine it with the correction command speed to obtain the speed curve after the first and last segment planning; then the curve is sequentially checked for torque and interpolation error constraints, and the unsatisfied constraint parts are replanned to meet the constraint conditions, and the speed planning curve considering the interpolation error constraint is obtained after processing. The present invention takes into account the interpolation error limit, and makes the information theoretically input to the controller more accurate while maintaining the processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a robot curve speed planning method, and in particular to a robot NURBS curve speed planning method, device and storage medium. Background Art

[0002] At present, material removal processes such as grinding, deburring, milling and drilling are increasingly performed by industrial robots with serial kinematics because of their flexibility, versatility and cost-effectiveness. The trajectory of the material removal process is generally generated by CAM software. With the increasing requirements for special-shaped workpieces such as automobile shapes and engine blades, the trajectory has gradually evolved from simple straight lines and arcs to free curves. Many of these free curves are represented by non-uniform rational B-splines (NURBS), which have become the standard for industrial product model data exchange due to their powerful curve modeling capabilities.

[0003] For the task of NURBS curve path tracking, the control system needs to have the corresponding speed planning and interpolation algorithms. The research on NURBS curves in CNC machine tools started early. Siemens, Fanuc, Mitsubishi and other companies have developed high-end CNC equipment with NURBS curve speed planning and interpolation functions. Since such multi-axis machine tools are expensive and inconvenient to use and maintain, they are not widely used by small and medium-sized enterprises. In terms of low-precision machining, soft materials, and efficient on-site machining of large curved structural parts, industrial robots can replace the role of machine tools. Therefore, the importance of NUBRS research in industrial robots is becoming increasingly prominent, and more and more related research is being conducted.

[0004] After velocity planning, the robot needs to calculate the interpolation point position to achieve continuous trajectory tracking, and curve interpolation will produce interpolation errors. Figures 2 to 3 , solve the limit speed according to the curve curvature and interpolation error constraints. For material removal tasks, bow height error is an important constraint. The limit speed is mostly derived from the bow height error, see Figure 2 The bow height error is the distance between the ideal trajectory and the line connecting the adjacent interpolation points, and is generally calculated using the circular arc approximation method. Figure 2 In the figure, the ideal trajectory is a solid line, the line between the interpolation points is a long dash line, and the bow height error is an arrow line with the symbol δ.

[0005] For rectangular coordinate robots or machine tools, the bow height error is the interpolation error, which is used to solve the limit speed. Due to the nonlinearity of the motion of articulated robots, the actual trajectory obtained by fine interpolation of each joint, whether it is a straight line or PVT interpolation, is a curve that is approximately circular. Please refer to Figure 3 Its deviation from the ideal trajectory is the interpolation error, which is different from the bow height error. Figure 3In the figure, the ideal trajectory is a solid line, the actual trajectory is a dotted line, and the interpolation error is an arrow line with the symbol E. i Therefore, for articulated robots, the bow height error is not the actual interpolation error. When planning the speed of such robots, if the bow height error is still used to constrain the limit speed, the limit speed solution will be inaccurate and the motion stability will be reduced.

[0006] In order to minimize the processing time, it is crucial to find the time-optimal path under various constraints in the field of robotics research. Currently, there are three methods to solve this problem: indirect methods including numerical integration methods, direct transcription methods including various convex optimization methods, and dynamic programming methods. However, no matter which method is used for planning, the nonlinearity of motion and interpolation strategy are not taken into account, and the actual interpolation output will deviate from the ideal path. Therefore, it is necessary to consider the interpolation error in the time-optimal speed planning. Summary of the invention

[0007] The present invention provides a robot NURBS curve speed planning method, device and storage medium that take interpolation errors into consideration in time-optimal speed planning in order to solve the technical problems existing in the known technology.

[0008] The technical solution adopted by the present invention to solve the technical problems existing in the known technology is: a robot NURBS curve speed planning method, which divides the processing path into NURBS curve segments and obtains the parameters of each NURBS curve segment; corresponding to each NURBS curve segment, the command speed is corrected by the terminal limit speed obtained according to the robot joint speed constraint to obtain the corrected command speed; the objective function and constraint conditions of the time optimal speed planning problem are established; firstly, the first and last segments are planned, and the shortest processing time is used as the objective function. The constraint conditions include the robot torque constraint and the corrected command speed constraint, and the optimal solution of the objective function is solved to obtain the first and last segment planning speed, and the first and last segment planning speed is combined with the corrected command speed to obtain the first and last segment planning speed curve; then the first and last segment planning speed curve is sequentially checked for torque and interpolation error constraints, and the part of the first and last segment planning speed curve that does not meet the constraint conditions is re-planned until the constraint conditions are met, and the speed planning curve considering the interpolation error constraint is obtained after processing.

[0009] Furthermore, the method of segmenting the processing path into NURBS curves and obtaining the parameters of each NURBS curve segment includes: first, using the interval bisection method based on the Simpson arc length approximation to solve the arc length of the curve, and dividing the curve into a number of sub-parameter intervals according to the approximate arc length fitting accuracy, and then using a cubic polynomial in each interval to fit the parameter arc length relationship of the curve segment to obtain the number of curve segments, the endpoint parameters of each segment, and the coefficients of the arc length parameter polynomial of each segment.

[0010] Furthermore, the method for correcting the command speed by obtaining the terminal limit speed according to the robot joint speed constraint includes: solving the terminal limit speed of the robot according to the speed constraints of each joint of the robot, and the specific method is: at the end point of each NURBS curve, the limit speed of each joint is mapped to the robot terminal speed through the Jacobian matrix to obtain the terminal limit speed V qjn ; Then the command speed V ref Perform correction according to the following formula to obtain the corrected command speed V ref ′:

[0011] V ref ′=min(V qjn ,V ref );

[0012] Where: V ref is the command speed; V qjn is the terminal limit speed; V ref ′ is the corrected command speed; min() means taking the smaller value of the two.

[0013] Furthermore, the method of establishing the objective function and constraints of the time optimal speed planning problem includes the following steps:

[0014] Ignoring friction, the dynamic equation of the six-degree-of-freedom rigid robot is established as follows:

[0015]

[0016] The NURBS curve is represented by parameter u(0-1), the joint motion time interval is set to [0,T], and t∈[0,T], then u in the joint motion path q(u) is a variable that changes with time t, and q(u) is represented by q(u(t));

[0017] For a given motion path, the robot's joint velocities and accelerations are expressed as follows

[0018]

[0019]

[0020] Substituting equation (2) and equation (3) into equation (1), we get an equation with simplified independent variables:

[0021]

[0022] in:

[0023] M u (u)=M(q(u))q′(u) (5)

[0024] C u (u)=M(q(u))q″(u)+C(q(u),q′(u))q′(u) (6)

[0025] G u (u) = G (q (u)) (7)

[0026] The torque constraint condition can be obtained from formula (4):

[0027]

[0028] According to the corrected command speed, the robot terminal speed is expressed by the following formula:

[0029]

[0030] Then we have:

[0031] dup=Norm(Vref′) / Norm(P′(u)) (10)

[0032] Solve the T value in the motion time interval [0, T] by the following formula:

[0033]

[0034] The objective function and constraints of the time-optimal problem of robot path tracking are established as follows:

[0035]

[0036] Where:

[0037] M(q) is the mass matrix;

[0038] is the Coriolis and centrifugal effect matrix;

[0039] G(q) is the gravity matrix;

[0040] q is the robot joint angle;

[0041] is the robot joint velocity;

[0042] is the robot joint acceleration;

[0043] τ is the robot joint torque matrix;

[0044] is the pseudo speed;

[0045] is the pseudo acceleration;

[0046] q(u) is the joint motion path;

[0047] q'(u) is the partial derivative of the joint motion path with respect to u;

[0048] q″(u) is the second-order partial derivative of the joint motion path with respect to u;

[0049] is the derivative of the joint motion path with respect to t, i.e., the joint velocity of the robot;

[0050] is the second-order derivative of the joint motion path with respect to t, i.e., the joint acceleration of the robot;

[0051] τ(u) is the robot joint torque matrix with independent variable u;

[0052] M u (u) is the mass matrix with independent variable u;

[0053] C u (u) is the Coriolis and centrifugal effect matrix with independent variable u;

[0054] G u (u) is the gravity matrix with independent variable u;

[0055] M(q(u)) is the mass matrix with independent variable q(u);

[0056] C(q(u),q′(u)) is the Coriolis and centrifugal effect matrix with independent variables q(u) and q′(u); G(q(u)) is the gravity matrix with independent variable q(u);

[0057] τ min is the lower limit of the joint torque constraint;

[0058] τ max is the upper limit of the joint torque constraint;

[0059] dup for use The corrected command speed indicated;

[0060] v(u) is the robot terminal velocity;

[0061] P(u) is the robot end coordinate described by the NURBS curve;

[0062] Norm(·) is the modulus operation of a vector;

[0063] P′(u) is the partial derivative of the robot end coordinates described by the NURBS curve with respect to u;

[0064] is the value of the pseudo velocity at the initial point;

[0065] is the value of the endpoint pseudo velocity;

[0066] u(0) is the initial point parameter;

[0067] u(T) is the endpoint parameter;

[0068] is the initial point pseudo velocity;

[0069] is the terminal pseudo velocity.

[0070] Furthermore, the method for solving the optimal solution of the objective function includes: using the direct transcription method, introducing the optimization variable, discretizing the objective function and the constraint conditions, and solving the optimal solution of the objective function through MATLAB. The specific method is as follows:

[0071] Assume that the introduced optimization variables are:

[0072] a(u)=ü (13)

[0073]

[0074] The following relationship exists between the optimization variables:

[0075] b′(u)=2a(u) (15)

[0076] Substituting equations (13) to (15) into equation (12), we obtain the following equation:

[0077]

[0078] Then, according to the NURBS curve segment points, equation (12) is discretized to obtain the following equation:

[0079]

[0080] In the formula,

[0081] k is the kth point;

[0082] a(u) is the optimization variable that replaces ü;

[0083] b(u) is replaced by The optimization variables of

[0084] b(0) is the square of the pseudo velocity at the initial point;

[0085] b(1) is the square of the pseudo velocity at the end point;

[0086] u k is the parameter value of the kth point;

[0087] Δu k is the parameter difference between the kth point and the previous point;

[0088] M u (u k ) is the mass matrix when the independent variable u takes the kth point parameter value;

[0089] C u (u k ) is the Coriolis and centrifugal effect matrix when the independent variable u takes the k-th point parameter value;

[0090] G u (u k ) is the gravity matrix when the independent variable u takes the kth point parameter value;

[0091] b k+1 is the optimization variable b of the k+1th point;

[0092] b k is the optimization variable b of the kth point;

[0093] a k is the optimization variable a of the kth point;

[0094] b 0 is the square of the pseudo velocity at the initial point;

[0095] is the value of the pseudo velocity at the initial point;

[0096] is the value of the endpoint pseudo velocity;

[0097] The MATLAB nonlinear optimization function Fmincon is used to solve equation (17) to obtain the optimal solution of the objective function.

[0098] Furthermore, the method for planning the first section includes:

[0099] Plan the i-th segment point in the positive sequence, and set the initial value of i to 2; call Fmincon to find the optimal solution for the objective function. If there is a solution, output the planning result. If not, add 1 to i, and then loop the first segment speed planning until a solution is found;

[0100] Methods for planning the final stage include:

[0101] Plan the i-th segment point in reverse order, and set the initial value of i to 2; call Fmincon to find the optimal solution for the objective function. If there is a solution, output the planning result. If not, add 1 to i, and then loop the final speed planning until a solution is found.

[0102] Furthermore, the method for checking the torque constraint of the speed curve after the first and last segment planning includes:

[0103] The judgment formula for establishing the moment constraint check is as follows:

[0104]

[0105] Where:

[0106] |·| is the absolute value operation;

[0107] j is the jth joint;

[0108] panduan k j is the result of the j-th joint judgment at the k-th segment point. If the value is less than or equal to 0, the inspection is qualified, otherwise it is unqualified;

[0109] is the upper limit of the torque constraint of the jth joint;

[0110] If the result at the kth point is less than 0, record this point and then perform speed planning here; if all constraints are met, output the planning result.

[0111] Further, after performing a torque constraint check on the speed curve after planning the first and last sections, the speed curve is replanned, and the method of performing an interpolation error constraint check on the speed curve after the torque check and replanning includes:

[0112] Firstly, the NURBS curve interpolation method based on parameter interval subdivision is used to interpolate at the initial planned speed. The PVT method is used for secondary interpolation, and the interpolation error is calculated. Then, according to the interpolation error constraint, it is judged whether the constraint is met. If it is met, the result is output. If not, the speed is planned here by reducing the speed upper limit, and then the cycle is started to update the planned speed and continue interpolation until the constraint is met and the re-planning result is output.

[0113] The present invention also provides a robot NURBS curve speed planning device, comprising a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute the computer program and implement the robot NURBS curve speed planning method steps as described above when executing the computer program.

[0114] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the robot NURBS curve velocity planning method as described above are implemented.

[0115] The advantages and positive effects of the present invention are as follows: the present invention proposes a robot NURBS curve velocity planning method considering interpolation error constraints. Compared with the algorithm considering bow height error, the algorithm considers interpolation error constraints, and makes the information theoretically input to the controller more accurate while maintaining processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0116] Figure 1 It is a simplified flow chart of a robot NURBS curve velocity planning method of the present invention.

[0117] Figure 2 It is a schematic diagram of the bow height error caused by NURBS interpolation of rectangular coordinate robots and machine tools.

[0118] Figure 2 Middle: The ideal trajectory is a solid line, the line between interpolation points is a long dash line, the bow height error is an arrow line, and the symbol is δ. R represents the radius of the arc that approximates the ideal trajectory, and S represents the distance between adjacent interpolation points.

[0119] Figure 3 It is a schematic diagram of the interpolation error generated by the articulated robot performing NURBS interpolation (fine interpolation or secondary interpolation using straight lines or PVT, etc.).

[0120] Figure 3 Middle: The ideal trajectory is a solid line, the actual trajectory is a dotted line, the interpolation error is an arrow line, and the symbol E i ; S represents the distance between adjacent interpolation points.

[0121] Figure 4 This is a simplified diagram of the first stage of NURBS curve velocity planning.

[0122] Figure 5 This is a simplified flow chart of the final segment planning in NURBS curve velocity planning.

[0123] Figure 6 It is a schematic diagram of the initial first and last section speed planning curve.

[0124] Figure 6 Middle: V ref Indicates the value of the modified command speed, v represents the speed, and u represents the parameter.

[0125] The middle horizontal line represents the modified command speed, the long dash line at the lower left of the horizontal line represents the first speed planning curve, and the dotted line at the lower right of the horizontal line represents the final speed planning curve.

[0126] Figure 7 It is a simplified diagram of the torque constraint check and re-planning process of the speed curve after the initial first and last segment planning.

[0127] Figure 8It is a schematic diagram of the torque constraint check and re-planning of the speed curve after the first and last sections are planned.

[0128] Figure 8 Middle: The solid line represents the speed curve after the initial planning of the first and last sections. The curve below the solid line represents the speed curve after the original speed curve does not meet the torque constraint check and is then replanned.

[0129] Fig. 9 It is a simplified flow chart of interpolation error constraint check and re-planning of speed curve after torque check and re-planning.

[0130] Fig.10 It is a schematic diagram of the interpolation error calculation method.

[0131] Fig.10 Middle: The dotted line points are the actual robot end positions corresponding to the quadratic interpolation; the solid line points xn represent the points on the ideal trajectory, E i1 ~E i1 is the interpolation error of the corresponding interpolation point.

[0132] Fig.11 It is a schematic diagram of checking the interpolation error constraint and replanning the speed curve after the initial torque check and replanning.

[0133] Fig.11 Middle: The dotted line indicates the original speed curve here does not meet the interpolation error check, and then the speed curve is re-planned. The solid line indicates the speed curve after the torque check and re-planning.

[0134] Fig.12 It is a schematic diagram of the speed planning curve considering the interpolation error constraint. DETAILED DESCRIPTION

[0135] In order to further understand the content, features and effects of the present invention, the following embodiments are listed and described in detail with reference to the accompanying drawings:

[0136] See also Figures 1 to 12A robot NURBS curve speed planning method is proposed. The processing path is segmented into NURBS curves and the parameters of each NURBS curve are obtained. For each NURBS curve, the command speed is corrected by the terminal limit speed obtained according to the robot joint speed constraint to obtain the corrected command speed. The objective function and constraint conditions of the time optimal speed planning problem are established. First, the first and last segments are planned, and the shortest processing time is used as the objective function. The constraints include the robot torque constraint and the corrected command speed constraint. The optimal solution of the objective function is solved to obtain the planned speed of the first and last segments. The planned speed of the first and last segments is combined with the corrected command speed to obtain the speed curve after planning of the first and last segments. Then, the torque and interpolation error constraints are checked for the speed curve after planning of the first and last segments in turn. The parts of the speed curve after planning of the first and last segments that do not meet the constraints are replanned until the constraints are met. After processing, the speed planning curve considering the interpolation error constraint is obtained.

[0137] NURBS (Non Uniform Rational B-Spline) is a non-uniform rational B-spline curve. The mathematical definition of a p-order NURBS curve is as follows:

[0138]

[0139] where i=0,1…,n; {p i} is the set of curve control points, {w i} is the weight factor set, {N i,p (u)} is defined at the non-periodic node vector The p-order B-spline curve basis function on , where m+1 is the number of nodes.

[0140] N i,p (u) is expressed in recursive mathematical form as follows:

[0141]

[0142]

[0143] Among them, the provisions

[0144] The command speed refers to the feed speed command. During the material removal process, there will be a recommended processing feed speed command V according to the processing form, spindle speed, tool parameters, etc. ref .

[0145] The first and last segments refer to the initial part and the end part of the entire curve respectively.

[0146] Preferably, the method of segmenting the processing path into NURBS curves and obtaining the parameters of each NURBS curve segment may include: first, the arc length of the curve can be solved by using the interval bisection method based on the Simpson arc length approximation, and the curve can be divided into several sub-parameter intervals according to the approximate arc length fitting accuracy, and then a cubic polynomial can be used in each interval to fit the parameter arc length relationship of the curve segment to obtain the number of curve segments, the endpoint parameters of each segment, and the coefficients of the arc length parameter polynomial of each segment.

[0147] Preferably, the method for correcting the command speed by obtaining the terminal limit speed according to the robot joint speed constraint may include: solving the terminal limit speed of the robot according to the speed constraints of each joint of the robot, and the specific method may be: at the end point of each NURBS curve, the limit speed of each joint may be mapped to the robot terminal speed through the Jacobian matrix to obtain the terminal limit speed V qjn ; The command speed V ref Perform correction according to the following formula to obtain the corrected command speed V ref ′:

[0148] V ref ′=min(V qjn ,V ref );

[0149] Where: V ref is the command speed; V qjn is the terminal limit speed; V ref ′ is the corrected command speed; min() means taking the smaller value of the two.

[0150] Preferably, the method for establishing the objective function and constraints of the time optimal speed planning problem may include the following steps:

[0151] Under the condition of ignoring friction, the dynamic equation of the six-degree-of-freedom rigid robot can be established as follows:

[0152]

[0153] The NURBS curve can be represented by the parameter u(0-1), and the joint motion time interval can be set to [0,T]. Let t∈[0,T], then u in the joint motion path q(u) is a variable that changes with time t, and q(u) is represented by q(u(t));

[0154] For a given motion path, the robot's joint velocities and accelerations can be expressed as follows

[0155]

[0156]

[0157] Equations (2) and (3) can be substituted into equation (1) to obtain an equation with simplified independent variables:

[0158]

[0159] in:

[0160] M u (u)=M(q(u))q′(u) (5)

[0161] C u (u)=M(q(u))q″(u)+C(q(u),q′(u))q′(u) (6)

[0162] G u (u) = G (q (u)) (7)

[0163] The moment constraint condition can be obtained from formula (4):

[0164]

[0165] According to the corrected command speed, the robot terminal speed can be expressed as follows:

[0166]

[0167] Then we can have:

[0168] dup=Norm(Vref′) / Norm(P′(u)) (10)

[0169] The T value in the motion time interval [0, T] can be solved by the following formula:

[0170]

[0171] The objective function and constraints of the time-optimal problem of robot path tracking can be established as follows:

[0172]

[0173] Where:

[0174] M(q) is the mass matrix;

[0175] is the Coriolis and centrifugal effect matrix;

[0176] G(q) is the gravity matrix;

[0177] q is the robot joint angle;

[0178] is the robot joint velocity;

[0179] is the robot joint acceleration;

[0180] τ is the robot joint torque matrix;

[0181] is the pseudo speed;

[0182] ü is the pseudo acceleration;

[0183] q(u) is the joint motion path;

[0184] q'(u) is the partial derivative of the joint motion path with respect to u;

[0185] q″(u) is the second-order partial derivative of the joint motion path with respect to u;

[0186] is the derivative of the joint motion path with respect to t, i.e., the joint velocity of the robot;

[0187] is the second-order derivative of the joint motion path with respect to t, i.e., the joint acceleration of the robot;

[0188] τ(u) is the robot joint torque matrix with independent variable u;

[0189] M u (u) is the mass matrix with independent variable u;

[0190] C u (u) is the Coriolis and centrifugal effect matrix with independent variable u;

[0191] G u (u) is the gravity matrix with independent variable u;

[0192] M(q(u)) is the mass matrix with independent variable q(u);

[0193] C(q(u),q′(u)) is the Coriolis and centrifugal effect matrix with independent variables q(u) and q′(u);

[0194] G(q(u)) is the gravity matrix with independent variable q(u);

[0195] τ min is the lower limit of the joint torque constraint;

[0196] τ max is the upper limit of the joint torque constraint;

[0197] dup for use The corrected command speed indicated;

[0198] v(u) is the robot terminal velocity;

[0199] P(u) is the robot end coordinate described by the NURBS curve;

[0200] Norm(·) is the modulus operation of a vector;

[0201] P′(u) is the partial derivative of the robot end coordinates described by the NURBS curve with respect to u;

[0202] is the value of the pseudo velocity at the initial point;

[0203] is the value of the endpoint pseudo velocity;

[0204] u(0) is the initial point parameter;

[0205] u(T) is the endpoint parameter;

[0206] is the initial point pseudo velocity;

[0207] is the terminal pseudo velocity.

[0208] Preferably, the method for solving the optimal solution of the objective function may include: using a direct transcription method, introducing optimization variables, discretizing the objective function and constraint conditions, and solving the optimal solution of the objective function through MATLAB. The specific method is as follows:

[0209] The optimization variables introduced can be set as:

[0210] a(u)=ü (13)

[0211]

[0212] The following relationship exists between the optimization variables:

[0213] b′(u)=2a(u) (15)

[0214] Equations (13) to (15) can be substituted into equation (12) to obtain the following equation:

[0215]

[0216] Then, we can discretize equation (12) according to the NURBS curve segment points to obtain the following equation:

[0217]

[0218] In the formula,

[0219] k is the kth point;

[0220] a(u) is the optimization variable that replaces ü;

[0221] b(u) is replaced by The optimization variables of

[0222] b(0) is the square of the pseudo velocity at the initial point;

[0223] b(1) is the square of the pseudo velocity at the end point;

[0224] u k is the parameter value of the kth point;

[0225] Δu k is the parameter difference between the kth point and the previous point;

[0226] M u (u k ) is the mass matrix when the independent variable u takes the kth point parameter value;

[0227] C u (u k ) is the Coriolis and centrifugal effect matrix when the independent variable u takes the k-th point parameter value;

[0228] G u (u k ) is the gravity matrix when the independent variable u takes the kth point parameter value;

[0229] b k+1 is the optimization variable b of the k+1th point;

[0230] b k is the optimization variable b of the kth point;

[0231] a k is the optimization variable a of the kth point;

[0232] b 0 is the square of the pseudo velocity at the initial point;

[0233] is the value of the pseudo velocity at the initial point;

[0234] is the value of the endpoint pseudo velocity;

[0235] The MATLAB nonlinear optimization function Fmincon can be used to solve equation (17) to obtain the optimal solution of the objective function.

[0236] Direct transcription method: A method of converting a continuous problem into a discrete problem when solving an optimization control problem. This method is described in formulas 13-17 of this paper.

[0237] MATLAB is a commercial mathematical software produced by the American company MathWorks. It is used in data analysis, deep learning, image processing and computer vision, signal processing, robotics, control systems and other fields.

[0238] The Fmincon function is a MATLAB function that solves the minimum of nonlinear multivariate functions and solves constrained optimization problems. In simple terms, the function we need to solve can have multiple unknowns. Fmincon is a gradient-based method designed to solve problems where both the objective and constraint functions are continuous and have continuous first-order derivatives.

[0239] Preferably, the method for planning the first segment may include:

[0240] The i-th segment point in the positive sequence can be planned, and the initial value of i is set to 2; Fmincon can be called to solve the objective function for the optimal solution. If there is a solution, the planning result is output. If not, i is increased by 1, and then the first segment speed planning is repeated until a solution is found;

[0241] Methods for planning the terminal phase may include:

[0242] The i-th segment point in reverse order can be planned, and the initial value of i is set to 2; Fmincon can be called to solve the objective function for the optimal solution. If there is a solution, the planning result is output. If not, i is increased by 1, and then the final speed planning is repeated until a solution is found.

[0243] Preferably, the method for checking the torque constraint of the speed curve after the first and last segment planning may include:

[0244] The judgment formula for moment constraint checking can be established as shown below:

[0245]

[0246] Where:

[0247] |·| is the absolute value operation;

[0248] j is the jth joint;

[0249] panduan k j is the result of the j-th joint judgment at the k-th segment point. If the value is less than or equal to 0, the inspection is qualified, otherwise it is unqualified;

[0250] is the upper limit of the torque constraint of the jth joint;

[0251] If the result at the kth point is less than 0, record this point and then perform speed planning here; if all constraints are met, output the planning result.

[0252] Preferably, the speed curve after the first and last segments are planned may be replanned after the torque constraint check is performed on the speed curve. The method of performing the interpolation error constraint check on the speed curve after the torque check and replanning may include:

[0253] First, the NURBS curve interpolation method based on parameter interval subdivision can be used to interpolate at the initial planned speed. The PVT method can be used for secondary interpolation, and the interpolation error is calculated. Then, according to the interpolation error constraint, it is determined whether the constraint is met. If it is met, the result is output. If not, the speed is planned here by reducing the speed upper limit, and then the cycle is started to update the planned speed and continue interpolation until the constraint is met and the re-planning result is output.

[0254] See also Fig.10 The dotted line point is the actual robot end position corresponding to the secondary interpolation, which can be obtained during interpolation. Then take the point x in the solid line n (x in the figure n Calculate the length between each dotted line point and the solid line point, and take the shortest length as the interpolation error E at the dotted line point ii , and then take the maximum interpolation error E among the dotted line points ii is the interpolation error E of the current interpolation cycle i The points in the solid line are points on the ideal trajectory.

[0255] PVT interpolation is Position-Velocity-Time interpolation. The essence of this mode is to create a smooth and continuous Hermite spline curve path based on the position P and velocity V of the starting and ending points on the driving axis trajectory segment provided by the industrial computer, combined with the movement time T of the trajectory segment. The expression of this spline curve is a second-order continuous and differentiable cubic function about time, which can not only ensure the continuity of the displacement and velocity of the driving axis, but also avoid the problem of reduced fitting accuracy caused by too high a number of times. In the PVT mode, the interpolation period of the trajectory segment is a constant, and the acceleration changes linearly with time. Based on this, in this mode, the jerk, acceleration, velocity and position of the driving axis in the joint space between two adjacent interpolation points can be expressed as:

[0256] j(t)=j 0 0≤t≤T;

[0257] a(t)=j 0 t+a 0 0≤t≤T;

[0258]

[0259]

[0260] Given the starting and ending positions q 0 ,q 1 and speed v 0 、v 1 , can be obtained

[0261]

[0262]

[0263] J 0 、a 0 Substituting into the expression of q(t), we can get its matrix form as follows:

[0264]

[0265] The present invention also provides a robot NURBS curve speed planning device, comprising a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute the computer program and implement the robot NURBS curve speed planning method steps as described above when executing the computer program.

[0266] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the robot NURBS curve velocity planning method as described above are implemented.

[0267] The following is a preferred embodiment of the present invention to further illustrate the working process and working principle of the present invention:

[0268] The present invention is a robot NURBS curve velocity planning method considering interpolation error constraints, and its main steps are as follows: Figure 1 As shown:

[0269] 1. Speed ​​planning preparation stage

[0270] 1. Solve the arc length relationship between NURBS curve parameters.

[0271] First, the interval bisection method based on Simpson arc length approximation is used to not only solve the arc length of the curve, but also divide the curve into several sub-parameter intervals according to the approximate arc length fitting accuracy. Then, a cubic polynomial is used to fit the parameter arc length relationship of the curve segment in each interval. Through the above steps, the number of curve segments n, the endpoint parameters of each segment, and the coefficients of the arc length parameter polynomial of each segment are obtained.

[0272] 2. Solve the command speed.

[0273] First, solve the terminal limit speed under the joint speed limit. Each joint of the robot has a joint limit speed, and then at the n+1 endpoints of the NURBS curve, map it to the robot terminal speed through the Jacobian matrix, that is, the terminal limit speed V under the joint speed limit is obtained. qjn Then the command speed is corrected. In the material removal process, there will be a recommended command speed V according to the processing form, spindle speed, tool parameters, etc. ref . Compare V qjn The minimum value of V ref The size of the recommended speed V ref Correction, V ref Greater than V qjn When the command speed is V qjn value, and obtain the corrected command speed V ref '.

[0274] 2. Speed ​​planning considering interpolation error.

[0275] During the material removal process, the corrected command speed needs to be maintained for a long time to ensure the processing effect. In order to improve the processing efficiency, it is necessary to increase the acceleration during the acceleration and deceleration process while meeting the robot joint speed, torque and interpolation error constraints. In order to meet the above requirements, the speed planning stage is divided into three stages: acceleration and deceleration speed planning, torque constraint checking and re-planning, and interpolation error checking and re-planning.

[0276] Since the direct transcription method is used in all three stages of speed planning, the speed planning problem of the direct transcription method is first introduced below.

[0277] For a six-degree-of-freedom rigid robot, the dynamic equation ignoring friction is as follows:

[0278]

[0279] Where M(q) is the mass matrix; is the Coriolis and centrifugal effect matrix; G(q) is the gravity matrix; q is the robot joint angle; is the robot joint velocity; is the robot joint acceleration.

[0280] Considering that the NURBS curve can be represented by the parameter u(0-1), equation (1) can be simplified, and the original multi-dimensional optimization problem about time can be simplified to a two-dimensional optimization problem. If the motion time is set to the interval [0, T], then u in the joint motion path q(u) changes accordingly with the change of t, becoming q(u(t)).

[0281] For a given path, the robot's joint velocities and accelerations can be expressed as

[0282]

[0283]

[0284] In the formula, is the pseudo velocity; ü is the pseudo acceleration.

[0285] Substituting equations (2) and (3) into equation (1), we can obtain an equation with simplified independent variables:

[0286]

[0287] In the formula,

[0288] M u (u)=M(q(u))q′(u) (5)

[0289] C u (u)=M(q(u))q″(u)+C(q(u),q′(u))q′(u) (6)

[0290] G u (u) = G (q (u)) (7)

[0291] The torque constraint condition can be obtained from formula (4):

[0292]

[0293] In the formula, τ min is the lower limit of the joint torque constraint; τ max is the upper limit of the joint torque constraint.

[0294] For kinematic constraints, according to the modified command speed V obtained above, ref ′, and it is converted into Indicates that Indicates the corrected command speed.

[0295]

[0296] but

[0297] dup=Norm(Vref′) / Norm(P′(u)) (10)

[0298] Where v(u) is the velocity of the robot terminal; P(u) is the coordinate of the robot terminal described by the NURBS curve; Norm(·) is the modulus operation of the vector.

[0299] The processing time can be expressed as express.

[0300]

[0301] Finally, the time-optimal problem of robot path tracking can be expressed as follows:

[0302]

[0303] In the formula, is the initial pseudo velocity; is the terminal pseudo velocity.

[0304] Then, according to the direct transcription method, the optimization variables are introduced and discretized to obtain the problem that MATLAB can handle.

[0305] The optimization variables introduced are:

[0306] a(u)=ü (13)

[0307]

[0308] The relationship between optimization variables is as follows:

[0309] b′(u)=2a(u) (15)

[0310] Therefore, according to equations (13)-(15), equation (12) becomes:

[0311]

[0312] Then discretize the NURBS curve according to its segment points, and we can get:

[0313]

[0314] Where k is the kth discrete point.

[0315] Formula (17) can be solved using the MATLAB nonlinear optimization function Fmincon.

[0316] 1. Speed ​​planning for the first and last sections

[0317] The optimization target of speed planning in this stage is processing time, and the constraints are the robot torque constraint and the corrected command speed. The first stage of speed planning steps is as follows: Figure 4 As shown in the figure, the final speed planning steps are as follows: Figure 5 shown.

[0318] Take the first i points for planning, and the initial i is 2. Call Fmincon to solve the problem. If there is a solution, output the planning result. If not, add 1 to i, and then loop the speed planning until a solution is found. The steps of the final speed planning are similar to those of the first stage, except that the points are taken from the back to the front.

[0319] The speed planning results of the first and last sections are as follows: Figure 6 shown.

[0320] 2. Check torque constraints and replan

[0321] Combine the first and last segment planned speeds obtained in step 1 with the modified command speed to obtain the first and last segment planned speeds. Then check the torque constraints and re-plan them. The specific steps are as follows: Figure 7 shown.

[0322] The judgment formula for moment constraint check is as follows:

[0323]

[0324] In the formula, |·| is the absolute value operation; j is the jth joint;

[0325] According to formula (18), if the result at the kth point is less than 0, then record this point and then perform speed planning here. If all constraints are satisfied, output the planning result.

[0326] Check the moment constraints and replanning results such as Figure 8 shown.

[0327] 3. Check interpolation errors and replanning

[0328] Combine the replanned speed obtained in step 2 with the speed after planning at the first and last segments to obtain the replanned speed after torque inspection. Then check the interpolation error and replan it. The specific steps are as follows Fig. 9 shown.

[0329] First, the NURBS curve interpolation method based on parameter interval subdivision is used to interpolate the planned speed, and the PVT method is used for secondary interpolation. Then the interpolation error is recorded. The interpolation error calculation method is as follows: Fig.10 As shown:

[0330] Then, according to the interpolation error constraint, determine whether the constraint is satisfied. If it is satisfied, output the result. If it is not satisfied, determine the point that does not satisfy the interpolation error, and perform speed planning to reduce the speed limit here, then start the cycle, update the speed to be planned, and continue to interpolate until the constraint is satisfied, then output the re-planning result.

[0331] Check the interpolation error and replanning results such as Fig.11 shown.

[0332] Finally, the above planning results are combined to obtain Fig.12 Final planned speed shown.

[0333] The above steps are combined into a robot NURBS curve velocity planning method considering interpolation error constraints.

[0334] The embodiments described above are only used to illustrate the technical ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. The patent scope of the present invention cannot be limited only by this embodiment, that is, any equivalent changes or modifications made to the spirit disclosed by the present invention still fall within the patent scope of the present invention.

Claims

1. A robot NURBS curve velocity planning method, characterized in that: The processing path is segmented into NURBS curves and the parameters of each NURBS curve are obtained; corresponding to each NURBS curve, the command speed is corrected by the terminal limit speed obtained according to the robot joint speed constraint to obtain the corrected command speed; the objective function and constraint conditions of the time optimal speed planning problem are established; first, the first and last segments are planned, with the shortest processing time as the objective function, and the constraints include the robot torque constraint and the corrected command speed constraint, and the optimal solution of the objective function is solved to obtain the planned speed of the first and last segments, and the planned speed of the first and last segments is combined with the corrected command speed to obtain the speed curve after planning of the first and last segments; then the speed curve after planning of the first and last segments is checked for torque and interpolation error constraints in turn, and the part of the speed curve after planning of the first and last segments that does not meet the constraints is re-planned until the constraints are met, and the speed planning curve considering the interpolation error constraint is obtained after processing; The method for segmenting a machining path into NURBS curves and obtaining parameters of each NURBS curve segment includes: firstly, solving the arc length of the curve by using the interval bisection method based on the Simpson arc length approximation, and dividing the curve into a plurality of sub-parameter intervals according to the approximate arc length fitting accuracy, and then fitting the parameter arc length relationship of the curve segment by using a cubic polynomial in each interval, and obtaining the number of curve segments, the endpoint parameters of each segment, and the coefficients of the arc length parameter polynomial of each segment; The method for correcting the command speed by obtaining the terminal limit speed according to the robot joint speed constraint includes: solving the terminal limit speed of the robot according to the speed constraints of each joint of the robot, and the specific method is: at the end point of each NURBS curve, the limit speed of each joint is mapped to the robot terminal speed through the Jacobian matrix to obtain the terminal limit speed V qjn ; Then the command speed V ref Perform correction according to the following formula to obtain the corrected command speed V ref ′: V ref ′=min(V qjn ,V ref ); Where: V ref is the command speed; V qjn is the terminal limit speed; V ref ′ is the corrected command speed; min() means taking the smaller value of the two; The method of establishing the objective function and constraints of the time-optimal speed planning problem includes the following steps: Ignoring friction, the dynamic equation of the six-degree-of-freedom rigid robot is established as follows: The NURBS curve is represented by parameter u(0-1), the joint motion time interval is set to [0,T], and t∈[0,T], then u in the joint motion path q(u) is a variable that changes with time t, and q(u) is represented by q(u(t)); For a given motion path, the robot's joint velocities and accelerations are expressed as follows Substituting equation (2) and equation (3) into equation (1), we get an equation with simplified independent variables: in: M u (u)=M(q(u))q′(u) (5) C u (u)=M(q(u))q″(u)+C(q(u),q′(u))q′(u) (6) G u (u)=G(q(u)) (7) The torque constraint condition can be obtained from formula (4): According to the corrected command speed, the robot terminal speed is expressed by the following formula: Then we have: dup=Norm(Vref′) / Norm(P′(u)) (10) Solve the T value in the motion time interval [0, T] by the following formula: The objective function and constraints of the time-optimal problem of robot path tracking are established as follows: Where: M(q) is the mass matrix; is the Coriolis and centrifugal effect matrix; G(q) is the gravity matrix; q is the robot joint angle; is the robot joint velocity; is the robot joint acceleration; τ is the robot joint torque matrix; is the pseudo speed; ü is the pseudo acceleration; q(u) is the joint motion path; q'(u) is the partial derivative of the joint motion path with respect to u; q″(u) is the second-order partial derivative of the joint motion path with respect to u; is the derivative of the joint motion path with respect to t, i.e., the joint velocity of the robot; is the second-order derivative of the joint motion path with respect to t, i.e., the joint acceleration of the robot; τ(u) is the robot joint torque matrix with independent variable u; M u (u) is the mass matrix with independent variable u; C u (u) is the Coriolis and centrifugal effect matrix with independent variable u; G u (u) is the gravity matrix with independent variable u; M(q(u)) is the mass matrix with independent variable q(u); C(q(u),q′(u)) is the Coriolis and centrifugal effect matrix with independent variables q(u) and q′(u); G(q(u)) is the gravity matrix with independent variable q(u); τ min is the lower limit of the joint torque constraint; τ max is the upper limit of the joint torque constraint; dup for use The corrected command speed indicated; v(u) is the robot terminal velocity; P(u) is the robot end coordinate described by the NURBS curve; Norm(·) is the modulus operation of a vector; P′(u) is the partial derivative of the robot end coordinates described by the NURBS curve with respect to u; is the value of the pseudo velocity at the initial point; is the value of the endpoint pseudo velocity; u(0) is the initial point parameter; u(T) is the endpoint parameter; is the initial point pseudo velocity; is the terminal pseudo velocity.

2. The robot NURBS curve velocity planning method according to claim 1, characterized in that: The method for solving the optimal solution of the objective function includes: using the direct transcription method, introducing the optimization variable, discretizing the objective function and the constraint conditions, and solving the optimal solution of the objective function through MATLAB. The specific method is as follows: Assume that the introduced optimization variables are: a(u)=ü (13) The following relationship exists between the optimization variables: b′(u)=2a(u) (15) Substituting equations (13) to (15) into equation (12), we obtain the following equation: Then, according to the NURBS curve segment points, equation (12) is discretized to obtain the following equation: In the formula, k is the kth point; a(u) is the optimization variable that replaces ü; b(u) is replaced by The optimization variables of b(0) is the square of the pseudo velocity at the initial point; b(1) is the square of the pseudo velocity at the end point; u k is the parameter value of the kth point; Δu k is the parameter difference between the kth point and the previous point; M u (u k ) is the mass matrix when the independent variable u takes the kth point parameter value; C u (u k ) is the Coriolis and centrifugal effect matrix when the independent variable u takes the k-th point parameter value; G u (u k ) is the gravity matrix when the independent variable u takes the kth point parameter value; b k+1 is the optimization variable b of the k+1th point; b k is the optimization variable b of the kth point; a k is the optimization variable a of the kth point; b 0 is the square of the pseudo velocity at the initial point; is the value of the pseudo velocity at the initial point; is the value of the endpoint pseudo velocity; The MATLAB nonlinear optimization function Fmincon is used to solve equation (17) to obtain the optimal solution of the objective function.

3. The robot NURBS curve velocity planning method according to claim 2, characterized in that: Methods for planning the first section include: Plan the i-th segment point in the positive sequence, and set the initial value of i to 2; call Fmincon to find the optimal solution for the objective function. If there is a solution, output the planning result. If not, add 1 to i, and then loop the first segment speed planning until a solution is found; Methods for planning the final stage include: Plan the i-th segment point in reverse order, and set the initial value of i to 2; call Fmincon to find the optimal solution for the objective function. If there is a solution, output the planning result. If not, add 1 to i, and then loop the final speed planning until a solution is found.

4. The robot NURBS curve velocity planning method according to claim 2, characterized in that: The method of checking the torque constraint of the speed curve after the first and last segment planning includes: The judgment formula for establishing the moment constraint check is as follows: Where: |·| is the absolute value operation; j is the jth joint; panduan k j is the result of the j-th joint judgment at the k-th segment point. If the value is less than or equal to 0, the inspection is qualified, otherwise it is unqualified; is the upper limit of the torque constraint of the jth joint; If the result at the kth point is less than 0, record this point and then perform speed planning here; if all constraints are met, output the planning result.

5. The robot NURBS curve velocity planning method according to claim 2, characterized in that: After performing torque constraint check on the speed curve after planning the first and last sections, the speed curve is re-planned. The method of performing interpolation error constraint check on the speed curve after the torque check and re-planning includes: Firstly, the NURBS curve interpolation method based on parameter interval subdivision is used to interpolate at the initial planned speed. The PVT method is used for secondary interpolation, and the interpolation error is calculated. Then, according to the interpolation error constraint, it is judged whether the constraint is met. If it is met, the result is output. If not, the speed is planned here by reducing the speed upper limit, and then the cycle is started to update the planned speed and continue interpolation until the constraint is met and the re-planning result is output.

6. A robot NURBS curve velocity planning device, comprising a memory and a processor, characterized in that: The memory is used to store a computer program; the processor is used to execute the computer program and implement the steps of the robot NURBS curve velocity planning method according to any one of claims 1 to 5 when executing the computer program.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the robot NURBS curve velocity planning method as described in any one of claims 1 to 5 are implemented.