A curve fitting method based on bidirectional Taylor to ensure G2 continuity of CNC machining tool trajectory

Through the combination of bidirectional Taylor expansion and Akima splines, the problems of frequent acceleration and deceleration and low accuracy in CNC machining trajectories are solved, G2 continuity and smooth CNC machining tool trajectories are achieved, and machining efficiency and accuracy are improved.

CN114967597BActive Publication Date: 2024-09-17XIANGTAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210538510.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2024-09-17
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

Existing CNC machining trajectories have problems such as frequent acceleration and deceleration during complex workpiece processing, resulting in machine tool vibration and low processing accuracy, making it difficult to meet smoothness and accuracy requirements.

Method used

A CNC machining tool path fitting method based on bidirectional Taylor expansion is used to establish arc length parameterized information segmentally, establish a spatial Frenet coordinate system, perform unit tangent vector, normal vector, and paranormal vector projection, and combine Akima splines and Hermite functions. , ensuring that the fitting curve of each processing area meets the G2 continuity and smoothness requirements.

Benefits of technology

The generated CNC machining tool path has a small amount of calculation and is suitable for machine tool processing. It avoids frequent acceleration and deceleration, improves processing efficiency, meets G2 continuity and accuracy requirements, and reduces vibration and impact during the processing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114967597B
    Figure CN114967597B
Patent Text Reader

Abstract

The present invention belongs to the field of CNC machining trajectory optimization, and specifically relates to a curve fitting method for ensuring G2 continuity of CNC machining tool trajectory based on bidirectional Taylor. First, arc length parameterization information is established according to a number of small machining areas divided according to discrete data points. Secondly, a spatial Frenet coordinate system is established for the two data points before and after each machining area respectively. The arc length is bidirectionally Taylor-expanded on the local coordinate system. The unit tangent vector T, normal vector N, and vice-normal vector B are projected respectively to obtain a fitting curve based on curvature, torsion, and their derivatives. Finally, the fitting curve on each machining area is bridged. The equalization of each order derivative of the arc length of the Taylor expansion at the data point ensures that the bridge curve meets the smoothness requirements, and ensures that the CNC machining tool trajectory that meets the machining error and G2 continuity is established. The CNC machining tool trajectory generated by the present invention meets the G2 continuity and precision requirements, has a small amount of calculation, is suitable for machining, and can effectively improve machining efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of CNC machining trajectory optimization, and specifically relates to a curve fitting method for ensuring the continuity of CNC machining tool trajectory G2 based on bidirectional Taylor. Background Art

[0002] In the field of CNC machining trajectory optimization, for complex workpieces, CAD and CAM systems are generally used to transform complex trajectories into CNC machining trajectories composed of many small line segments. After post-processing, the complex trajectory is transformed into recognizable program code and its code is transmitted to the CNC system. If the CNC system runs directly according to the generated machining trajectory, there will be the following disadvantages: (1) Due to the frequent acceleration and deceleration of the system, it is easy to cause machine tool vibration and reduce machining efficiency; (2) The generated trajectory has poor smoothness and cannot meet the machining accuracy requirements. In order to avoid frequent acceleration and deceleration, reduce the vibration and impact during the machining process, and make the machining trajectory have good smoothness, G2 continuity is used to make the two curves continuous at the connection point and the curvature vector is the same. Akima spline is only G1 continuous at the data point, that is, the two curves are continuous at the connection point and the tangent direction is the same. After Frenet-Taylor bridging processing, G2 continuity can be achieved.

[0003] With the continuous development of society, market competition is becoming more and more fierce. Therefore, all manufacturing companies are in urgent need of improving production technology and improving production efficiency, especially in the field of CNC machining trajectory optimization. In view of the above-mentioned defects and shortcomings, the patent of the present invention proposes a curve fitting method based on bidirectional Taylor to ensure the G2 continuity of CNC machining tool trajectory. The tool trajectory obtained by bidirectional Taylor expansion has a small amount of calculation and is suitable for machine tool processing. While ensuring that the bridge curve meets the smoothness requirements, it also meets the processing error. The CNC machining tool trajectory generated by the present invention meets the G2 continuity and precision requirements, has a small amount of calculation, is suitable for machine tool processing, has good real-time performance, and can effectively improve processing efficiency. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a curve fitting method based on bidirectional Taylor to ensure the G2 continuity of CNC machining tool trajectory. First, arc length parameterization information is established according to the discrete data points divided into several small machining areas. Secondly, spatial Frenet coordinate systems are established for the two data points before and after each machining area respectively. The arc length is bidirectionally Taylor expanded on the local coordinate system, and the unit tangent vector T, unit normal vector N, and unit binormal vector B are projected respectively to obtain a fitting curve based on curvature, torsion and their derivatives. Finally, the fitting curve on each machining area is bridged. The equality of each order derivative of the arc length of the bidirectional Taylor expansion at the data point ensures that the bridge curve meets the smoothness requirements. Based on the bidirectional Taylor expansion, it is ensured that a CNC machining tool trajectory that meets the machining error and G2 continuity is established.

[0005] The technical solution to solve the above technical problems is as follows:

[0006] The present invention provides a curve fitting method based on bidirectional Taylor to ensure the continuity of CNC machining tool trajectory G2, which is characterized by comprising the following steps:

[0007] (1) Establish Akima spline basis functions piecewise, calculate the corresponding parameters u, first-order tangent vector q, discrete derivative ds / du, and discrete integral ∫sdu at discrete data points, and form several small processing areas between every two adjacent data points. The arc length s on the processing area corresponding to the parameterized discrete data points is used as the general parameter u of the curve to be fitted;

[0008] (2) Using the first-order tangent vector q calculated in step 1, calculate the double chord height error and tangent error, identify data points, divide the continuous processing area, and use the Hermite cubic function to splice the processing area with less than 3 data points, and use the Hermite quintic function to splice the processing area with more than 3 and less than 5 data points. The processing area that meets the error requirements is processed according to step 3. Using the geometric information obtained in the Akima parameterization process, calculate the differential geometry pairs at the discrete points, the unit tangent vector (T1, T2), the unit normal vector (N1, N2), the unit binormal vector (B1, B2), the curvature (k1, k2) of the discrete data points, the torsion (τ1, τ2) and their derivatives of various orders;

[0009] (3) In the same processing area, the differential geometry pairs are merged into the Frenet coordinate system corresponding to the discrete data points, and the curve to be fitted at the discrete data points is expanded into a bidirectional Taylor expansion of the arc length in the Frenet coordinate system, and fitted into a single spline curve;

[0010] (4) For the fitting spline curves formed at positions 1 and 2 of each processing area, the curve is guided according to the G2 continuity condition to obtain the entire spline curve for bridging processing. The equality of the arc length derivatives of the bidirectional Taylor expansion at the data points ensures that the bridging curve meets the smoothness requirements and ensures the establishment of a CNC machining tool trajectory that meets the machining error and G2 continuity.

[0011] Furthermore, the step (1) is specifically as follows: the Akima arc length parameterization is a discrete data point parameterization calculation method. Assume that there is an ordered point sequence S i =(u x,i ,u y,i ,u z,i )i=0,1,2,…,n. Different from the centripetal parameterization, the arc length parameter s at the data point is determined by Akima interpolation, and the arc length parameter s is used as the general parameter of the fitting curve:

[0012]

[0013] Based on the Akima interpolation formula of arc length parameter, the arc length parameterized interpolation form g(s) is expressed in matrix form, then g(s) can be expressed as (ss i ), whose coefficients form a coefficient matrix, the elements of the coefficient matrix are:

[0014] a i =S i , b i =σ i ,

[0015] l i is the chord length of the data point, which is the arc length parameter s of the arc length parameterized form g(s) i , the i-th subdivision unit [l i ,l i+1 ]The tangent vector σ at the data point i Use the slope vector of the neighboring processing area The weighted sum of is represented as:

[0016]

[0017] in: u is S(s i ) That is, the above formula for the processing area of ​​the straight line segment will become an infinitive. To avoid calculation divergence, take The curve S(s i ) is provided by the slope vector of the data point adjacent to the five points in two processing areas. hour,

[0018] From the Cartesian coordinate system, the geometric information of the parameters that can be determined by Akima arc length parameterization at discrete data points are:

[0019] x′(s i )=B f,i +2C f,i (s i )+3D f,i (s i ) 2

[0020] y′(s i )=B g,i +2C g,i (s i )+3D g,i (s i ) 2

[0021] z′(s i )=B w,i +2C w,i (s i )+3D w,i (s i ) 2

[0022] x″(s i )=2C f,i +6D f,i (s i )

[0023] y″(s i )=2C g,i +6D g,i (s i )

[0024] z″(s i )=2C w,i +6D w,i (s i )

[0025] x″′(s i )=6D f,i

[0026] y″′(s i )=6D g,i

[0027] z″′(s i )=6D w,i

[0028] s′(s i )=1

[0029] Furthermore, the step (2) is specifically as follows: the differential geometry pairs at the discrete points, the unit tangent vector (T1, T2), the unit normal vector (N1, N2), the unit binormal vector (B1, B2), the discrete data point curvature (k1, k2), the torsion (τ1, τ2) and the differential formulas of their derivatives of various orders in two-dimensional space are:

[0030] k=|x′y″-x″y′|

[0031]

[0032]

[0033] The formula in three-dimensional space is:

[0034]

[0035]

[0036]

[0037]

[0038]

[0039]

[0040]

[0041]

[0042] Furthermore, the step (3) is specifically as follows: the two-dimensional space curve parameter equation is expanded into a bidirectional Taylor expansion of arc length in the Frenet coordinate system as follows:

[0043]

[0044] The Taylor expansion C(s) of the CNC machining tool trajectory obtained in this way is Frenet form:

[0045]

[0046]

[0047]

[0048] T(Δs)=(x′,y′)

[0049]

[0050] The parametric equation of the three-dimensional space curve is as follows:

[0051] x=x(s),y=y(s),z=z(s)

[0052]

[0053]

[0054]

[0055]

[0056] T(Δs)=(x′,y′,z′)

[0057]

[0058]

[0059] Furthermore, the step (4) is specifically as follows: the bridging process includes bridging of two-dimensional plane curves and three-dimensional space curves, and the parameter equation of the CNC tool trajectory needs to perform a piecewise low-order Frenet form Taylor expansion of each interpolation processing area to bridge the front and back, and μ and ν represent the distance between the fitting point and the front and rear discrete data points and the arc length. The bridging formula is as follows:

[0060]

[0061] The present invention relates to a curve fitting method for ensuring the G2 continuity of a CNC machining tool trajectory based on a bidirectional Taylor method, which ensures that a bridge curve meets the smoothness requirement, avoids frequent acceleration and deceleration, and reduces vibration and impact during machining. The CNC machining tool trajectory generated by the present invention meets the G2 continuity and accuracy requirements, has a small amount of calculation, is suitable for machine tool machining, has good real-time performance, and can effectively improve machining efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a schematic diagram of the bidirectional Taylor fitting effect;

[0063] Figure 2 It is a schematic diagram of the bridging process of non-continuous areas; DETAILED DESCRIPTION

[0064] In order to make the purpose, fitting method and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0065] Firstly, the arc length parameterization information is established by dividing the discrete data points into several small processing areas. Secondly, the spatial Frenet coordinate system is established for the two data points before and after each processing area. The arc length is bidirectionally Taylor expanded in the local coordinate system. The unit tangent vector T, the unit normal vector N, and the unit binormal vector B are projected respectively to obtain the fitting curve based on the curvature, torsion and its derivative expression. Finally, the fitting curve in each processing area is bridged. The equality of the derivatives of the arc length of the bidirectional Taylor expansion at the data point is used to ensure that the bridge curve meets the smoothness requirements. Based on the bidirectional Taylor expansion, it is ensured that the CNC machining tool trajectory that meets the machining error and G2 continuity is established. The schematic diagram of the bidirectional Taylor fitting effect is shown in the figure below. Figure 1 shown.

[0066] In order to better explain the present invention, a specific embodiment is given as follows:

[0067] The present invention provides a curve fitting method based on bidirectional Taylor to ensure the continuity of CNC machining tool trajectory G2, which specifically includes the following steps:

[0068] (1) Establish Akima spline basis functions piecewise

[0069] Calculate the corresponding parameters u, first-order tangent vector q, discrete derivative ds / du, and discrete integral ∫s du at the discrete data points. Several small processing areas are formed between every two adjacent data points. The arc length parameter s at the data point is determined by Akima interpolation, and the arc length parameter s is used as the general parameter of the fitting curve:

[0070]

[0071] Based on the Akima interpolation formula of arc length parameter, the arc length parameterized interpolation form g(s) is expressed in matrix form, then g(s) can be expressed as (ss i ), whose coefficients form a coefficient matrix, the elements of the coefficient matrix are:

[0072] a i =S i , b i =σ i ,

[0073] l i is the chord length of the data point, which is the arc length parameter s of the arc length parameterized form g(s) i , the i-th subdivision unit [l i ,l i+1 ]The tangent vector σ at the data point i Use the slope vector of the neighboring processing area The weighted sum of is represented as:

[0074]

[0075] in:

[0076] u is S(s i ) That is, the above formula for the processing area of ​​the straight line segment will become an infinitive. To avoid calculation divergence, take The curve S(s i ) is provided by the slope vector of the data point adjacent to the five points in the two processing areas. hour,

[0077] From the Cartesian coordinate system, the parameter information determined by Akima arc length parameterization at discrete data points is:

[0078] x′(s i )=B f,i +2C f,i (s i)+3D f,i (s i ) 2

[0079] y′(s i )=B g,i +2C g,i (s i )+3D g,i (s i ) 2

[0080] z′(s i )=B w,i +2C w,i (s i )+3D w,i (s i ) 2

[0081] x″(s i )=2C f,i +6D f,i (s i )

[0082] y″(s i )=2C g,i +6D g,i (s i )

[0083] z″(s i )=2C w,i +6D w,i (s i )

[0084] x″′(s i )=6D f,i

[0085] y″′(s i )=6D g,i

[0086] z″′(s i )=6D w,i

[0087] s′(s i )=1

[0088] (2) Calculate the differential geometry invariants at discrete points

[0089] Using the first-order tangent vector q calculated in step 1, calculate the double chord height error and tangent error, identify data points, divide the continuous processing area, and use the Hermite cubic function to splice the processing area with less than 3 data points, and use the Hermite quintic function to splice the processing area with more than 3 and less than 5 data points. The processing area that meets the error requirements is processed according to step 3. Using the geometric information obtained in the Akima parameterization process, calculate the differential geometry pairs at the discrete points. The unit tangent vector (T1, T2), unit normal vector (N1, N2), unit binormal vector (B1, B2), discrete data point curvature (k1, k2), torsion (τ1, τ2) and their derivatives of various orders. The differential formula in two-dimensional space is:

[0090] k=|x′y″-x″y′|

[0091]

[0092]

[0093] The formula in three-dimensional space is:

[0094]

[0095]

[0096]

[0097]

[0098]

[0099]

[0100]

[0101]

[0102] (3) Bidirectional Taylor expansion of the fitting curve

[0103] In the same processing area, the differential geometry pairs are merged into the Frenet coordinate system corresponding to the discrete data points, and the curve to be fitted at the discrete data points is expanded into a bidirectional Taylor expansion of the arc length in the Frenet coordinate system, and fitted into a single spline curve. The curve parameter equation in two-dimensional space is as follows:

[0104]

[0105] The Taylor expansion C(s) of the Frenet form of the NC machining tool trajectory obtained in this way is

[0106]

[0107]

[0108]

[0109] T(Δs)=(x′,y′)

[0110]

[0111] The parametric equation of the three-dimensional space curve is as follows:

[0112] x=x(s),y=y(s),z=z(s)

[0113]

[0114]

[0115]

[0116]

[0117] T(Δs)=(x′,y′,z′)

[0118]

[0119]

[0120] (4) Bridging Processing of Fitted Spline Curves

[0121] For the fitting spline curve formed at positions 1 and 2 of each processing area, the curve is guided with the G2 continuity condition to obtain the entire spline curve for bridging processing. Figure 2 , Figure 2 The area before C1 is the previous processing area, the area after C2 is the next processing area, and the middle is the discontinuous processing area. C(t) is the bridge curve. When there are 3 or 5 discrete data points, the figure represents 3rd or 5th Hermite splicing. The equality of the derivatives of the arc length of the bidirectional Taylor expansion at the data points ensures that the bridge curve meets the smoothness requirements and ensures the establishment of a CNC machining tool trajectory that meets the machining error and G2 continuity.

[0122] The bridging formula is as follows:

[0123]

[0124] μ and ν represent the distance from the fitting point to the previous and next discrete data points and the arc length.

[0125] In summary, the present invention provides a curve fitting method based on bidirectional Taylor to ensure the G2 continuity of CNC machining tool trajectory, which ensures that the bridging curve meets the smoothness requirements, avoids frequent acceleration and deceleration of the machine tool, and reduces vibration and impact during the machining process. The CNC machining trajectory generated by the present invention meets the G2 continuity and accuracy requirements, has good real-time performance, and can effectively improve machining efficiency.

[0126] The present invention and its embodiments are described above. Such description is not restrictive. If a person skilled in the art is inspired by it, various changes and modifications may be made within the spirit and scope of the present invention. However, such changes and modifications shall fall within the protection scope of the present invention.

Claims

1. A curve fitting method based on bidirectional Taylor to ensure the continuity of CNC machining tool trajectory G2, characterized in that: The specific steps include: (1) Establish Akima spline basis functions piecewise, calculate the corresponding parameters u, first-order tangent vector q, discrete derivative ds / du, and discrete integral ∫sdu at discrete data points, form several small processing areas between every two adjacent data points, and the arc length s on the processing area corresponding to the discrete data points after arc length parameterization is used as the general parameter u of the curve to be fitted; (2) Using the first-order tangent vector q calculated in step 1, calculate the double chord height error and tangent error, identify data points, divide the continuous processing area, and use the Hermite cubic function to splice the processing area with less than 3 data points, and use the Hermite quintic function to splice the processing area with more than 3 and less than 5 data points. The processing area that meets the error requirements is processed according to step 3. Using the geometric information obtained in the Akima parameterization process, calculate the differential geometry number pairs at the discrete points: unit tangent vector (T1, T2), unit normal vector (N1, N2), unit binormal vector (B1, B2), discrete data point curvature (k1, k2), torsion (τ1, τ2) and their derivatives of various orders; (3) In the same processing area, the differential geometry pairs are merged into the Frenet coordinate system corresponding to the discrete data points, and the curve to be fitted at the discrete data points is expanded into a bidirectional Taylor expansion of the arc length in the Frenet coordinate system, and fitted into a single spline curve; (4) For the fitting spline curve formed at positions 1 and 2 of each processing area, the curve is guided with the G2 continuity condition to obtain the entire spline curve of the bridge processing. The equal derivatives of the arc length of the bidirectional Taylor expansion at the data point are used to ensure that the bridge curve meets the smoothness requirements, and ensure that the CNC machining tool trajectory that meets the machining error and G2 continuity is established; Akima arc length parameterization is a discrete data point parameterization calculation method. There is an ordered point sequence S i =(u x,i ,u y,i ,u z,i )i=0,1,2,…,n; Different from the centripetal parameterization, the arc length parameter s at the data point is determined by Akima interpolation, and the arc length parameter s is used as the general parameter of the fitting curve: Based on the Akima interpolation formula of arc length parameter, the arc length parameterized interpolation form g(s) is expressed in matrix form, then g(s) can be expressed as (ss i ), whose coefficients form a coefficient matrix, the elements of the coefficient matrix are: a i =S i ,b i =s i , l i For the chord length of the data point, calculate the tangent geometry information of the data point, and calculate the arc length through discrete integration; The arc length of the data point is the arc length parameter s of the arc length parameterized form g(s) of the fitted curve i , the i-th subdivision unit [l i ,l i+1 ]The tangent vector σ at the data point i Use the slope vector of the neighboring processing area The weighted sum of is represented as: in: u is S(s i ) That is, the above formula for the processing area of ​​the straight line segment will become an infinitive. To avoid calculation divergence, take The curve S(s i ) is provided by the slope vector of the data point adjacent to the five points in two processing areas. hour, 2. A curve fitting method based on bidirectional Taylor to ensure the continuity of CNC machining tool trajectory G2 according to claim 1, characterized in that: The differential geometry pairs at the discrete points: unit tangent vector (T1, T2), unit normal vector (N1, N2), unit binormal vector (B1, B2), discrete data point curvature (k1, k2), torsion (τ1, τ2) and their derivatives of various orders are expressed in two-dimensional space as follows: k=|x′y″-x″y′| 3. A curve fitting method based on bidirectional Taylor to ensure the continuity of CNC machining tool trajectory G2 according to claim 2, characterized in that: Expanded into a bidirectional Taylor expansion of arc length in the Frenet coordinate system, the parametric equation of the two-dimensional space curve is as follows: The Taylor expansion C(s) of the CNC machining tool trajectory obtained in this way is Frenet form: T(Δs)=(x′,y′) 4. A curve fitting method based on bidirectional Taylor to ensure the continuity of CNC machining tool trajectory G2 according to claim 3, characterized in that: The bridging process includes the bridging of two-dimensional plane curves and three-dimensional space curves, and the curve is guided by the G2 continuity condition to obtain the entire spline curve of the bridging process. The parameter equation of the CNC tool trajectory needs to perform the forward and backward bridging of the piecewise low-order Frenet form Taylor expansion for each interpolation processing area. The bridging formula is as follows: μ and ν represent the distance from the fitting point to the previous and next discrete data points and the arc length.