An adaptive curvature angle threshold hybrid real-time interpolation method based on NURBS curve

By using a real-time interpolation method based on NURBS curves with an adaptive curvature angle threshold, the interpolation strategy is dynamically adjusted. This solves the problems of decreased machining quality and wasted computational resources in flat areas caused by the attitude angle change of a five-axis CNC machine tool not exceeding the threshold in high curvature regions. It achieves efficient and smooth tool attitude planning.

CN122194862APending Publication Date: 2026-06-12NANJING TECH UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-14
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The existing trajectory interpolation algorithm for five-axis CNC machine tools may incorrectly use LERP in high curvature regions because the change in attitude angle does not exceed the threshold, resulting in a decrease in machining quality. Furthermore, excessive use of SLERP in flat regions leads to a waste of computational resources.

Method used

An adaptive curvature angle threshold hybrid real-time interpolation method based on NURBS curves is adopted. By calculating the curvature distribution characteristics of the tool trajectory, an exponential decay function model is established, the angle threshold is dynamically adjusted, and an appropriate interpolation method (LERP or SLERP) is selected for tool posture planning.

Benefits of technology

It improves tool posture smoothness in high curvature regions, avoids machining vibration marks, reduces computational resource consumption, improves machining accuracy and efficiency, and adapts to different machining scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application discloses a kind of adaptive curvature angle threshold hybrid real-time interpolation methods based on NURBS curve.Method includes: CAM system generates five-axis machining path, pre-processes NURBS cutter track to obtain curvature distribution characteristics, and according to this, the exponential decay function model of angle threshold is adaptively changed with curvature;In real-time interpolation stage, the system dynamically calculates optimal threshold according to the curvature value of current point, and according to this, it is decided to use linear interpolation LERP or quaternion spherical linear interpolation SLERP to carry out cutter posture planning;The method effectively optimizes the problem of low machining efficiency and machining surface quality defects caused by non-smooth cutter posture interpolation in five-axis machining process, realizes the prospective intelligent balance of machining precision and machining efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machining technology, specifically to an adaptive curvature angle threshold hybrid real-time interpolation method based on NURBS curves. Background Technology

[0002] Five-axis CNC machine tools are core equipment for machining complex curved surfaces and critical parts. Their machining performance is highly dependent on the trajectory interpolation algorithm of the CNC system. Trajectory interpolation not only needs to handle the position interpolation of the tool center point TCP, but also needs to synchronously plan the tool posture (tool axis vector). As shown in Figure 1, the mainstream tool axis vector interpolation methods currently include linear interpolation (LERP) and spherical linear interpolation (SLERP).

[0003] Linear interpolation (LERP) connects adjacent tool axis vectors with straight lines on a unit sphere, offering high computational efficiency. However, its interpolation path is not the actual required arc, leading to trajectory deviations and affecting machining accuracy. Furthermore, the interpolation points generated by LERP are unevenly distributed, often exhibiting more significant angular changes in the middle of the path than at the ends, resulting in uneven angular velocity transitions. In high-speed or high-precision machining, this trajectory irregularity can induce vibrations, further reducing overall trajectory quality. Therefore, LERP's performance in terms of interpolation accuracy, motion smoothness, and trajectory consistency is insufficient to meet the demands of high-requirement machining scenarios.

[0004] In contrast, spherical linear interpolation (SLERP) is based on quaternions and interpolates along a great circle path on a three-dimensional sphere. This ensures that the interpolation points are distributed along the spherical arc and maintains the consistency of arc length between adjacent interpolation points. Moreover, SLERP guarantees that the tool axis vector moves along the geodesic of a unit sphere, avoiding inherent defects such as path deviation and abrupt angle changes, and generating smooth attitude changes. However, the calculation involves trigonometric functions, resulting in higher overhead.

[0005] To balance efficiency and smoothness, existing technologies propose a hybrid interpolation strategy based on a fixed angle threshold. This strategy uses LERP when the change in attitude angle between adjacent tool positions is less than the fixed threshold, and SLERP otherwise. However, this method has significant drawbacks: First, the attitude angle change is a lagging indicator and cannot perceive the geometric essence (surface curvature) causing the attitude change. In high-curvature regions, too many tool positions may lead to incorrect LERP usage due to the attitude angle change not exceeding the threshold, resulting in decreased machining quality. Second, SLERP may be overused in flat regions, wasting computational resources.

[0006] To address the above problems, this invention innovatively proposes a hybrid real-time interpolation method based on an adaptive curvature angle threshold of NURBS curves. The core idea of ​​this method is to upgrade the decision-making basis of the interpolation strategy from static geometric quantities (fixed angles) to dynamic indicators deeply coupled with the geometric features (curvature) of the processed object, thereby achieving an intelligent and forward-looking balance between accuracy and efficiency. Summary of the Invention

[0007] The present invention aims to overcome the shortcomings of existing fixed threshold methods and provides an adaptive curvature tool axis vector interpolation method that solves the problems existing in the background art.

[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0009] A real-time interpolation method based on NURBS curves with adaptive curvature angle thresholds includes:

[0010] Step 1: The CAM system generates the five-axis machining path;

[0011] Step 2: Preprocess NURBS toolpath to obtain curvature distribution characteristics;

[0012] Step 3: Use curvature data to establish an exponential decay function model between the angle threshold and curvature;

[0013] Step 4: The model can adaptively adjust the angle threshold according to the curvature value, and decide whether to use linear interpolation (LERP) or quaternion spherical linear interpolation (SLERP) for tool posture planning accordingly.

[0014] Step 5: Convert the interpolated tool axis vector into displacement commands for each motion axis of the five-axis machine tool, and send them to the servo driver for execution.

[0015] In the preprocessing stage of step 2, the curvature of each point in the NURBS toolpath is calculated. Based on the trend of curvature value changes, a mathematical modeling method is used to construct a function relating curvature to an angle threshold. This function adopts an exponential decay form and can adaptively adjust according to the curvature magnitude at each point in the toolpath. The formula for the curvature exponential decay model is as follows:

[0016] .

[0017] Preliminary tests were conducted to experimentally calibrate the maximum and minimum thresholds of the model. The results show that... The value range is 0.2°~0.5° and The processing effect of this method is better when the value range is 0.8°~1.2°.

[0018] The corresponding tool axis vector of the machine tool's rotary axis can be represented by matrix transformation:

[0019] Assume the B-axis rotates around the Y-axis by an angle. Its rotation matrix The table is as follows:

[0020]

[0021] Similarly, suppose the C-axis rotates around the Z-axis by an angle. Its rotation matrix The table is as follows:

[0022]

[0023] The combined rotation matrix R can be expressed as:

[0024]

[0025] Multiplying the rotation matrix R by the initial tool axis unit vector (1,0,0) yields the interpolated tool axis vector. ( , , )

[0026]

[0027] Right now:

[0028] .

[0029] During the real-time interpolation stage, the system calculates the optimal angle threshold in real time based on the curvature value of the current machining point, and selects an appropriate interpolation method based on the threshold, including two interpolation methods: linear interpolation (LERP) and quaternion spherical linear interpolation (SLERP), to ensure a smooth transition of the tool posture.

[0030] The calculation process is as follows:

[0031] This invention employs the quaternion method to ensure consistent arc length and angular increments for each interpolation, enabling the tool axis vector to interpolate along the spherical surface. A quaternion is a complex number with four components, denoted as q = (g, u, v, w), where g is the real part and u, v, and w are the imaginary parts. It can be expressed as:

[0032]

[0033] in, θ represents the unit rotation axis vector, and θ represents the rotation angle;

[0034] A quaternion is constructed using the rotation axis and rotation angle; this invention defines the initial tool axis unit vector as (1,0,0). The initial tool axis unit vector... (1,0,0) and the ending tool axis vector ( , , The cross product of the two axes yields the rotation axis vector. The formula for the cross product is:

[0035]

[0036] Furthermore, the rotation axis vector is normalized:

[0037] Rotation angle Use the following formula to calculate:

[0038]

[0039] Furthermore, the unit vectors of the tool's start and end axes are... and Substituting into the above equation, we obtain the unit rotation axis vector:

[0040] ;

[0041] And rotation angle:

[0042]

[0043] Then substitute the above values ​​into equation (9) to calculate the corresponding quaternion. and :

[0044]

[0045] Furthermore, the angle between the quaternions is obtained. :

[0046]

[0047] in:

[0048] .

[0050] The beneficial effects of this invention are as follows:

[0051] 1. High level of intelligence: This invention innovatively uses curvature as the main basis for interpolation decision-making, enabling the control system to move from "passive response" to "active perception and decision-making".

[0052] 2. Significantly improved machining quality: By dynamically reducing the threshold in high curvature regions using SLERP, abrupt changes in the tool axis vector are avoided, effectively eliminating machining vibration marks and achieving better surface roughness (Ra value) and contour accuracy.

[0053] 3. Optimized computational efficiency: The threshold is dynamically increased in flat areas, and more efficient LERP algorithms are used, saving computational resources.

[0054] 4. Good versatility and adaptability: The method is achieved by setting parameters. , , This allows it to adapt to different machining scenarios and is easily integrated into existing CNC systems. The curvature exponential decay model, after statistically analyzing the curvature distribution of the entire trajectory during the preprocessing stage, introduces... The reference curvature is a normalized curvature reference value. To avoid the influence of extreme curvature values, it is taken from the median curvature in the current machining task; it can be adapted to different machining scenarios and is easy to integrate into existing CNC systems.

[0055] 4. High reliability: It can dynamically adjust the interpolation decision threshold according to the curvature of the workpiece's real-time machining points, thereby maximizing computational efficiency and ensuring the machining process while ensuring high-precision machining.

[0056] 5. This invention optimizes the problems of surface quality defects and low machining efficiency caused by uneven tool posture interpolation in five-axis machining, and achieves a forward-looking intelligent balance between machining accuracy and machining efficiency.

[0057] 6. The interpolation calculation in the real-time interpolation process of this invention adopts a quaternion-based interpolation method to avoid the universal joint deadlock phenomenon that may be caused by conventional interpolation methods, thus ensuring the continuity and stability of the tool posture, especially with better performance in the high curvature region. Attached Figure Description

[0058] Figure 1a is a schematic diagram of LERP interpolation method;

[0059] Figure 1b is a schematic diagram of SLERP interpolation method;

[0060] Figure 2 Curvature distribution diagram of the surface to be processed;

[0061] Figure 3 Comparison of the effects of different interpolation methods on densely packed high-curvature points;

[0062] Figure 4 Comparison of the effects of different interpolation methods on the evacuation segment at low curvature points;

[0063] Figure 5 Patent flowchart. Detailed Implementation

[0064] The adaptive interpolation method proposed in this invention is currently mainly applicable to ball end mills in five-axis machining. This is because for ball end mills, the effective cutting point, i.e., the tool tip, coincides with the tool center point TCP, and the tool posture planning can be performed relatively independently of the tool geometry. This simplifies the problem model and allows for clearer verification of the effectiveness of the core innovation, "curvature-based adaptive posture planning".

[0065] When this method is directly applied to non-spherical end mills, such as face mills and end mills, the tool posture not only affects the cutting direction, but also directly determines the fixed position on the tool cutting edge that participates in the cutting (i.e., the tool contact point). The trajectory planning needs to consider the complex meshing relationship between the tool geometry and the workpiece geometry at the same time, and important extensions and corrections are required.

[0066] To further illustrate the embodiments of the present invention, the specific implementation process of the present invention will be described in detail below with reference to the accompanying drawings.

[0067] A preferred embodiment of the present invention provides a real-time interpolation method based on NURBS curves with adaptive curvature angle thresholds, comprising the following steps:

[0068] Step 1: Generate the 5-axis machining path for the CAM system;

[0069] Step 2: Preprocess NURBS toolpath to obtain curvature distribution features, as shown in Figure 1, which shows the curvature distribution corresponding to the machining path.

[0070] Step 3: Use curvature data to establish an exponential decay function model between the angle threshold and curvature;

[0071] Step 4: Calculate the tool attitude change (e.g., quaternion angle σ) of the current interpolation point pair, and compare it with the adaptive angle threshold based on the curvature of the current point obtained in Step 3. The parameters are compared; if the change in attitude is less than or equal to the adaptive threshold, linear interpolation (LERP) is used for tool attitude planning; if the change in attitude is greater than the adaptive threshold, quaternion spherical linear interpolation (SLERP) is used for tool attitude planning.

[0072] Step 5: Convert the interpolated tool axis vector into displacement commands for each motion axis of the five-axis machine tool, and send them to the servo driver for execution.

[0073] In this embodiment, in step 1, the CAM system generates a five-axis machining path through a highly integrated and parameter-synchronized calculation process, which consists of the following three steps:

[0074] (1) Based on the three-dimensional CAD model of the workpiece, the machining strategy set by the user and the cutting parameters, the system synchronously calculates the coordinates (X, Y, Z) of the tool center point (TCP) and the unit vector (I, J, K) of the tool axis direction (I) of each discrete tool location point (Cutter Location Point) through the geometry engine.

[0075] (2) To obtain continuous and smooth tool motion, CAM systems typically fit discrete tool position sequence into non-uniform rational B-splines (NURBS). The resulting trajectory can be represented as p(u) = (X(u), Y(u), Z(u)), and the corresponding tool axis direction sequence is also synchronously parameterized as b(u) = (I(u), J(u), K(u)).

[0076] (3) Within the CAM system, each tool position point is a six-dimensional data unit (X, Y, Z, I, J, K). In subsequent post-processing output, the system strictly maintains the consistency of position data and orientation data in the parameter sequence, thereby outputting a tool path with synchronized parameters.

[0077] In this embodiment, in step 2, a NURBS toolpath model is obtained. First, based on the workpiece design requirements and machining path, a NURBS (Non-Uniform Rational B-Splines) toolpath is constructed. This path consists of a series of control points, weighting factors, and basis functions.

[0078] Furthermore, the trajectory curvature distribution characteristics are calculated. As shown in Figure 1, by calculating the curvature of the NURBS curve, the processing path and corresponding curvature distribution are visually displayed, and a curve parameter-based model is constructed. This is an indexed curvature lookup table. The curvature calculation formula is:

[0079] (1)

[0080] Wherein, K( p( is the curvature value at the current point) ) represents a point on the NURBS curve, p' ( ) is the first derivative, p"( ) is the second derivative.

[0081] In this embodiment, in step 3, based on the real-time curvature value K ( An exponential decay function model is introduced to calculate the adaptive angle threshold for the current point. The exponential decay function model is as follows:

[0082] (2)

[0083] in, For angle threshold, The maximum threshold, The minimum threshold, For reference curvature, This is the attenuation coefficient.

[0084] In this embodiment, in step 4, the five-axis machine tool consists of three translation axes and two rotation axes (Axes B and C are rotation axes), and the coordinate transformation formula includes both translation and rotation. For the rotation axes, it is assumed that axis B rotates around the Y-axis by an angle. Its rotation matrix The table is as follows:

[0085] (3)

[0086] Similarly, suppose the C-axis rotates around the Z-axis by an angle. Its rotation matrix The table is as follows:

[0087] (4)

[0088] The combined rotation matrix R can be expressed as:

[0089] (5)

[0090] Multiplying the rotation matrix R by the initial tool axis unit vector (1,0,0) yields the interpolated tool axis vector. ( , , )

[0091] (6)

[0092] Right now:

[0093] (7)

[0094] Since this five-axis BC machine tool ultimately operates in a machine coordinate system (with TCP coordinates and rotation control coordinates), the rotation angles of the two axes can then be calculated using the rotation control coordinates. and As shown in the following formula:

[0095] (8)

[0096] This invention employs the quaternion method to ensure consistent arc length and angular increments for each interpolation, enabling the tool axis vector to interpolate along the spherical surface. A quaternion is a complex number with four components, denoted as q = (g, u, v, w), where g is the real part and u, v, and w are the imaginary parts. It can be expressed as:

[0097] (9)

[0098] in, θ represents the unit rotation axis vector, and θ represents the rotation angle.

[0099] A quaternion is constructed using the rotation axis and rotation angle. This invention defines the initial tool axis unit vector as (1, 0, 0). The initial tool axis unit vector... (1,0,0) and the ending tool axis vector ( , , The cross product of the two axes yields the rotation axis vector. The formula for the cross product is:

[0100] (10)

[0101] Furthermore, the rotation axis vector is normalized:

[0102] (11)

[0103] Rotation angle Use the following formula to calculate: (12)

[0104] Furthermore, the unit vectors of the tool's start and end axes are... and Substituting into the above equation, we obtain the unit rotation axis vector:

[0105] (13)

[0106] And rotation angle:

[0107] (14)

[0108] Then substitute the above values ​​into equation (9) to calculate the corresponding quaternion. and :

[0109] (15)

[0110] Furthermore, the angle between the quaternions is obtained. :

[0111] (16)

[0112] in:

[0113] (18)

[0114] The angle obtained from the above formula Compare with the angle threshold in step 2;

[0115] like: Then, linear interpolation (LERP) is used for tool axis vector interpolation, and the formula is:

[0116] (19)

[0117] Where n represents the interpolation period, I = 1, 2, ..., n; , The starting point angle; , The angle at the endpoint.

[0118] Then, the spherical linear interpolation method (SLERP) is used for tool axis vector interpolation, and the formula is:

[0119] (20)

[0120] In this embodiment, in step 5:

[0121] The interpolated rotation axis angle is input into the real-time post-processing module, which calculates the feed coordinate increment of each axis of the computer tool to complete a real-time interpolation and compensation cycle.

[0122] The rotational control coordinates calculated from equation (19) , );

[0123] Quaternion transformation of the return axis vector obtained from equation (20) ( , , Substituting this into equation (8), we obtain the corrected rotation axis angle. .

[0124] (twenty one)

[0125] The interpolated rotation axis angle is input into the real-time post-processing module, which calculates the feed coordinate increment of each axis of the computer tool to complete a real-time interpolation and compensation cycle.

[0126] Through simulation and processing verification, such as Figure 3As shown, in high curvature regions, traditional interpolation methods often fail to use linear interpolation (LERP) because the tool position points are densely distributed and the change in attitude angle often does not exceed a fixed threshold, resulting in a decrease in local trajectory accuracy. This method dynamically adjusts the decision threshold based on real-time curvature and adaptively selects spherical linear interpolation (SLERP) in high curvature regions, which significantly improves tool attitude smoothness and machining surface quality.

[0127] like Figure 4 As shown, in low curvature (flat) regions, traditional interpolation methods tend to exceed a fixed threshold due to the sparse tool positions, leading to the misuse of SLERP interpolation, which requires a large amount of computation, resulting in unnecessary computational burden. This method, through a curvature adaptive mechanism, prioritizes the use of more efficient SLERP interpolation in low curvature regions, effectively reducing computational resource consumption and improving overall machining efficiency while maintaining comparable machining quality.

[0128] The above content is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, and all such modifications and additions should fall within the protection scope of the present invention.

Claims

1. A real-time interpolation method based on NURBS curves with adaptive curvature angle thresholds, characterized in that, include: Step 1: The CAM system generates the five-axis machining path; Step 2: Preprocess NURBS toolpath to obtain curvature distribution characteristics; Step 3: Use curvature data to establish an exponential decay function model between the angle threshold and curvature; Step 4: The model can adaptively adjust the angle threshold according to the curvature value, and decide whether to use linear interpolation (LERP) or quaternion spherical linear interpolation (SLERP) for tool posture planning accordingly. Step 5: Convert the interpolated tool axis vector into displacement commands for each motion axis of the five-axis machine tool, and send them to the servo driver for execution.

2. The method according to claim 1, characterized in that, In the preprocessing stage of step 2, the curvature of each point in the NURBS toolpath is calculated. Based on the trend of curvature value changes, a mathematical modeling method is used to construct a function relating curvature to an angle threshold. This function adopts an exponential decay form and can adaptively adjust according to the curvature magnitude at each point in the toolpath. The formula for the curvature exponential decay model is as follows: 。 3. The method according to claim 2, characterized in that, Preliminary tests were conducted to experimentally calibrate the maximum and minimum thresholds of the model. The results show that... The value range is 0.2°~0.5° and The processing effect of this method is better when the value range is 0.8°~1.2°.

4. The method according to claim 1, characterized in that, The corresponding tool axis vector of the machine tool's rotary axis can be represented by matrix transformation: Assume the B-axis rotates around the Y-axis by an angle. Its rotation matrix The table is as follows: ; Similarly, suppose the C-axis rotates around the Z-axis by an angle. Its rotation matrix The table is as follows: ; The combined rotation matrix R can be expressed as: ; Multiplying the rotation matrix R by the initial tool axis unit vector (1,0,0) yields the interpolated tool axis vector. ( , , ) ; Right now: 。 5. The method according to claim 1, characterized in that, During the real-time interpolation stage, the system calculates the optimal angle threshold in real time based on the curvature value of the current machining point, and selects an appropriate interpolation method based on this threshold. This includes two interpolation methods: linear interpolation (LERP) and quaternion spherical linear interpolation (SLERP), to ensure a smooth transition of the tool posture. The calculation process is as follows: This invention employs the quaternion method to ensure consistent arc length and angular increments for each interpolation, enabling the tool axis vector to interpolate along the spherical surface. A quaternion is a complex number with four components, denoted as q = (g, u, v, w), where g is the real part and u, v, and w are the imaginary parts. It can be expressed as: ; in, θ represents the unit rotation axis vector, and θ represents the rotation angle; A quaternion is constructed using the rotation axis and rotation angle; this invention defines the initial tool axis unit vector as (1,0,0). The initial tool axis unit vector... (1,0,0) and the ending tool axis vector ( , , The cross product of the two axes yields the rotation axis vector. The formula for the cross product is: ; Furthermore, the rotation axis vector is normalized: ; Rotation angle Use the following formula to calculate: ; Furthermore, the unit vectors of the tool's start and end axes are... and Substituting into the above equation, we obtain the unit rotation axis vector: ; And rotation angle: ; Then substitute the above values ​​into equation (9) to calculate the corresponding quaternion. and : ; Furthermore, the angle between the quaternions is obtained. : ; in: 。