Variable synchronization ratio free curvilinear motion interpolation method based on NURBS

Through the variable synchronization ratio free curve motion interpolation method based on NURBS, the curvature feature segmentation and synchronous motion control are utilized to solve the problems of accuracy and efficiency and multi-axis synchronization in free curve interpolation, and achieve high-precision and efficient motion interpolation.

CN120704250APending Publication Date: 2025-09-26BEIJING INSTITUTE OF PETROCHEMICAL TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510891277.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing free-curve motion interpolation methods have difficulty balancing accuracy and efficiency, and traditional interpolation methods fail to effectively coordinate multi-axis motion synchronization, resulting in large interpolation errors.

Method used

A variable synchronization ratio free curve motion interpolation method based on NURBS establishes the synchronous motion relationship between the virtual axis and the physical axis through curvature feature segmentation and NURBS curve fitting, and dynamically adjusts the synchronization ratio to ensure the synchronization of each axis.

Benefits of technology

The interpolation accuracy of the free curve trajectory and the stability of the overall interpolation process are improved, the interpolation error is significantly reduced, and efficient and high-precision motion control is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704250A_ABST
    Figure CN120704250A_ABST
Patent Text Reader

Abstract

The invention discloses a variable synchronization ratio free curve motion interpolation method based on NURBS, and the method comprises the steps: segmenting track data points based on curvature features, and generating an ordered sub-data point set; performing NURBS curve fitting on each sub data point set, and constructing a segmented NURBS free curve; calculating a unit parameter increment of each interpolation period according to the starting position, the ending position and the NURBS parameter of the curve to be interpolated; creating a virtual axis M as a guide axis of synchronous movement, and taking a physical axis X and an axis Y as following axes; calculating the synchronization ratio of each interpolation period by using the unit parameter increment; the virtual axis M is activated to move, the synchronization ratio of the current interpolation period is updated according to the movement track of the virtual axis M, the physical axis X and the axis Y move according to the updated synchronization ratio until the virtual axis M moves to the end point of the NURBS curve parameter corresponding to the end point, and interpolation is completed. According to the method, the interpolation error is remarkably reduced, and high-precision free curve interpolation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motion control, and in particular to a NURBS-based variable synchronization ratio free curve motion interpolation method. Background Art

[0002] Free curves are a type of curve that is more complex than simple curves such as straight lines and circular arcs. They are usually difficult to accurately describe using simple analytical equations (such as straight line equations, parametric equations of circles, etc.). They are widely used in precision measurement, high-end manufacturing and other fields. As a key technology for complex motion control, free curve motion interpolation methods directly affect the trajectory accuracy and operating efficiency of moving objects. Traditional motion interpolation methods based on straight lines or circular arcs have the advantages of simple algorithms, fast calculation speed, and easy implementation. However, since free curves are usually represented by discrete point information, directly applying such methods to implement free curve motion interpolation will lead to unacceptable interpolation errors. In the research on free curve motion interpolation methods, the "fit first, then move" strategy is currently generally adopted, that is, first fitting the target interpolation trajectory based on the given discrete point information, and then using the existing motion interpolation method to perform motion interpolation on the obtained target interpolation trajectory. Although it can obtain better interpolation accuracy than directly applying traditional motion interpolation methods, there are still some problems, which are mainly reflected in the following two aspects:

[0003] On the one hand, spline curve fitting is often used to ensure that the target interpolation trajectory passes through all discrete points as much as possible while maintaining good smoothness to minimize sudden changes in velocity during motion interpolation. In recent years, non-uniform rational B-splines (NURBS) have attracted widespread attention due to their excellent properties, such as the ability to accurately describe complex curves using unified mathematical expressions and their local controllability. In the fitting process based on NURBS curves, according to different fitting strategies, it can usually be divided into two categories: global fitting and piecewise fitting. Among them, global fitting is to use all discrete point information to fit a NURBS curve. In order to improve the ability of NURBS curves to represent complex curves, higher-order NURBS curves are often required. The number of control points is large, which increases the complexity of interpolation point calculation and the difficulty of algorithm implementation, and reduces the overall efficiency of free curve motion interpolation; piecewise fitting is based on the geometric characteristics of discrete points. Under certain constraints, the discrete points are divided into multiple segments, and the discrete points of each segment are fitted separately to obtain multiple NURBS curves. Since the number of discrete points in each segment is small and the curve shape is simpler, lower-order NURBS curves can be used to achieve the same accuracy as global fitting, which significantly reduces the complexity of interpolation point calculation and the difficulty of algorithm implementation, and helps to improve interpolation efficiency. However, existing piecewise fitting methods based on NURBS curves often use a fixed number of control points for each segment or rely on manual experience to set the number. These methods fail to adapt to the shape complexity of the curve segment itself. For complex curve segments, fewer control points cannot guarantee fitting accuracy, resulting in large shape deviations. For simple, smooth curve segments, too many control points will cause data redundancy, unnecessarily increasing the computational burden of subsequent interpolation. This inability to strike a balance between fitting accuracy and computational efficiency has restricted the overall performance of piecewise fitting methods based on NURBS curves.

[0004] On the other hand, while traditional motion interpolation methods, such as the point-by-point comparison method and the digital differential analyzer (DDA), can effectively implement linear or circular interpolation, they do not consider the asynchrony of motion caused by dynamic characteristics mismatch among multiple motion axes. This results in large interpolation errors when interpolating the fitted target interpolation trajectory. In recent years, researchers have proposed a variable synchronization ratio circular interpolation method to address the large interpolation errors caused by axis asynchrony. This method utilizes synchronous motion control to ensure strict synchronization of the position and velocity of each physical axis. Circular interpolation is achieved by dynamically adjusting the synchronization ratio, significantly improving the accuracy of circular interpolation. However, this method uses an equal-angle uniform interpolation strategy, which has inherent drawbacks when processing free-form curves. Since the relationship between the parameters of a free-form curve and its arc length is usually nonlinear, equal-parameter interval interpolation is not equivalent to equal-arc-length interval interpolation. This mismatch directly leads to interpolation errors, limiting further improvement in the performance of free-form curve motion interpolation. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for variable synchronization ratio free curve motion interpolation based on NURBS, which can effectively coordinate the linkage of various physical axes and overcome the large interpolation errors caused by the mismatch of dynamic responses of various physical axes, thereby further improving the interpolation accuracy of the free curve trajectory, and significantly improving the interpolation accuracy of the motion trajectory and the smoothness of the overall interpolation process.

[0006] The purpose of the present invention is achieved through the following technical solutions:

[0007] A method for interpolating free-form curve motion with variable synchronization ratio based on NURBS, the method comprising:

[0008] Step 1: For the free curve trajectory described by a series of discrete data points, segment it based on the curvature characteristics to generate multiple ordered sub-data point sets Seg l ;

[0009] Step 2: For each sub-data point set Seg generated in step 1 l Perform NURBS curve approximation fitting to construct a piecewise defined parameterized NURBS curve. This NURBS curve is the target trajectory for subsequent interpolation and is collectively referred to as the NURBS curve to be interpolated C(u).

[0010] Step 3: Establish a rectangular coordinate system and calculate the unit NURBS curve parameter increment of each interpolation cycle using the starting position, end position and NURBS curve parameter increment of the NURBS curve to be interpolated C(u);

[0011] Step 4: Create a virtual axis M as the leading axis of the synchronous motion, and use the actual physical axes X and Y as the following axes of the synchronous motion to establish the synchronous motion relationship between the virtual axis and the physical axis;

[0012] Step 5: Based on the positional relationship between the virtual axis M and the physical axes X and Y during the synchronous motion, the synchronous motion relationship between the physical axes X and Y following the virtual axis M is obtained, and the synchronization ratio of each interpolation cycle is calculated using the unit NURBS curve parameter increment obtained in step 3;

[0013] Step 6. Activate the motion of the virtual axis M and update the synchronization ratio of the current interpolation cycle according to the motion trajectory of the virtual axis M. Make the physical axes X and Y move at the updated synchronization ratio. When the virtual axis M moves to the end point of the NURBS curve parameter to be interpolated, the interpolation is completed and the free curve interpolation process ends.

[0014] It can be seen from the technical solution provided by the present invention that the above method can effectively coordinate the linkage of each physical axis and overcome the large interpolation error caused by the mismatch of dynamic response of each physical axis, thereby further improving the interpolation accuracy of the free curve trajectory, and significantly improving the interpolation accuracy of the motion trajectory and the smoothness of the overall interpolation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 A flowchart of a method for NURBS-based variable synchronization ratio free curve motion interpolation provided by an embodiment of the present invention;

[0017] Figure 2 This is a schematic diagram of piecewise fitting of a free curve represented by discrete points according to an embodiment of the present invention;

[0018] Figure 3 This is a schematic diagram of the relationship between the physical axis position and the NURBS curve parameter u during the free curve motion interpolation according to an embodiment of the present invention;

[0019] Figure 4 A schematic diagram of the coordinates of the interpolation trajectory sampling points according to an embodiment of the present invention;

[0020] Figure 5 This is a schematic diagram comparing the MSE results of various methods for the same interpolation trajectory under the conditions of speed v=10mm / s and interpolation step size of 1mm in the example of the present invention;

[0021] Figure 6 This is a schematic diagram of the δ variation curve of each method for the same interpolation trajectory under the conditions of speed v=10mm / s and interpolation step length of 1mm in the example of the present invention. DETAILED DESCRIPTION

[0022] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments, and do not constitute a limitation of the present invention. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] like Figure 1 FIG. 1 is a flow chart of a method for NURBS-based variable synchronization ratio free curve motion interpolation according to an embodiment of the present invention, wherein the method includes:

[0024] Step 1: For the free curve trajectory described by a series of discrete data points, segment it based on the curvature characteristics to generate multiple ordered sub-data point sets Seg l ;

[0025] In this step, a set of ordered discrete data points representing the desired motion trajectory is first obtained by scanning, measurement, or digital modeling software. The set is denoted as {P0, P1, ..., P m}, where P q is the coordinate of the qth data point, where q is the index from 0 to m;

[0026] For a set of discrete data points {P0,P1,...,P m} Perform geometric feature analysis and calculate the curvature value of the data point sequence, including the first-order derivative and second-order derivative of each data point. According to the first-order and second-order derivative values, the curvature calculation formula (1) is used:

[0027] κ=|x'y"-y'x"| / (x' 2 +y' 2 ) 3 / 2 (1)

[0028] Where κ represents the curvature value of the data point sequence; x' and y' are the first-order derivatives of the original data curve coordinates; x" and y" are the second-order derivatives of the original data curve coordinates;

[0029] Get the curvature value sequence of each point on the original data curve trajectory, and divide the original discrete data point set into s ordered sub-data point sets according to the identified one or more feature points, denoted as Seg l ={P l,0 ,P l,1,...,P l,r}; where l = 0, ..., s-1, r represents the index of the last data point in the lth sub-data point set; each sub-data point set Seg l Corresponding to a local curve segment of the original data curve trajectory.

[0030] Step 2: For each sub-data point set Seg generated in step 1 l Perform NURBS curve approximation fitting to construct a piecewise defined parameterized NURBS curve. This NURBS curve is the target trajectory for subsequent interpolation and is collectively referred to as the NURBS curve to be interpolated C(u).

[0031] In this step, if Figure 2 The figure shows a schematic diagram of the segmented fitting of a free curve represented by discrete points according to an embodiment of the present invention. In order to ensure the continuity between the curve segments and the accurate matching with the original data points, the NURBS curve C generated by the fitting is l The first control point d of (u) l,0 The first data point P of the curve l,0 Coincident, the last control point d l,n The last data point P of the curve l,r coincide;

[0032] Set the range of control points, including the minimum number of control points N min and the maximum number of control points N max , according to the average curvature of the current data segment The maximum curvature k of the entire trajectory max The ratio of the number of control points N required for this segment is dynamically calculated. cp , the calculation formula is:

[0033]

[0034] After determining the number of control points N cp Afterwards, for the NURBS curve C l (u) The remaining r-1 control points are located by solving a least squares problem to minimize the distance between all data points and their positions on the NURBS curve C. l (u) is the sum of the squares of the Euclidean distances corresponding to the parameter value u, while satisfying the fixed first and last control point constraints;

[0035] For each NURBS curve C l (u), stores the NURBS parameters obtained by fitting, including the control point set {d l}、Node vector U l , order p l and weight w l;

[0036] {dl}wl

[0037] The NURBS parameter sets of all segments are saved, and interpolation motion control is performed based on these segmented NURBS.

[0038] Step 3: Establish a rectangular coordinate system and calculate the unit NURBS curve parameter increment of each interpolation cycle using the starting position, end position and NURBS curve parameter increment of the NURBS curve to be interpolated C(u);

[0039] In this step, the parametric equation of the NURBS curve C(u) to be interpolated is expressed as:

[0040]

[0041] Where j = 0, 1, ..., n; w i is the weight factor of the control point; d j is the control point of the curve; N j,p (u) is the j-th p-order B-spline basis function, which is defined on the node vector U: U={u0,u1,…,u n+p+1}, generally, take u0=u1=…=u p =0,u n+1 =u n+2 =…=u n+p+1 =1, the other parameters u∈[0,1] and their values ​​are monotonically increasing;

[0042] The starting point of the NURBS curve C(u) to be interpolated is P0=C(u0), and the end point is P n =C(u n ); define the end point of the i-th interpolation cycle as They represent the target positions that the physical axis X and axis Y should reach at the end of the i-th interpolation cycle. If the total number of interpolation steps is N, then the value range of i is 1, 2, ...N;

[0043] Define u i is the curve parameter value corresponding to the virtual axis of the interpolated NURBS curve C(u) at the end of the i-th interpolation cycle. Assuming the initial value of the parameter is u0, the target end point P of the i-th interpolation cycle is i It is the NURBS curve to be interpolated C(u) at the parameter value u i The evaluation result is P i =C(u i ), when u n =1, indicating that the interpolation of the NURBS curve C(u) to be interpolated is completed;

[0044] The unit NURBS curve parameter increment Δu corresponding to each interpolation cycle step is calculated using the following formula (4):

[0045] Δu=u i -u i-1 =(u n -u0) / N (4).

[0046] Step 4: Create a virtual axis M as the leading axis of the synchronous motion, and use the actual physical axes X and Y as the following axes of the synchronous motion to establish the synchronous motion relationship between the virtual axis and the physical axis;

[0047] In this step, the physical axes X and Y of the actual movement are initialized and moved to the starting position P0 = C(u0) of the NURBS curve to be interpolated C(u), and the interpolation speed is set to v, where v is a constant, to construct a virtual axis M.

[0048] The position of the virtual axis M is defined as parameter u of the NURBS curve to be interpolated C(u). The kinematic characteristics of the virtual axis M correspond to the monotonically increasing parameter u. The virtual axis M is used as the leading axis of the synchronous motion, and the physical axes X and Y are used as the following axes of the synchronous motion. A dynamic synchronous motion relationship is established between the virtual axis M and the physical axes X and Y.

[0049] like Figure 3 The figure shows the relationship between the physical axis position and the NURBS curve parameter u during the free curve motion interpolation according to the embodiment of the present invention. According to the parameter equation of the NURBS curve (3), the position coordinates of the physical axis X and the physical axis Y on the NURBS curve as the parameter u changes are C x (u) and C y (u), is calculated using the following formula (5):

[0050]

[0051] Where, and represents the jth control point d j The X and Y coordinates of w j represents the weight factor of the jth control point; N j,p (u) represents the j-th p-order B-spline basis function; n represents the highest index of the control point.

[0052] Step 5: Based on the positional relationship between the virtual axis M and the physical axes X and Y during the synchronous motion, the synchronous motion relationship between the physical axes X and Y following the virtual axis M is obtained, and the synchronization ratio of each interpolation cycle is calculated using the unit NURBS curve parameter increment obtained in step 3;

[0053] In this step, synchronous motion control takes into account factors such as axis dynamic response mismatch and servo delay, and can ensure the position and speed synchronization of multiple axes during the motion process to the greatest extent. The motion axes that need to be synchronized are in a leading and following relationship, that is, they usually include a leading axis and multiple following axes. After the following axis establishes a synchronous relationship with the leading axis, the following axis can always maintain synchronous motion with the leading axis. During the synchronous motion, the virtual axis M and the physical axis X and the physical axis Y have the following position relationship (6):

[0054]

[0055] Where, Respectively represent the end positions of the physical axis X and axis Y in the i-th interpolation cycle; They represent the end positions of the virtual axis M at the i-1th and i-th interpolation cycles respectively; They represent the synchronization ratios of the physical axis X and axis Y following the virtual axis M in the i-th interpolation cycle;

[0056] According to formula (6), the synchronization ratio with the virtual axis M and the physical axis X and physical axis Y positions as intermediate parameters is obtained:

[0057]

[0058] Substituting equation (5) into equation (7), we can obtain the synchronization ratio of the i-th interpolation cycle:

[0059]

[0060] will u i -u i-1 Expressed as Δu, the synchronization ratio of each interpolation cycle is calculated according to the following formula (9):

[0061]

[0062] Step 6. Activate the motion of the virtual axis M and update the synchronization ratio of the current interpolation cycle according to the motion trajectory of the virtual axis M. Make the physical axes X and Y move at the updated synchronization ratio. When the virtual axis M moves to the end point of the corresponding NURBS curve parameter, the interpolation is completed and the free curve interpolation process ends.

[0063] In this step, define the variable u M It is used to store the parameter value of the target NURBS curve corresponding to the virtual axis M in each interpolation cycle when calculating and updating the synchronization ratio of the next cycle, and assign the NURBS parameter value at the end of the first interpolation cycle determined by the virtual axis M to the variable u i ;

[0064] Define the variable k X 、k YStore the synchronization ratio of physical axis X and physical axis Y respectively, and store the synchronization ratio of the first interpolation cycle Assign values ​​to variables k respectively X 、k Y ;

[0065] Activate the virtual axis M to move at a speed of v M From the NURBS curve parameter u0 corresponding to the starting point to the NURBS curve parameter u corresponding to the end point n Movement; when the virtual axis M completes the movement of the current i-th interpolation cycle, that is, the parameter reaches u i =u0+iΔu, judge the variable u M Whether the NURBS curve parameter u corresponding to the end point is reached n ;

[0066] If u M ≠u n , then let i++, that is, the i+1th interpolation cycle, and update the synchronization ratio of the current interpolation cycle, that is, when the synchronization ratio is changed in advance in the i+1th interpolation cycle, the NURBS curve parameter corresponding to the virtual axis M is Assign value to variable u M , and at the same time, the synchronization ratio of the i+1th interpolation cycle Assign values ​​to variables k respectively X 、k Y , so that the physical axis X and the physical axis Y move at the updated synchronization ratio;

[0067] If u M =u n , it indicates that the virtual axis M moves to the end point of the NURBS curve to be interpolated, and the free curve interpolation process ends.

[0068] It should be noted that the contents not described in detail in the embodiments of the present invention belong to the prior art known to those skilled in the art.

[0069] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method.

[0070] An embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method.

[0071] The following is an example of the implementation of the above method. In this example, a predefined free curve is used as an example. A series of original ordered discrete data points that can preliminarily describe the "Trident" curve are obtained through CAD software design. Two physical axes are defined as axis X and axis Y, and the initial interpolation speed v = 10mm / s, with a maximum acceleration of 100mm / s. 2 , the maximum deceleration is -100mm / s 2 , acceleration j = 50000 mm / s 3 .

[0072] First, the original discrete data point set {P0,P1,...,P m} to perform geometric feature analysis and calculate the approximate curvature value between each data point through numerical differentiation method; according to the calculated curvature sequence, identify the feature points with significant curvature changes; based on the identified feature points, the original discrete data point set {P0, P1, ..., P m} is divided into 6 ordered sub-data point sets Seg1, Seg2, ... Seg6; each sub-data point set Seg l Corresponding to a local curve segment of the original curve trajectory, these six segments together constitute the complete trident curve shape.

[0073] After NURBS curve fitting on the six sub-data point sets, the parameters of each NURBS curve segment are obtained as shown in the following table. All curve segments use the third-order B-spline basis function:

[0074]

[0075] Through the above fitting, a trident free curve composed of 6 NURBS curves is constructed. This parameterized NURBS curve C(u) serves as the precise geometric basis for subsequent interpolation motion.

[0076] The unit parameter increment Δu of the NURBS curve is calculated using the above formula (2):

[0077] Δu=(1-0) / 500=0.002

[0078] Before free curve interpolation, move the physical axis X and the physical axis Y to the starting point of the trident curve, create a virtual axis M, and establish a synchronous relationship between the virtual axis M and the physical axis X and axis Y;

[0079] Using the above formula (4), the position relationship between axis X and axis Y in the first interpolation cycle is obtained:

[0080]

[0081] Then use the above formula (3) to calculate the coordinates of the NURBS corresponding to the first interpolation period:

[0082]

[0083] Therefore, the synchronization ratio of the first interpolation cycle is:

[0084]

[0085] The calculated synchronization ratio of the first interpolation cycle Assign values ​​to variables k respectively X 、k Y ; Activate the virtual axis M movement, make the virtual axis M move at the calculated speed v M From the NURBS curve parameter u0 corresponding to the starting point to the NURBS curve parameter u corresponding to the end point n Movement, while the physical axis X and physical axis Y move at the synchronization ratios of 19.662255 and 32.77401 respectively.

[0086] When the NURBS curve parameter u corresponding to the end point of the current interpolation cycle of the virtual axis M M When it is 0.002, the judgment parameter u M The NURBS curve parameter u corresponding to the end point has not been reached n , continue to update the synchronization ratio, that is, the synchronization ratio of the i-th interpolation cycle calculated in step 5 Assign values ​​to variables k respectively X 、k Y , so that the physical axis X and the physical axis Y move at the updated synchronization ratio until the virtual axis M moves to the end point of the NURBS curve, and the free curve interpolation process ends.

[0087] In order to further verify the effectiveness of the above method, the results of this implementation method are compared with the results of the existing DDA interpolation method:

[0088] The mean squared error (MSE) is used as the interpolation accuracy evaluation index. MSE is defined as the average of the squares of the Euclidean distances between the sampling points on the actual interpolation trajectory and the corresponding parameter points on the theoretical NURBS:

[0089]

[0090] Where N is the number of sampling points on the trajectory; s is the sequence number of the sampling point; x′ s ,y s ′ represents the interpolation trajectory sampling point d′ s Coordinate; x s ,y s Represents the theoretical NURBS sampling point d scoordinates; δ s is the contour error at the sth sampling point, like Figure 4 FIG. 4 is a schematic diagram showing the coordinates of the sampling points of the interpolation trajectory according to an embodiment of the present invention.

[0091] like Figure 5 The figure shows the MSE comparison results of the various methods for the same interpolation trajectory under the conditions of speed v=10mm / s and interpolation step length of 1mm in the example of the present invention. Figure 5 It can be seen that since this embodiment utilizes synchronous motion control, the interpolation error caused by the asynchrony of the physical axes is effectively reduced. Under different interpolation step sizes and different interpolation speeds, the MSE is smaller and the interpolation accuracy is higher.

[0092] like Figure 6 The figure shows the curve diagram of δ variation of each method for the same interpolation trajectory under the conditions of speed v=10mm / s and interpolation step length of 1mm in the example of the present invention. Figure 6 It can be clearly observed that: in this embodiment, δ is smaller, the interpolation error is smaller, and the interpolation accuracy is higher.

[0093] In summary, the method described in the embodiments of the present invention can accurately ensure the synchronous motion of each physical axis during the interpolation process. This method segments discrete data points based on curvature characteristics and performs NURBS curve fitting on each segment to generate an accurate and continuous parameterized NURBS free-form curve. It then constructs a virtual axis and dynamically calculates and adjusts the synchronization ratio of each physical axis during each interpolation cycle, ensuring that the combined motion of the physical axes closely approximates the ideal free-form curve trajectory, effectively reducing trajectory errors caused by the synchronization of the motion of each axis, and ultimately achieving high-precision and high-efficiency interpolation of the free-form curve.

[0094] In addition, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0095] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims. The information disclosed in the background technology section of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or any form of implication that the information constitutes prior art already known to those skilled in the art.

Claims

1. A method for interpolating free-form curve motion with variable synchronization ratio based on NURBS, characterized in that: The method comprises: Step 1: For the free curve trajectory described by a series of discrete data points, segment it based on the curvature characteristics to generate multiple ordered sub-data point sets Seg l ; Step 2: For each sub-data point set Seg generated in step 1 l Perform NURBS curve approximation fitting to construct a piecewise defined parameterized NURBS curve. This NURBS curve is the target trajectory for subsequent interpolation and is collectively referred to as the NURBS curve to be interpolated C(u). Step 3: Establish a rectangular coordinate system and calculate the unit NURBS curve parameter increment of each interpolation cycle using the starting position, end position and NURBS curve parameter increment of the NURBS curve to be interpolated C(u); Step 4: Create a virtual axis M as the leading axis of the synchronous motion, and use the actual physical axes X and Y as the following axes of the synchronous motion to establish the synchronous motion relationship between the virtual axis and the physical axis; Step 5: Based on the positional relationship between the virtual axis M and the physical axes X and Y during the synchronous motion, the synchronous motion relationship between the physical axes X and Y following the virtual axis M is obtained, and the synchronization ratio of each interpolation cycle is calculated using the unit NURBS curve parameter increment obtained in step 3; Step 6. Activate the motion of the virtual axis M and update the synchronization ratio of the current interpolation cycle according to the motion trajectory of the virtual axis M. Make the physical axes X and Y move at the updated synchronization ratio. When the virtual axis M moves to the end point of the NURBS curve parameter to be interpolated, the interpolation is completed and the free curve interpolation process ends.

2. The method for NURBS-based variable synchronization ratio free curve motion interpolation according to claim 1, characterized in that: The process of step 1 is specifically as follows: First, a set of ordered discrete data points representing the desired motion trajectory is obtained by scanning, measuring or digital modeling software. The set is recorded as {P0,P1,...,P m }, where P q is the coordinate of the qth data point, where q is the index from 0 to m; For a set of discrete data points {P0,P1,...,P m } Perform geometric feature analysis and calculate the curvature value of the data point sequence, including the first-order derivative and second-order derivative of each data point. According to the first-order and second-order derivative values, the curvature calculation formula (1) is used: κ=|x'y”-y'x”| / (x' 2 +y' 2 ) 3 / 2 (1) Where κ represents the curvature value of the data point sequence; x' and y' are the first-order derivatives of the original data curve coordinates; x" and y" are the second-order derivatives of the original data curve coordinates; Get the curvature value sequence of each point on the original data curve trajectory, and divide the original discrete data point set into s ordered sub-data point sets according to the identified one or more feature points, denoted as Seg l ={P l,0 ,P l,1 ,...,P l,r }; where l = 0, ..., s-1, r represents the index of the last data point in the lth sub-data point set; each sub-data point set Seg l Corresponding to a local curve segment of the original data curve trajectory.

3. The method for NURBS-based variable synchronization ratio free curve motion interpolation according to claim 2, characterized in that: The process of step 2 is specifically as follows: In order to ensure the continuity between the curve segments and the accurate matching with the original data points, the NURBS curve C generated by fitting l The first control point d of (u) l,0 The first data point P of the curve l,0 Coincident, the last control point d l,n The last data point P of the curve l,r coincide; Set the range of control points, including the minimum number of control points N min and the maximum number of control points N max , according to the average curvature of the current data segment The maximum curvature k of the entire trajectory max The ratio of the number of control points N required for this segment is dynamically calculated. cp , the calculation formula is: After determining the number of control points N cp Afterwards, for the NURBS curve C l (u) The remaining r-1 control points are located by solving a least squares problem to minimize the distance between all data points and their positions on the NURBS curve C. l (u) is the sum of the squares of the Euclidean distances corresponding to the parameter value u, while satisfying the fixed first and last control point constraints; For each NURBS curve C l (u), stores the NURBS parameters obtained by fitting, including the control point set {d l }、Node vector U l , order p l and weight w l ; The NURBS parameter sets of all segments are saved, and interpolation motion control is performed based on these segmented NURBS.

4. The method for NURBS-based variable synchronization ratio free curve motion interpolation according to claim 3, characterized in that: The process of step 3 is specifically as follows: The parametric equation of the NURBS curve C(u) to be interpolated is expressed as: Where j = 0, 1, ..., n; w i is the weight factor of the control point; d j is the control point of the curve; N j,p (u) is the j-th p-order B-spline basis function, which is defined on the node vector U: U={u0,u1,…,u n+p+1 }, take u0=u1=...=u p =0,u n+1 =u n+2 =...=u n+p+1 =1, the other parameters u∈[0,1] and their values ​​are monotonically increasing; The starting point of the NURBS curve C(u) to be interpolated is P0=C(u0), and the end point is P n =C(u n ); define the end point of the i-th interpolation cycle as They represent the target positions that the physical axis X and axis Y should reach at the end of the i-th interpolation cycle. If the total number of interpolation steps is N, then the value range of i is 1, 2, ...N; Define u i is the curve parameter value corresponding to the virtual axis of the interpolated NURBS curve C(u) at the end of the i-th interpolation cycle. Assuming the initial value of the parameter is u0, the target end point P of the i-th interpolation cycle is i It is the NURBS curve to be interpolated C(u) at the parameter value u i The evaluation result is P i =C(u i ), when u n =1, indicating that the interpolation of the NURBS curve C(u) to be interpolated is completed; The unit NURBS curve parameter increment Δu corresponding to each interpolation cycle step is calculated using the following formula (4): Δu=u i -u i-1 (u n −u0) / N (4)。 5. The method for NURBS-based variable synchronization ratio free curve motion interpolation according to claim 4, characterized in that: The process of step 4 is specifically as follows: Initialize the physical axes X and Y of the actual movement, move them to the starting position P0 = C(u0) of the NURBS curve to be interpolated C(u), set the interpolation speed to v, where v is a constant, and construct a virtual axis M; The position of the virtual axis M is defined as parameter u of the NURBS curve to be interpolated C(u). The kinematic characteristics of the virtual axis M correspond to the monotonically increasing parameter u. The virtual axis M is used as the leading axis of the synchronous motion, and the physical axes X and Y are used as the following axes of the synchronous motion. A dynamic synchronous motion relationship is established between the virtual axis M and the physical axes X and Y. According to the parametric equation of the NURBS curve in formula (3), the position coordinates of the physical axis X and the physical axis Y on the NURBS curve as the parameter u changes are C x (u) and C y (u), is calculated using the following formula (5): Where, and represents the jth control point d j The X and Y coordinates of w j represents the weight factor of the jth control point; N j,p (u) represents the j-th p-order B-spline basis function; n represents the highest index of the control point.

6. The method for NURBS-based variable synchronization ratio free curve motion interpolation according to claim 5, characterized in that: In step 5, after the following axis establishes a synchronous relationship with the leading axis, the following axis can always maintain synchronous motion with the leading axis. During the synchronous motion, the virtual axis M and the physical axis X and the physical axis Y have the following positional relationship (6): Where, Respectively represent the end positions of the physical axis X and axis Y in the i-th interpolation cycle; They represent the end positions of the virtual axis M at the i-1th and i-th interpolation cycles respectively; They represent the synchronization ratios of the physical axis X and axis Y following the virtual axis M in the i-th interpolation cycle; According to formula (6), the synchronization ratio with the virtual axis M and the physical axis X and physical axis Y positions as intermediate parameters is obtained: Substituting equation (5) into equation (7), we can obtain the synchronization ratio of the i-th interpolation cycle: will u i -u i-1 Expressed as Δu, the synchronization ratio of each interpolation cycle is calculated according to the following formula (9):

7. The method for NURBS-based variable synchronization ratio free curve motion interpolation according to claim 1, characterized in that: The process of step 6 is specifically as follows: Define the variable u M It is used to store the parameter value of the target NURBS curve corresponding to the virtual axis M in each interpolation cycle when calculating and updating the synchronization ratio of the next cycle, and assign the NURBS parameter value at the end of the first interpolation cycle determined by the virtual axis M to the variable u i ; Define the variable k X 、k Y Store the synchronization ratio of physical axis X and physical axis Y respectively, and store the synchronization ratio of the first interpolation cycle Assign values ​​to variables k respectively X 、k Y ; Activate the virtual axis M to move at a speed of v M From the NURBS curve parameter u0 corresponding to the starting point to the NURBS curve parameter u corresponding to the end point n Movement; when the virtual axis M completes the movement of the current i-th interpolation cycle, that is, the parameter reaches u i =u0+iΔu, judge the variable u M Whether the NURBS curve parameter u corresponding to the end point is reached n ; If u M ≠u n , then let i++, that is, the i+1th interpolation cycle, and update the synchronization ratio of the current interpolation cycle, that is, when the synchronization ratio is changed in advance in the i+1th interpolation cycle, the NURBS curve parameter corresponding to the virtual axis M is Assign value to variable u M , and at the same time, the synchronization ratio of the i+1th interpolation cycle Assign values ​​to variables k respectively X 、k Y , so that the physical axis X and the physical axis Y move at the updated synchronization ratio; If u M =u n , it indicates that the virtual axis M moves to the end point of the NURBS curve C(u) to be interpolated, and the free curve interpolation process ends.

8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.

9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 7.