CNC adaptive interpolator
By using an adaptive interpolator based on NURBS curve node parameters to adjust the tool feed rate in real time, the problem of coordinating curvature and feed rate in CNC machining is solved, which improves machining accuracy and speed, reduces contour error, and enhances workpiece quality.
Patent Information
- Application Number
- CN202510901214.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-17
AI Technical Summary
In existing technologies, the deviation between the actual machining path and the theoretical design path during CNC machining (CNC contour error) affects the dimensional accuracy and surface quality of the workpiece. In particular, the coordination problem between curvature and allowable feed rate has not been effectively solved during curve interpolation.
An adaptive interpolator based on NURBS curve node parameters is adopted. By detecting the distance difference between the actual machining position point and the programmed coordinate system, the tool feed rate is adjusted in real time using a Gaussian function and a speed look-ahead processing module to coordinate the relationship between curvature and feed rate. An adaptive interpolation algorithm is used to optimize accuracy and speed.
It improves the accuracy and speed of CNC machining, reduces contour errors, and enhances the dimensional accuracy and surface quality of workpieces.
Smart Images

Figure CN120802848A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of numerical control machine tools, in particular to the interpolation method for numerical control machine tools. BACKGROUND
[0002] The interpolator of numerical control machine tools is the core module of numerical control machine tools; CNC profile error refers to the deviation between the actual machining path and the theoretical design path during the machining process of numerical control machine tools (CNC). This error will affect the dimensional accuracy and surface quality of the workpiece, and is one of the important indicators for measuring the machining accuracy of CNC; there are mainly linear interpolation, circular interpolation and parabolic interpolation, etc. Linear interpolation is only used for interpolation method of straight line theoretical profile, if it is not a straight line, the curve can also be approximated by a segment of line segment, so that each segment of line segment can be interpolated by a straight line. Circular interpolation is to calculate the point group approximating the actual circular arc according to the interpolation digital information between the two end points, control the tool to move along these points, and process the circular curve. Parabolic interpolation determines the parameters of the parabolic equation through measurement and calculation, and then determines the position coordinates of the machine tool at each time point to realize the arbitrary curve motion of the machine tool. Patent No. 201410248195.1, named NURBS curve reference model adaptive real-time interpolation method, based on NURBS curve interpolation point segmentation planning, defines NURBS curve pre-interpolation instruction, interpolator real-time calculates curve control point position, reference model adaptive interpolation control, repeats the above steps to complete interpolation. SUMMARY
[0003] In view of the shortcomings of the prior art, the present application provides a CNC adaptive interpolator, which is a coordination problem between the curvature of the curve and the allowable feed speed in real-time interpolation. The distance difference between the actual machining position point and the position of the corresponding programming coordinate system is used to derive the feed speed by using the Gaussian function, thereby improving the machining precision and the machining speed.
[0004] The technical scheme of the present application is as follows: a CNC adaptive interpolator based on NURBS curve node parameters, through the relationship between the curvature change of the required machining surface or curve and the tool feed speed, using a speed look-ahead processing module to adjust the tool feed speed in real time, the steps are as follows: S1: setting the programming coordinate system XYZ coordinate of the required machining surface or curve, giving the initial feed speed of the tool, the initial feed speed is given according to the initial feed speed when machining the smooth plane; S2: determining the current curve according to the NURBS curve node parameters , detecting the distance between the coordinate curve position point and the actual machining position point , and the distance is Formula (1); (1) is the actual position point of the tool, the projection point on the curve closest to the actual point; S3: is compared with the threshold value , the threshold value is the shortest distance between the actual machining position point and the corresponding coordinate curve position point, and different machining curves are selected according to actual needs; when , the tool feed speed is interpolated; when ≥ , S4 is entered; S4: The feed speed is adaptively adjusted according to formula (2), and the curvature change of the subsequent section of the surface or curve is simultaneously estimated in advance, (2) is the adaptive output speed mm / s, which is the actual feed speed after curvature correction; is the reference maximum speed (mm / s), which is the highest feed speed allowed by the smooth plane; is the current point decay factor, is the lookahead decay factor, which is a quadratic correction coefficient based on the prediction of future curvature changes. Scan N future interpolation points, select the minimum decay value as the global deceleration basis, and avoid over-difference of subsequent high-curvature points; The lookahead decay factor and the current point decay factor are calculated through double decay of speed, the lookahead decay factor calculation formula (3) (3) is the curvature of any point on the surface or curve mm⁻¹, is the safety curvature threshold mm⁻¹, which is the maximum curvature allowed by the system without speed reduction, determined by the dynamic performance of the machine tool and ; is the curvature sensitivity coefficient, which is a shape parameter that controls the speed decay rate, and is a decimal between 0 and 1, determined by the curvature of the actual machining surface or curve; The smaller the value, the more the curvature increases slightly to trigger a large amount of speed reduction; The lookahead decay , is the decay factor of the curvature sequence of the future N points; The current point attenuation factor calculation formula (4), (4) The current point curvature is calculated by the curve curvature formula (5) of the NURBS parameter u(k) (5) And are the first and second derivatives of the NURBS curve, respectively.
[0005] S5: After outputting the speed adjustment, detect again until appropriate, complete interpolation until the end of an interpolation period.
[0006] NURBS curve node parameter Selection, the steps are as follows: Refer to the NURBS curve, a k-degree NURBS curve is represented by a piecewise rational polynomial vector function formula (6): (6) Wherein: is a control point, each control point is attached with a weight factor , the first and last weight factors , , and the rest ; is a k-degree standard B-spline basis function, and the recursive formula (7) is: (7) Wherein is a node vector, that is, the node parameter .
[0007] Further, the forward-looking prediction in S4 can be forward-looking for 500-2000 points.
[0008] The adaptive interpolator proposed in the application solves the coordination problem between the curvature of a surface or curve and the allowed feed speed in real-time interpolation, adopts a speed adaptive interpolation algorithm, and has a relationship between the curve node parameter of NURBS, the curvature change of the machined surface, and the feed speed. The feed speed is adjusted through a speed forward-looking processing module, and a CNC adaptive interpolator is constructed.
[0009] The application compares the profile error and the shortest distance error between the actual position point and the corresponding point set on the programmed curve , and if < is not satisfied, It is indicated that the feed speed at this time is too fast, the error is large, and the feed speed needs to be reduced. The feed speed is obtained by adaptively adjusting the speed and referring to the Gaussian function. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Fig. 1 is a flow chart of the present invention; Fig. 2 This is a schematic diagram of the outline error. DETAILED DESCRIPTION
[0011] To make the technical problems solved, the technical solutions adopted, and the technical effects achieved by the present invention more clearly understood, the technical solutions of the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work shall fall within the scope of protection of the present invention.
[0012] Example: like Figs. 1-2 As shown, a CNC adaptive interpolator is based on the NURBS curve node parameters. Through the relationship between the curvature change of the required processing surface or curve and the tool feed speed, the tool feed speed is adjusted in real time using the speed look-ahead processing module. The steps are as follows: S1: Set the programming coordinate system XYZ coordinates of the required machining surface or curve, and give the initial feed speed of the tool. The initial feed speed is given according to the initial feed speed when machining a smooth plane. S2: According to the NURBS curve node parameters To determine the current curve , detect the coordinate curve position point and the actual processing position point The distance is Formula (1); (1) is the actual position of the tool, The projection point on the curve that is closest to the actual point; S3: With threshold For comparison, the threshold It is the shortest distance between the actual processing position point and the corresponding coordinate curve position point. Different processing curves are selected according to actual needs. When satisfied < When , interpolation is performed according to the tool feed rate. According to the interpolation feed of plane and curved surface, the feed rate of smooth plane is higher than that of curved surface, so the feed rate at this time is the fastest. when ≥ When , it goes to S4; S4: When ≥ When the feed speed is too fast, the error is large, the feed speed is attenuated, the feed speed is adaptively adjusted according to formula (2), and the subsequent 500-2000 point curvature change is simultaneously estimated in advance, (2) is the adaptive output speed mm / s, which is the actual feed speed after curvature correction; is the reference maximum speed (mm / s), which is the highest feed speed allowed by the smooth plane; is the current point attenuation factor, is the forward attenuation factor, which is a quadratic correction coefficient based on the prediction of future curvature change, scanning N future interpolation points, selecting the minimum attenuation value as the global deceleration basis to avoid subsequent high curvature point overruns; The forward attenuation factor and The current point attenuation factor is calculated by double attenuation of the speed, The forward attenuation factor calculation formula (3) (3) is the curvature of any point on the surface or curve mm⁻¹, is the safety curvature threshold mm⁻¹, which is the maximum curvature allowed by the system without speed reduction, determined by the dynamic performance of the machine tool and is inversely determined; is the curvature sensitivity coefficient, which is a shape parameter that controls the speed attenuation rate, taking a small number between 0 and 1, and is determined by the curvature of the actual machined surface or curve; The smaller the value, the more the curvature increases slightly to trigger a large speed reduction; when the curvature is very small, take 1; The forward attenuation , is the attenuation factor of the future N-point curvature sequence ; The current point attenuation factor calculation formula (4), (4) The current point curvature is calculated by the curve curvature formula (5) of the NURBS parameter u(k) (5) and are the first and second derivatives of the NURBS curve, respectively.
[0013] S5: After output speed adjustment, detect again until appropriate, complete interpolation, until the end of an interpolation period.
[0014] NURBS curve node parameter The selection is as follows: A NURBS curve is referenced, a k-degree NURBS curve is expressed by a piecewise rational polynomial vector function, and formula (6) is given: (6) Wherein: is a control point, each control point is attached with a weight factor , the first and last weight factors , , and the rest ; is a k-degree normal B-spline basis function, and a recursive formula (7) is given (7) Wherein is a node vector, and a node parameter is obtained.
[0015] Although the preferred embodiments of the present application have been described, those skilled in the art who have the benefit of the present disclosure can make further changes and modifications to these embodiments without departing from the spirit and scope of the present application. Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the equivalent technology of the present application, the present application also intends to include these modifications and variations.
Claims
1. A CNC adaptive interpolator, characterized by Based on the NURBS curve node parameters, the relationship between the curvature change of the required processing surface or curve and the tool feed rate is calculated, and the tool feed rate is adjusted in real time using the speed look-ahead processing module. The steps are as follows: S1: Set the programming coordinate system XYZ coordinates of the required machining surface or curve, and give the initial feed speed of the tool. The initial feed speed is given according to the initial feed speed when machining a smooth plane. S2: According to the NURBS curve node parameters To determine the current curve , detect the coordinate curve position point and the actual processing position point The distance is Formula (1); (1) is the actual position of the tool, The projection point on the curve that is closest to the actual point; S3: With threshold For comparison, the threshold It is the shortest distance between the actual processing position point and the corresponding coordinate curve position point. Different processing curves are selected according to actual needs. When satisfied < When , interpolation is performed according to the tool feed speed; When satisfied ≥ When , it goes to S4; S4: Adaptively adjust the feed speed according to formula (2), and at the same time make a forward-looking prediction of the curvature change of the subsequent surface or curve. (2) is the adaptive output speed in mm / s, which is the actual feed speed after curvature correction; The maximum reference speed (mm / s) is the maximum feed speed allowed on a smooth surface. is the current point attenuation factor, The forward-looking attenuation factor is a quadratic correction coefficient based on the predicted future curvature change. The next N interpolation points are scanned and the minimum attenuation value is selected as the basis for global deceleration to avoid excessive deviations at subsequent high curvature points. The forward attenuation factor and The current point attenuation factor is calculated by double attenuation of the velocity. Forward-looking attenuation factor calculation formula (3) (3) is the curvature of any point on the surface or curve mm⁻¹, is the safe curvature threshold mm⁻¹, the maximum curvature allowed by the system without speed reduction, which is determined by the dynamic performance of the machine tool and Determine by reverse deduction; The curvature sensitivity coefficient is a shape parameter that controls the velocity attenuation rate. It takes a decimal between 0 and 1 and is determined by the curvature of the actual processed surface or curve. The smaller the value, the more likely it is that a slight increase in curvature will trigger a significant deceleration; Prospective attenuation factor , is the curvature sequence of future N points The attenuation factor; The current point attenuation factor calculation formula (4) is: (4) The curvature of the current point is calculated by the NURBS parameter u(k) using the curve curvature formula (5) (5) and are the first and second derivatives of the NURBS curve, respectively.
2. S5: After the output speed is adjusted, the interpolation is completed when it is appropriate, until one interpolation cycle is completed.
3. The CNC adaptive interpolator according to claim 1, characterized in that: The NURBS curve node parameters The selection steps are as follows: Refer to the NURBS curve, a k-degree NURBS curve, and use a piecewise rational polynomial vector function to express formula (6): (6) in: is a control point, each of which has a weight factor , first and last weight factors , ,the remaining ; is the k-order canonical B-spline basis function, and the recursive formula (7) is: (7) Among them As the node vector, the node parameters can be obtained .
4. The CNC adaptive interpolator according to claim 1, characterized in that: In S4, the forward-looking estimate can be expected to be 500-2000 points.
Citation Information
Patent Citations
Self-adaption real-time interpolation method for NURBS curve reference model
CN104020718A