A robot spline interpolation node selection method based on single-step energy loss

CN120363175BActive Publication Date: 2026-08-18SOUTH CHINA UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510242052.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2026-08-18
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

这种方法存在两个缺点:无法反映具体曲线的局部弯曲情况;所需的插补节点点数无法在事先得知,需要不断试错才能得到合适的插补节点点数

Benefits of technology

[0024]1. This invention can quickly determine the minimum position and number of nodes required to track a trajectory using spline interpolation, and is used to assist in motion planning methods based on hierarchical search trees and the generation of robot teaching programs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120363175B_ABST
    Figure CN120363175B_ABST
Patent Text Reader

Abstract

The application discloses a robot spline interpolation node selection method based on single-step energy loss, which comprises the following steps: inputting a to-be-tracked trajectory of a robot end effector; discretizing the to-be-tracked trajectory to obtain ordered discrete points and recording position information and curvature information corresponding to the discrete points; setting a starting endpoint of the to-be-tracked trajectory as a first interpolation node s0 and a last interpolation node s n , adding an interpolation node s1 and s n at a discrete point position at a distance of Δ from s0 and s n‑1 , adjusting a step length to make a single-step energy value equal to a set energy value in an interval of s1 and s n‑1 , and setting a position of the set energy value as an interpolation node to obtain all interpolation nodes in the interval. The application can quickly determine positions and quantities of the least nodes required for tracking a trajectory by using spline interpolation, and is used for assisting generation of a motion planning method based on a hierarchical search tree and a robot teaching program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robotics, and in particular to a method for selecting nodes in robot spline interpolation based on single-step energy loss. Background Technology

[0002] The essence of robot motion generation is to obtain it through motion interpolation of multiple teaching points, which are called interpolation nodes in the interpolation algorithm. For a straight line, MOVL is used to interpolate between two points to generate linear motion; for a circular arc, MOVC is used to interpolate between three points to generate circular motion. For MOVS, the situation is more complex. The number and distribution of interpolation nodes depend on the accuracy requirements, but the specific methods for selecting interpolation nodes have always been vague. Common methods for selecting interpolation nodes include the equidistant node method, Chebyshev nodes, and Gausslegande nodes, but these methods usually do not highlight the specific characteristics of the curve when selecting interpolation nodes. For curves of the same length, the error between the interpolated curve and the original curve can only be controlled by changing the number of interpolation nodes. This method has two drawbacks: it cannot reflect the local curvature of the specific curve; and the required number of interpolation nodes cannot be known in advance, requiring continuous trial and error to obtain a suitable number of interpolation nodes. Summary of the Invention

[0003] In order to overcome the above-mentioned shortcomings and deficiencies of the prior art, the purpose of this invention is to provide a method for selecting robot spline interpolation nodes based on single-step energy loss.

[0004] The objective of this invention is achieved through the following technical solution:

[0005] A method for selecting robot spline interpolation nodes based on single-step energy loss includes:

[0006] Input the trajectory to be tracked by the robot's end effector;

[0007] The trajectory to be tracked is discretized to obtain ordered discrete points, and the position information and curvature information corresponding to the discrete points are recorded.

[0008] Set the starting and ending points of the trajectory to be tracked as the first interpolation node s0 and the last interpolation node s0, respectively. n In relation to s0 and s n Add an interpolation node s1 and s2 at discrete points separated by a distance Δ. n-1 In s1 and s n-1 Within the interval, the step size is adjusted so that the single-step energy value is equal to the set energy value. The position of the energy value is set as an interpolation node, and all interpolation nodes within the interval are obtained.

[0009] Furthermore, the formula for calculating the single-step energy value is as follows:

[0010]

[0011] Where R and curv are the radius of curvature and curvature of the curve, respectively, k, c, and b are constants, step and i are parameters of the given trajectory, i is the i-th discrete point, step is the step size, and the length of the curve between the i-th discrete point and the (i+step)-th discrete point is step.

[0012] Furthermore, k, c, and b are constants obtained by fitting the distribution pattern of standard circular interpolation nodes.

[0013] Furthermore, the curvature of the discrete points in the curve is calculated, specifically as follows:

[0014]

[0015] In the formula, r(t) refers to the given trajectory, r′(t) and r″(t) are the first and second derivatives of the trajectory, respectively, and ‖‖ represents the magnitude of the vector.

[0016] Furthermore, in s1 and s n-1 Within the interval, the step size is adjusted so that the single-step energy value equals the set energy value. The position of the set energy value is used as an interpolation node. Specifically:

[0017] First, assume that the curvature of the curve remains constant, and calculate the step size based on the curvature at the current position as an estimate of the actual step size;

[0018] Adjust the value of the estimate so that the single-step energy value calculated by the integral within the step size is equal to the set energy value. At this point, the position is used as an interpolation node.

[0019] Furthermore, the relationship between step size and curvature is as follows:

[0020]

[0021] Furthermore, when s n-2 With s n-1 If the single-step energy value between them is less than the set energy value, then there is no need to set an interpolation node.

[0022] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the robot spline interpolation node selection method.

[0023] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0024] 1. This invention can quickly determine the minimum position and number of nodes required to track a trajectory using spline interpolation, and is used to assist in motion planning methods based on hierarchical search trees and the generation of robot teaching programs.

[0025] 2. This invention presents the relationship between the maximum energy per step and the error. The value of the maximum energy per step can be adjusted according to the tracking accuracy requirements of the curve in the process. Specifically, it relates the three parameters bck to the set upper error limit err, obtained by fitting a standard circle. Before fitting, the upper error limit err is determined. Then, under different curvatures, the node growth step size is changed to ensure that the maximum error does not exceed err, and the bck parameters of the fitted expression are obtained. Attached Figure Description

[0026] Figure 1 This is a flowchart of the present invention;

[0027] Figure 2 This invention relates to a method for processing the natural boundaries of spline interpolation;

[0028] Figure 3 This is a schematic diagram illustrating the principle of selecting the next interpolation node in this invention. Detailed Implementation

[0029] The present invention will be further described in detail below with reference to the embodiments, but the implementation of the present invention is not limited thereto.

[0030] This invention provides a method for selecting interpolation nodes in robot spline interpolation with single-step energy loss. The method involves setting a fixed energy value, starting from the first interpolation node, and accumulating the energy consumed during "walking" along the curve. When the consumed energy reaches the fixed energy limit, the method stops and the current position is designated as a new interpolation node. This process is repeated from the previous point until the last interpolation node is reached, thus completing the selection of interpolation nodes for the entire curve.

[0031] The curvature of a curve is a crucial factor influencing the distribution of interpolation nodes in spline interpolation. Generally, assuming a constant curve length and that the maximum error between the interpolated and original curves does not exceed a fixed value, the more curved the curve, the denser the distribution of interpolation nodes; conversely, the straighter the curve, the sparser the distribution of interpolation nodes. When the curve completely degenerates into a straight line, only the beginning and end points need to be used as interpolation nodes to complete the required interpolation. This invention uses curvature variation to describe the curvature of the curve. Curvature conforms to the correlation and distribution conditions of interpolation nodes; the greater the curvature, the denser the node distribution. Furthermore, because the curvature distribution of a curve is often not constant, to ensure that the curvature distribution can guide the distribution of interpolation nodes, this invention does not calculate the node distribution as a whole using methods such as equidistant nodes or Lagrange nodes. Instead, it determines the distribution of interpolation nodes one by one using a variable single-step size. For free curves with variable curvature, an integral expression is constructed to calculate the energy consumed in the process of moving from any point to the next point over any length. This invention sets a fixed maximum energy value for this process. When the energy consumed reaches this maximum energy value, it indicates that the single-step length of this curve has reached its maximum value.

[0032] like Figure 1 As shown, the specific technical solution includes the following steps:

[0033] S1. For welding, the welding torch is required to move along the weld seam, so the trajectory profile of the weld seam can be directly picked from the joint line of the workpiece model.

[0034] S2. The various shapes of welds picked up are discretized according to a certain resolution to obtain a series of uniform discrete points, and the position coordinates of the discrete points, as well as the first derivative, second derivative, etc. of the curve at the corresponding position are recorded.

[0035] S3. Calculate the curvature of the discrete points in the curve based on the first and second derivatives;

[0036]

[0037] In the formula, r(t) refers to the given trajectory, r′(t) and r″(t) are the first and second derivatives of the trajectory, respectively, and ‖‖ represents the magnitude of the vector.

[0038] S4 determines the starting point of the welding segment as the first interpolation node s0 and the target point as the last interpolation node s0, based on the welding requirements. n ;

[0039] S5. Because the MOVS instructions from major robot manufacturers use natural boundaries as boundary conditions for interpolation, the interpolation nodes at both ends can only provide positional constraints on the interpolation curve. Influenced by the boundaries, the step size calculated from the curvature cannot control the error between the first and last interpolation intervals. Therefore, at endpoints s0 and s... n Add an interpolation node s1 and s2 at each discrete point separated by Δ. n-1 , where Δ is a small value. During spline interpolation, these two points approximately replace the nodes at both ends, providing constraints for the first and second derivatives of the spline interpolation of the entire curve.

[0040] like Figure 2 This shows that relying solely on curvature to select interpolation nodes to complete spline interpolation of natural boundaries is insufficient. By adding an additional interpolation node at a distance Δ from the endpoint on both sides, the spline interpolation of natural boundaries can be approximately transformed into spline interpolation of clamped boundaries, resulting in higher curve fitting accuracy.

[0041] like Figure 3 As shown, S6, starting from s1, to s n-1 Within the terminated interval, the step size is adjusted so that the energy value of a single step is approximately equal to the maximum energy value, and the intermediate interpolation nodes are calculated one by one.

[0042] In this embodiment, step S2 discretizes the curve and obtains the location information, first derivative, and second derivative of the discrete points.

[0043] In this embodiment, the specific steps for calculating the current step size and selecting the interpolation node in step S6 are as follows:

[0044] S61. First, assume the curvature of the curve remains constant, and calculate the step size based on the curvature at the current position as an estimate of the actual step size. When the curvature of the curve remains constant, the relationship between the step size and the curvature is:

[0045]

[0046] Among them, the constants ENERGY, b, c, and k are all related to the maximum error between the interpolated curve and the original curve. They are parameters obtained by fitting from the statistical data of spline interpolation experiments based on a circle. In this example, ENERGY = 11.3134; b = 11.3134; c = 67.7262; and k = 0.0152.

[0047] These constants were obtained by fitting the spline interpolation experiment with equidistant nodes on a standard circle. A circle was used because its curvature is constant; therefore, even when extracting interpolation nodes based on curvature, the nodes are equidistant. By limiting the maximum error to err0, and then using a circle to try different equidistant step sizes, the relationship between the step size and curvature was fitted. In this example, err0 = 15 was used.

[0048] Using a given circular trajectory is to obtain the relationship between curvature and node step size within a constrained maximum error range, and to fit a formula. This formula is then applied to other given free curves with more random curvature variations.

[0049] The reason for using a circle is that its curvature is constant, and the distribution of its interpolation nodes is known to be equidistant, making it more convenient to study curvature and node step size without additional interference.

[0050] The radius of the circle is controlled by its curvature. Because fitting requires uniform data to determine the relationship between curvature and step size, the radius of the circle is set by increasing the curvature at equal intervals.

[0051] S62. Adjust the step size based on the estimated step size until the single-step energy value calculated by integration within the step size equals the limit energy value. This is the current true step size.

[0052]

[0053] energy == ENERGY.

[0054] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the robot spline interpolation node selection method.

[0055] This invention can quickly determine the minimum number and position of nodes required to track a trajectory using spline interpolation, thus assisting in motion planning methods based on hierarchical search trees and the generation of robot teaching programs. This invention provides the relationship between the maximum energy per step and the error, allowing adjustment of the maximum energy per step based on the required tracking accuracy of the curve in the manufacturing process.

[0056] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the embodiments described above. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for selecting robot spline interpolation nodes based on single-step energy loss, characterized in that, include: Input the trajectory to be tracked by the robot's end effector; The trajectory to be tracked is discretized to obtain ordered discrete points, and the position information and curvature information corresponding to the discrete points are recorded. Set the starting and ending points of the trajectory to be tracked as the first interpolation node. and the last interpolation node In relation to and Distance Add an interpolation node at each of the discrete point locations. and ,exist and Within the interval, the step size is adjusted to make the single-step energy value equal to the set energy value. The position of the energy value is set as an interpolation node, and all interpolation nodes within the interval are obtained. The formula for calculating the single-step energy value is: Where R and curv are the radius of curvature and curvature of the curve, respectively, k, c, and b are constants, step and i are parameters of the given trajectory, i is the i-th discrete point, step is the step size, and the length of the curve between the i-th discrete point and the (i+step)-th discrete point is step. Calculate the curvature of discrete points in the curve, specifically as follows: In the formula, Given a trajectory, and These are the first and second derivatives of the trajectory, respectively. Represents the magnitude of a vector; exist and Within the interval, the step size is adjusted so that the single-step energy value equals the set energy value. The position of the set energy value is used as an interpolation node. Specifically: First, assume that the curvature of the curve remains constant, and calculate the step size based on the curvature at the current position as an estimate of the actual step size; Adjust the size of the estimated value so that the single-step energy value calculated by the integral within the step size is equal to the set energy value, and the position at this time is used as an interpolation node; The relationship between step size and curvature is: ; in, , , , It is a constant.

2. The method for selecting robot spline interpolation nodes according to claim 1, characterized in that, The constants k, c, and b are obtained by fitting the distribution pattern of standard circular interpolation nodes.

3. The method for selecting robot spline interpolation nodes according to claim 1, characterized in that, when and If the single-step energy value between nodes is less than the set energy value, then there is no need to set an interpolation node.

4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the robot spline interpolation node selection method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Error-controllable four-axis industrial robot B-spline transition type smooth trajectory generating method

    CN109664303A

  • Robot trajectory planning method, device and system for realizing C2 continuity

    CN113103240A