CN114815743A - Curve interpolation method and system of numerical control machine tool and storage medium - Google Patents

Curve interpolation method and system of numerical control machine tool and storage medium Download PDF

Info

Publication number
CN114815743A
CN114815743A CN202210486505.8A CN202210486505A CN114815743A CN 114815743 A CN114815743 A CN 114815743A CN 202210486505 A CN202210486505 A CN 202210486505A CN 114815743 A CN114815743 A CN 114815743A
Authority
CN
China
Prior art keywords
interpolation
curve
point
height error
interpolated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210486505.8A
Other languages
Chinese (zh)
Inventor
张俊
丁旭然
王迪尔
肖葭
高洁
苏国旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Central South University
Original Assignee
Central South University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Central South University filed Critical Central South University
Priority to CN202210486505.8A priority Critical patent/CN114815743A/en
Publication of CN114815743A publication Critical patent/CN114815743A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/41Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by interpolation, e.g. the computation of intermediate points between programmed end points to define the path to be followed and the rate of travel along that path
    • G05B19/4103Digital interpolation
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/34Director, elements to supervisory
    • G05B2219/34401Synchronize position controller drive with interpolator

Abstract

The invention relates to the technical field of motion control of numerical control machines, and discloses a curve interpolation method, a curve interpolation system and a storage medium of a numerical control machine, wherein the method comprises the steps of firstly determining a node vector corresponding to a curve to be interpolated according to a control point corresponding to the curve to be interpolated, dividing the curve to be interpolated into N sections of lines based on the node vector, and then determining a target interpolation point set of the N sections of lines based on a bow-height error; and calculating the coordinates of each interpolation point of the curve to be interpolated according to the target interpolation point set. All interpolation points can meet the requirement of bow height error, the processing curve is smoother and approaches to an ideal NURBS curve, and therefore, by adopting a mode of determining the node vector corresponding to the curve to be interpolated according to the control point corresponding to the curve to be interpolated, the coordinates of the interpolation points can be more accurate, the accuracy of the control point on the NURBS curve is improved, and meanwhile, the calculated amount can be controlled in a linear range.

Description

Curve interpolation method and system of numerical control machine tool and storage medium
Technical Field
The invention relates to the technical field of motion control of numerical control machines, in particular to a curve interpolation method, a curve interpolation system and a storage medium of a numerical control machine.
Background
Motion control systems such as numerical control machines control the tool to realize the contour machining of the workpiece by using an interpolation method and using a set track and speed. Interpolation operation combines requirements of precision, process and the like, and some intermediate points are determined among control points of an ideal track according to a certain mathematical method, so that a machining track of the cutter is formed. The higher the precision requirement, the more closely the machining path is required to approximate the contour of the ideal workpiece as much as possible. At present, in each interpolation period, a position of a next interpolation point is determined according to a planned feed speed by a traditional Non-Uniform Rational B-spline (NURBS curve), and an increment of a NURBS curve parameter u is calculated according to the step size. The NURBS curve is "non-uniform", i.e. the distribution of its node parameters is not equidistant, and the basis functions corresponding to different node parameters are different, so that the subsequent calculation cannot be performed without calculating the parameter value corresponding to the next interpolation point. The key to the conventional interpolation algorithm is the calculation of the increment of the parameter u. At present, the solution of the derivative of the corresponding point on the curve is involved in the process of carrying out the NURBS curve parameter solution by using a Newton iteration method, and the calculated amount and the calculated time length are increased. In addition, the method is affected by the initial value, when the initial value is not properly selected, the final result may not be converged, and a data point interpolated reversely rather than a correct solution may be obtained.
Therefore, in the interpolation process of the traditional NURBS curve interpolation method, the problem that the control point has low control accuracy on the NURBS curve exists.
Disclosure of Invention
The invention provides a curve interpolation method, a curve interpolation system and a storage medium of a numerical control machine tool, and aims to solve the problem that the accuracy of a control point to control a NURBS curve is low in the interpolation process of the existing NURBS curve interpolation method.
In order to achieve the purpose, the invention is realized by the following technical scheme:
in a first aspect, the present invention provides a method for curve interpolation of a numerical control machine, including:
determining a curve to be interpolated according to the motion line of the numerical control machine tool;
determining a node vector corresponding to a curve to be interpolated according to a control point corresponding to the curve to be interpolated, and dividing the curve to be interpolated into N sections of lines based on the node vector, wherein N is a positive integer;
determining a target interpolation point set of the N sections of lines based on the height error;
and calculating coordinates of each interpolation point of the curve to be interpolated according to the target interpolation point set, and performing interpolation based on the coordinates of the interpolation points.
In a second aspect, the present application provides a curve interpolation system for a numerically controlled machine tool, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the computer program.
In a third aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method steps as set forth in the first aspect.
Has the advantages that:
the curve interpolation method of the numerical control machine tool comprises the steps of firstly determining a node vector corresponding to a curve to be interpolated according to a control point corresponding to the curve to be interpolated, dividing the curve to be interpolated into N sections of lines based on the node vector, and then determining a target interpolation point set of the N sections of lines based on a bow-height error; and calculating the coordinates of each interpolation point of the curve to be interpolated according to the target interpolation point set. All interpolation points can meet the requirement of the bow height error, so that the processing curve is smoother and approaches to an ideal NURBS curve, and thus, the coordinates of the interpolation points can be more accurate by adopting a mode of determining the node vectors corresponding to the curve to be interpolated according to the control points corresponding to the curve to be interpolated, the control accuracy of the control points on the NURBS curve is improved, and meanwhile, the calculated quantity can be controlled in a linear range.
In a preferred embodiment, the specific position of the interpolation point on the NURBS curve is determined in the interpolation stage, and the maximum feed speed of each point under the normal acceleration and jerk limits is recorded, so that the aim of the forward-looking speed planning is simplified.
Drawings
Fig. 1 is a flowchart of a curve interpolation method for a numerical control machine according to a preferred embodiment of the present invention;
fig. 2 is a second flowchart of a curve interpolation method for a numerical control machine according to a preferred embodiment of the present invention;
FIG. 3 is a schematic diagram of a second and third order NURBS curve according to the preferred embodiment of the present invention;
FIG. 4 is a flowchart of interpolation recursion based on bow-height error according to the preferred embodiment of the present invention;
FIG. 5 is a schematic diagram of NURBS bow-height error calculation by the midpoint method in accordance with the preferred embodiment of the present invention.
Detailed Description
The technical solutions of the present invention are described clearly and completely below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The use of "first," "second," and similar terms in the present application do not denote any order, quantity, or importance, but rather the terms are used to distinguish one element from another. Also, the use of the terms "a" or "an" and the like do not denote a limitation of quantity, but rather denote the presence of at least one. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships are changed accordingly.
Referring to fig. 1, an embodiment of the present application provides a curve interpolation method for a numerical control machine tool, including:
determining a curve to be interpolated according to the motion line of the numerical control machine tool;
determining a node vector corresponding to the curve to be interpolated according to the control point corresponding to the curve to be interpolated, and dividing the curve to be interpolated into N sections of lines based on the node vector, wherein N is a positive integer;
determining a target interpolation point set of N sections of lines based on the bow height error;
and calculating coordinates of each interpolation point of the curve to be interpolated according to the target interpolation point set, and performing interpolation based on the coordinates of the interpolation points.
The curve interpolation method of the numerical control machine tool comprises the steps of firstly dividing a curve to be interpolated into N sections of lines, and then determining a target interpolation point set of the N sections of lines based on a bow height error; and calculating the coordinates of each interpolation point of the curve to be interpolated according to the target interpolation point set. All interpolation points can meet the requirement of bow height error, the processing curve is smoother and approaches to an ideal NURBS curve, and therefore, by adopting a mode of determining the node vector corresponding to the curve to be interpolated according to the control point corresponding to the curve to be interpolated, the coordinates of the interpolation points can be more accurate, the accuracy of the control point on the NURBS curve is improved, and meanwhile, the calculated amount can be controlled in a linear range.
Optionally, when the curve to be interpolated is divided into N segments of lines based on the node vector, taking K +1 nodes at the beginning of the curve to be interpolated as nodes with repeated parameters, where the parameter value is 0, taking K +1 nodes at the end of the curve to be interpolated as nodes with repeated parameters, where the parameter value is 1, and K represents the number of curves.
In this optional embodiment, the first k +1 and last k +1 node parameters are respectively 0 and 1 to ensure that the curve passes through the head end point, and the middle n-k node vectors adopt a node vector selection method based on the control point distance. Unlike the traditional equidistant selection mode, the invention determines the value of the node parameter according to the proportion of the distance of the control point of each NURBS curve to the sum of the distances of all the control sections. Firstly, judging which control points are constrained by each point on the curve of the current section, secondly, taking the ratio of the distance between the current relevant control points and the total control section and the sum of the values of the parameters of the previous node as the value of the current node parameter, and finally obtaining the vector value of the node. The node vector of the NURBS curve is obtained by the method, the NURBS curve is ensured to pass through the first and the last end points, and meanwhile, the calculated amount can be controlled within a linear range. In addition, because the method enables the internal nodes of the NURBS curve to be distributed according to the rule instead of the traditional equal distance, the control of the control point on the NURBS curve can be more accurate.
Optionally, determining a target interpolation point set of N segments of lines based on the bow-height error includes:
calculating a first bow height error between a first segmentation point at the first end and a second segmentation point at the second end of the target line, if the first bow height error is within a threshold range, adding the first segmentation point and the second segmentation point into an interpolation point set, and if the first bow height error is not within the threshold range, taking a median corresponding point of parameter values of the first segmentation point and the second segmentation point as a new segmentation point;
calculating a second bow height error between the first segmentation point and the new segmentation point and a third bow height error between the second segmentation point and the new segmentation point, continuously judging the second bow height error and the third bow height error to be the same as the first bow height error, if the second bow height error and the third bow height error are within a threshold value specified range, sequentially adding the new segmentation point into the interpolation point set, otherwise, continuously determining the new segmentation point by the same method, iterating until the bow height errors of all the new segmentation points meet the specification of the threshold value range, and determining a target interpolation point set after sequentially traversing N segments of lines; the target line is any one of the N lines.
In the optional embodiment, in order to make the length of the interpolation line segment as long as possible under the constraint condition of satisfying the bow height error, the recursive bisection method is adopted to solve the interpolation point. The interpolation process is carried out according to segments, and for the current segment, because the segment points are necessarily used as interpolation points, the front segment points of the current segment are firstly added into the interpolation point set, and the bow height error of the connecting line of the front segment points and the rear segment points is calculated. And judging whether the current bow height error is within a threshold value specified range, and if so, adding the post-segmentation point into the interpolation point set. If not, the corresponding point of the median of the parameter values of the two points of the front and the back nodes is taken as a new segmentation point, the bow height error value of the connecting line of the front and the back points and the new segmentation point is respectively calculated, and whether the bow height error of the front and the back two sections is in the threshold value specified range is judged again. If the bow height error of the new segment is within the range specified by the threshold, sequentially adding the new segment points into the interpolation point set, otherwise, continuously segmenting the new segment with the bow height error not within the range specified by the threshold by the same method until the bow height errors of all the new segments meet the threshold specification. And traversing each section of curve by the same method to generate a final interpolation point set. The bow-height error of the method is calculated by using a midpoint method, and the interpolation algorithm of the invention directly uses the bow-height error to determine the interpolation step length without involving the feeding speed, so the midpoint method is selected to calculate the bow-height error. The distance between the middle point of two adjacent interpolation points and the interpolation point on the curve corresponding to the median of the node parameters of the two interpolation points is calculated to approximately replace the bow height error, and compared with the traditional circular arc approximation method, the method is simpler in calculation and reduces the calculation amount.
Optionally, the performing interpolation based on the interpolation point coordinates includes:
and calculating the maximum feeding speed of the interpolation points under the comprehensive constraint while performing interpolation based on the coordinates of the interpolation points, and simultaneously recording the interpolation step length and the total arc length of the current interpolation points, wherein the interpolation step length is determined by solving a point-to-point distance formula according to the coordinates obtained by solving adjacent interpolation points, and the total arc length is determined by accumulating the step lengths of all the interpolation points.
In the present alternative embodiment, the maximum feed speed and the interpolation step length at each interpolation point are calculated and stored. The normal acceleration and jerk generated by NURBS curves in a turn also impose velocity constraints in order to meet the maximum normal acceleration a specified by the equipment during machining nmax And maximum normal jerk J nmax The feed speed when passing through this point must be limited, otherwise if passing at a high feed speed at a point with a large curvature, the drive capability of the machine may be exceeded, causing motor step-out and ultimately leading to low machining accuracy. Since the method proposed in the invention already determines the position of the interpolation point on the NURBS curve during the interpolation process, it is possible to calculate the interpolation point at the same time as the interpolationThe maximum feeding speed of the point under the comprehensive constraint can be recorded, and the step length and the total arc length of the current interpolation point can be recorded.
Therefore, compared with the traditional interpolation algorithm that the next interpolation point is selected according to the hardware interpolation period, the interpolation process cannot determine the interpolation step length and the bow-height error, and the bow-height error and the feeding speed of the interpolation point are ensured to meet the hardware limit through prospective speed planning. The invention determines the specific position of the interpolation point on the NURBS curve in the interpolation stage, and records the maximum feeding speed of each point under the limits of the believed acceleration and the jerk, thereby simplifying the aim of planning the look-ahead speed.
In a complete example, referring to fig. 2, the NURBS curve node vector is first obtained by linear calculation according to the distance between the control points, and is segmented according to the node vector. And solving and storing node parameters and coordinate values of the interpolation points by adopting a recursion bisection method according to the bow height error, and calculating and storing the maximum feeding speed and the interpolation step length under the curvature constraint in the interpolation process. And finishing the interpolation algorithm flow based on the bow height error.
First, a NURBS curve node vector is linearly calculated based on the control point distance. n +1 represents the number of NURBS curve control nodes, k represents the curve times, wherein k is more than or equal to 2 and less than or equal to n. Node vector U ═ U 0 ,u 1 ,...,u n+k+1 ]The number of the node vectors is n + k +2, the parameters of the first k +1 node and the last k +1 node are respectively 0 and 1 to ensure that the curve passes through the first end point and the last end point, and the node vector selection method based on the control point distance is adopted for the n-k node parameters in the middle. Different from the traditional equidistant selection mode, the invention determines the value of the node parameter according to the proportion of the distance of the control point of each segment of NURBS curve to the sum of the distances of all the control segments, namely, firstly, judging which control points are restricted by each point on the curve of the current segment, and secondly, taking the sum of the distance between the current relevant control points, the ratio of the distance to the total control segment and the value of the previous node parameter as the value of the current node parameter. Taking FIG. 3 as an example, FIG. 3 is a 2-order 3-order NURBS curve with 7 control points, P 0 P 1 P 2 The first NURBS curve P is determined 0 K 1 ,P 1 P 2 P a The second NURBS curve K is determined 1 K 2 And so on. The values of the nodal parameters are therefore determined according to the ratio of the distance of the control points of each NURBS curve to the sum of the distances of all control segments. The distance between the control points of the first section of curve is P 0 P 1 Is added to P 1 P 2 The distance between the control points of the second section of the curve is P 1 P 2 Is added to P 2 P 3 By analogy, the sum L of the distances between the control points can be obtained c The following were used:
Figure BDA0003629352540000051
since k is 2, the first three node parameter values are 0, and the last three node parameter values are 1. The value of the fourth node parameter is calculated as:
Figure BDA0003629352540000052
similarly, the fifth node parameter value is:
Figure BDA0003629352540000053
in the same way, the parameter values of each intermediate node can be obtained, so that the node vector of the NURBS curve is obtained by the method, the NURBS curve is ensured to pass through the first and the last end points, and meanwhile, the calculated amount can be controlled in a linear range. In addition, because the method enables the inner nodes of the NURBS curve to be distributed according to the rule instead of the traditional equal distance, the control point can control the NURBS curve more accurately.
The NURBS curve is reasonably segmented before formal interpolation. The node vector calculation method starts with a full-complex node and ends with the full-complex node, namely the parameters of the first k +1 node and the last k +1 node are repeated and are respectively 0 and 1, so that the NURBS curve passes through the head and tail end points, and the head and tail end points can be used as head and tail segmentation points firstly. And then selecting the corresponding pure node in the node vector, namely the node corresponding to the unrepeated node parameter value as a middle segmentation point. And solving each segmentation point by using a de-boolean recursion method to obtain coordinate values, wherein the de-boolean recursion formula is as follows:
Figure BDA0003629352540000061
Figure BDA0003629352540000062
Figure BDA0003629352540000063
wherein, C (u) represents a point on the curve to be interpolated, i represents a position index of a front segment point of an initial interpolation interval where a current interpolation point is located in the node vector, 1 represents the current calculated iteration number,
Figure BDA0003629352540000064
representing intermediate variables in the recursion process, k representing the number of curves, N j,k-1 (u) represents the jth k-1 th-order B-spline basis function of the curve to be interpolated,
Figure BDA0003629352540000065
representing intermediate control points, u, into which the solution of the coordinates of corresponding points on the curve is converted i Represents the i-th parameter node value, u i+1 Represents the (i + 1) th parameter node value,
Figure BDA0003629352540000066
representing variable parameters in the recursive calculation process, u representing the parameter value of the point to be solved, d j Denotes the jth control node, u j+1 Represents the value of the (j + 1) th parameter node, u j+k+1 The expression represents the j + k +1 th parameter node value.
The interpolation process is performed on the basis of this segment, so that the determined segment point is also the initial interpolation point. In this way, segmentation is simple and simple nodes are used as boundaries on the curve, and when points on the NURBS curve transition on the boundaries, one control point loses influence on points on a continuous curve and the other control point gains influence. Therefore, it is more suitable to select a simple node as a segmentation point.
Still taking fig. 3 as an example, the node vector U ═ U of the curve 0 ,u 1 ,...,u 9 ]Wherein u is 0 ,u 1 ,u 2 Corresponding to full complex node, the node parameter value is 0, NURBS curve passes through initial control point P 0 。u 7 ,u 8 ,u 9 Corresponding to full complex node, node parameter value is 1, NURBS curve passes end control point P 6 . Will P 0 And P 6 Respectively as head and tail segmentation points. u. of 3 ,u 4 ,u 5 ,u 6 Respectively corresponding pure nodes K 1 ,K 2 ,K 3 ,K 4 As an intermediate interpolation point, this NURBS curve is divided into 5 segments, as can be seen from the solid-dashed marks in the figure. Using a de Boolean recursion method to solve each segmentation point to obtain a coordinate value, and using K to calculate the value 1 Taking the node as an example, the node parameter u 3 Substituting into DeBoolean recursion formula to obtain:
Figure BDA0003629352540000071
Figure BDA0003629352540000072
Figure BDA0003629352540000073
and calculating and storing the coordinates of each initial interpolation point in the same way, and then performing interpolation operation.
The interpolation process is as shown in a flow chart of fig. 4, and in order to make the length of the interpolation line segment as large as possible under the limiting condition of satisfying the bow-height error, the invention adopts a recursive dichotomy to solve the interpolation point. The calculation process is carried out according to segments, and for the current segment, because the segment points are necessarily used as interpolation points, the front segment points of the current segment are firstly added into the interpolation point set, and the bow height error of the connecting line of the front segment points and the rear segment points is calculated. And judging whether the current bow height error is within a threshold value specified range, and if so, adding the post-segmentation point into the interpolation point set. If not, the corresponding point of the median of the parameter values of the two points of the front and the back nodes is taken as a new segmentation point, the bow height error value of the connecting line of the front and the back points and the new segmentation point is respectively calculated, and whether the bow height error of the front and the back two sections is in the threshold value specified range is judged again. If the bow height error of the new segment is within the range specified by the threshold, sequentially adding the new segment points into the interpolation point set, otherwise, continuously segmenting the new segment with the bow height error not within the range specified by the threshold by the same method until the bow height errors of all the new segments meet the threshold specification. And traversing each section of curve by the same method to generate a final interpolation point set. The bow-height error of the method is calculated by using a midpoint method, and the interpolation algorithm of the invention directly uses the bow-height error to determine the interpolation step length without involving the feeding speed, so the midpoint method is selected to calculate the bow-height error.
Fig. 5 is a method for calculating the bow height error by the midpoint method, and the bow height error is approximately replaced by calculating the distances between the midpoints of two adjacent interpolation points and the interpolation points on the curve corresponding to the median of the node parameters of the two interpolation points, so that the calculation is simpler and the calculation amount is reduced compared with the traditional circular arc approximation method. The formula of the midpoint method is as follows:
Figure BDA0003629352540000074
in the formula, delta i Representing the value of the parameter u i And u i+1 Curve bow height error between corresponding points, M i Represents u i And u i+1 Midpoint of line between corresponding points, N i Representing the value of the parameter u i And u i+1 Median value of (u) i +u i+1 ) And/2 corresponds to a point on the curve.
Also in the same wayFIG. 3 is an example for a first curve P 0 K 1 Interpolation is performed by first interpolating C (u) 2 ) Adding interpolation set, calculating P by using midpoint method 0 K 1 Error of bow height
Figure BDA0003629352540000075
Determination of delta 0 If the range of the bow height error threshold value is not satisfied, dividing into two parts, and respectively calculating to obtain P 0 N 0 And N 0 K 1 Bow height error delta of 1 And delta 2 Judging whether the bow height error threshold range is met or not again, and analogizing until the current curve segment P 0 K 1 The bow height error of each interpolation segment meets the requirement, and the interpolation points on the curve corresponding to each interpolation segment are added into the interpolation point set to carry out the next segment of curve K 1 K 2 Interpolation of (3). And (4) until the interpolation of the whole NURBS curve is completed, the bow height error between each interpolation point meets the threshold requirement, and the drawn motion track is smoother and closer to the ideal NURBS curve.
And calculating and storing the maximum feeding speed and the interpolation step length of each interpolation point. In addition to the constraints on interpolation point velocity due to bow height error, the generation of normal and jerk at the turn also imposes constraints on velocity due to the NURBS curve not being straight.
In order to meet the maximum normal acceleration A given in the machining process nmax And maximum normal jerk J nmax Must be limited in the feed rate through this point. Otherwise, if the workpiece passes through a point with a large curvature at a high feeding speed, the driving capability of the equipment can be exceeded, the motor is out of step, and finally the machining precision is low. Since the position of the interpolation point on the NURBS curve is already determined in the interpolation process by the method provided by the invention, the maximum feeding speed of the point under the comprehensive constraint can be calculated while interpolation is carried out, and simultaneously the step length of the current interpolation point and the total arc length can be recorded, wherein the total arc length is obtained by accumulating the step lengths of all the interpolation points.
Firstly, solving NURBS curve interpolation points, and solving coordinate values, first-order and second-order derivative vectors of the interpolation points by adopting a de Boolean recursion method. The NURBS curve is a special B-spline curve whose definition includes B-spline basis functions. Therefore, the solving process of the NURBS curve can be used for reducing the calculation amount of the solution through de-Boolean recursion by referring to the B-spline curve. The recursion formula of the method is as follows:
Figure BDA0003629352540000081
Figure BDA0003629352540000082
Figure BDA0003629352540000083
Figure BDA0003629352540000084
in the formula, C (r) (u) denotes the derivative order of r at point C (u) on the curve, r denotes the derivative order,
Figure BDA0003629352540000085
denotes C (u) a derivation of order r for u,
Figure BDA0003629352540000086
representing the intermediate variable, N, in the solution of the derivative recursion using the DeBoolean recursion equation j,k (u) represents the jth kth B-spline curve basis function of the curve to be interpolated, N j,k-r And (u) represents the jth k-r times B spline curve base function of the curve to be interpolated.
Assume that the current interpolation point is C (u) i ) Current interpolation point curvature K (u) i ) Comprises the following steps:
Figure BDA0003629352540000091
obtaining the maximum feeding speed v under the limitation of normal acceleration and normal jerk limitAn (u i ) And v limitJn (u i ) The following were used:
Figure BDA0003629352540000092
Figure BDA0003629352540000093
this yields the NURBS curve under curvature constraints at the interpolation point C (u) i ) The maximum feed rate is:
Figure BDA0003629352540000094
also taking FIG. 3 as an example, the interpolation point N is calculated 1 At the maximum feed speed. Firstly to N 1 The coordinate and the first and second derivative vectors are solved, and the value u of the shop parameter is obtained in the interpolation process n1 ∈[u 2 ,u 3 ]Substituting into DeBoolean recursion formula to obtain:
Figure BDA0003629352540000095
Figure BDA0003629352540000096
Figure BDA0003629352540000097
Figure BDA0003629352540000098
wherein d is j Representing the control vertices of the NURBS curve. In the request ofCalculating N after the solution is finished 1 Value of degree of curvature K (u) n1 ):
Figure BDA0003629352540000099
Obtaining the maximum feeding speed v under the limitation of normal acceleration and normal jerk limitAn (u n1 ) And v limitJn (u n1 ) The following were used:
Figure BDA0003629352540000101
Figure BDA0003629352540000102
this yields the NURBS curve under curvature constraints at the interpolation point C (u) n1 ) The maximum feed rate is:
v limit (un 1 )=min(v limitAn (u n1 ),v limitJn (un 1 ));
the curvature of the NURBS curve is continuously variable, so the maximum feed speed under the curvature constraint is also continuously variable. Compared with the traditional interpolation algorithm that the next interpolation point is selected according to the hardware interpolation period, the interpolation process cannot determine the interpolation step length and the bow-height error, and the bow-height error and the feeding speed of the interpolation point can meet the hardware limit through prospective speed planning. The invention determines the specific position of the interpolation point on the NURBS curve in the interpolation stage, and records the maximum feeding speed of each point under the limitation of normal acceleration and jerk, thereby simplifying the aim of planning the look-ahead speed.
In summary, the interpolation algorithm based on the bow-height error of the curve interpolation system of the numerical control machine tool provided by the application uses the distance between the control points as a node vector selection mode, so that the control points can control the NURBS curve more accurately, and the processing precision is improved. In addition, the algorithm does not perform interpolation operation based on an interpolation period, but finds the maximum interpolation step length under the condition of meeting the limitation of a bow height error, reduces the number of discrete sections of a curve and improves the processing efficiency. And each interpolation point meets the requirement of bow height error, so that the processing curve is smoother and approaches to an ideal NURBS curve, and the processing precision is improved. Meanwhile, the algorithm determines the position of the interpolation point on the NURBS curve during interpolation operation, and can calculate the maximum feeding speed of the interpolation point under the comprehensive constraint, the step length of the current section and the total arc length at the same time of interpolation, thereby being beneficial to the planning of the forward looking speed and reducing the calculation complexity. Experiments prove that compared with the traditional interpolation algorithm, the curve obtained by interpolation by adopting the algorithm is smoother, and the bow height error can meet the set requirement. Therefore, the invention can realize high processing precision to the maximum extent, improve curve smoothness and improve processing quality.
The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations could be devised by those skilled in the art in light of the present teachings without departing from the inventive concepts. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

Claims (6)

1. A curve interpolation method of a numerical control machine tool is characterized by comprising the following steps:
determining a curve to be interpolated according to the motion line of the numerical control machine tool;
determining a node vector corresponding to a curve to be interpolated according to a control point corresponding to the curve to be interpolated, and dividing the curve to be interpolated into N sections of lines based on the node vector, wherein N is a positive integer;
determining a target interpolation point set of the N sections of lines based on the height error;
and calculating coordinates of each interpolation point of the curve to be interpolated according to the target interpolation point set, and performing interpolation based on the coordinates of the interpolation points.
2. The curve interpolation method of the numerical control machine according to claim 1, wherein when the curve to be interpolated is divided into N-segment lines based on the node vector, K +1 nodes at the beginning end of the curve to be interpolated are regarded as nodes with repeated parameters, a parameter value is 0, K +1 nodes at the end of the curve to be interpolated are regarded as nodes with repeated parameters, a parameter value is 1, and K represents a curve number.
3. The curve interpolation method of the numerical control machine tool according to claim 1, wherein the determining the target interpolation point set of the N-segment line based on the bow-height error comprises:
calculating a first bow height error between a first segmentation point at a first end and a second segmentation point at a second end of the target line, if the first bow height error is within a threshold range, adding the first segmentation point and the second segmentation point into an interpolation point set, and if the first bow height error is not within the threshold range, taking a median corresponding point of parameter values of the first segmentation point and the second segmentation point as a new segmentation point;
calculating a second bow height error between the first segmentation point and the new segmentation point and a third bow height error between the second segmentation point and the new segmentation point, continuously judging the second bow height error and the third bow height error to be the same as the first bow height error, if the second bow height error and the third bow height error are within a threshold value specified range, sequentially adding the new segmentation point into the interpolation point set, otherwise, continuously determining the new segmentation point by the same method, iterating until the bow height errors of all the new segmentation points meet the threshold value range, and determining the target interpolation point set after sequentially traversing the N lines; the target line is any one of the N lines.
4. The method for curve interpolation of a numerical control machine according to claim 1, wherein the interpolation based on the interpolation point coordinates comprises:
and calculating the maximum feeding speed of the interpolation points under the comprehensive constraint while performing interpolation based on the coordinates of the interpolation points, and simultaneously recording the interpolation step length and the total arc length of the current interpolation points, wherein the interpolation step length is determined by solving a point-to-point distance formula according to the coordinates obtained by solving adjacent interpolation points, and the total arc length is determined by accumulating the step lengths of all the interpolation points.
5. A curve interpolation system for a numerically controlled machine tool, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method according to any of claims 1 to 4.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN202210486505.8A 2022-05-06 2022-05-06 Curve interpolation method and system of numerical control machine tool and storage medium Pending CN114815743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210486505.8A CN114815743A (en) 2022-05-06 2022-05-06 Curve interpolation method and system of numerical control machine tool and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210486505.8A CN114815743A (en) 2022-05-06 2022-05-06 Curve interpolation method and system of numerical control machine tool and storage medium

Publications (1)

Publication Number Publication Date
CN114815743A true CN114815743A (en) 2022-07-29

Family

ID=82510955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210486505.8A Pending CN114815743A (en) 2022-05-06 2022-05-06 Curve interpolation method and system of numerical control machine tool and storage medium

Country Status (1)

Country Link
CN (1) CN114815743A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115958473A (en) * 2023-03-16 2023-04-14 华辰精密装备(昆山)股份有限公司 Non-circular component precision grinding numerical control machining method and system
CN116551457A (en) * 2023-07-11 2023-08-08 济南邦德激光股份有限公司 Method and equipment for connecting and processing straight line segment and circular arc segment through spline curve

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115958473A (en) * 2023-03-16 2023-04-14 华辰精密装备(昆山)股份有限公司 Non-circular component precision grinding numerical control machining method and system
CN116551457A (en) * 2023-07-11 2023-08-08 济南邦德激光股份有限公司 Method and equipment for connecting and processing straight line segment and circular arc segment through spline curve
CN116551457B (en) * 2023-07-11 2023-10-27 济南邦德激光股份有限公司 Method and equipment for connecting and processing straight line segment and circular arc segment through spline curve

Similar Documents

Publication Publication Date Title
CN114815743A (en) Curve interpolation method and system of numerical control machine tool and storage medium
CN101539769B (en) Method for fitting and interpolating G01 code based on quadratic B spline curve
CN110865610B (en) Tool path interpolation and speed planning method based on machine tool vibration suppression
CN106393106B (en) The robot nurbs curve of parameter adaptive densification moves interpolating method
CN109416529B (en) Numerical control system, device with storage function and NURBS curve interpolation method
CN104007705A (en) Prospective interpolation system for compressing and smoothening small segment paths
CN112486101B (en) NURBS curve self-adaptive look-ahead interpolation method
CN113204215B (en) Numerical control machining global NURBS track real-time interpolation method and application thereof
CN108549325A (en) A kind of free form surface arc length parameters Curve Machining orbit generation method
CN111506988A (en) Micro line segment tool path C2Continuous compression smoothing method
CN111633668A (en) Motion control method for robot to process three-dimensional free-form surface
CN111283683A (en) Servo tracking accelerated convergence method for robot visual feature planning track
CN110908337A (en) Method for predicting inverse control point of NURBS
CN114115131A (en) Time spline curve fitting and interpolation method applied to five-axis numerical control machine tool
CN111610751B (en) Interpolation error multi-subdivision iterative calculation method for cross point set NURBS interpolation curve
CN106444636A (en) Speed planning parameter selection method suitable for continuous mixing curve
CN109991921B (en) Smooth B spline track direct generation method
CN112305994B (en) Straight line segment smoothing method, device and equipment based on average filtering and storage medium
CN115122329B (en) Convenient industrial robot joint space trajectory planning method
CN113467376B (en) Multi-axis track compression method for multiple processing scenes
CN114002996B (en) C3 continuous five-axis path switching fairing method for hybrid robot
CN111708327B (en) PH spline transition linear path processing method with G2 continuity
CN113835397A (en) Linear numerical control machining path smoothing method based on B spline curve and path integral
CN114675601A (en) B spline fitting method of linear tool path based on dominant points
CN115237058A (en) Newton iteration method-based B spline real-time interpolation method, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination