CN114488941A - Trace fairing method and medium for micro line segments and machine tool numerical control equipment - Google Patents
Trace fairing method and medium for micro line segments and machine tool numerical control equipment Download PDFInfo
- Publication number
- CN114488941A CN114488941A CN202011254697.7A CN202011254697A CN114488941A CN 114488941 A CN114488941 A CN 114488941A CN 202011254697 A CN202011254697 A CN 202011254697A CN 114488941 A CN114488941 A CN 114488941A
- Authority
- CN
- China
- Prior art keywords
- segment
- spline
- cubic
- micro
- fitting
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- YTCQFLFGFXZUSN-BAQGIRSFSA-N microline Chemical compound OC12OC3(C)COC2(O)C(C(/Cl)=C/C)=CC(=O)C21C3C2 YTCQFLFGFXZUSN-BAQGIRSFSA-N 0.000 title claims abstract description 34
- 238000012545 processing Methods 0.000 claims abstract description 35
- 238000003754 machining Methods 0.000 claims abstract description 11
- 238000007781 pre-processing Methods 0.000 claims abstract description 7
- 239000011159 matrix material Substances 0.000 claims description 26
- 239000013598 vector Substances 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 claims description 7
- 238000009499 grossing Methods 0.000 claims description 7
- 238000003860 storage Methods 0.000 claims description 6
- 238000005304 joining Methods 0.000 claims description 2
- 230000001133 acceleration Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012937 correction Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012067 mathematical method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 150000007524 organic acids Chemical class 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 239000004576 sand Substances 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical 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/19—Numerical 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 positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical 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/41—Numerical 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
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Numerical Control (AREA)
Abstract
The invention provides a trace fairing method of a micro line segment, a medium and machine tool numerical control equipment, wherein the trace fairing method of the micro line segment comprises the steps of obtaining data points on a workpiece machining track, carrying out continuous micro-segment identification on the data points to determine data points suitable for curve fitting, and taking a track formed by the data points as a continuous micro-segment; preprocessing the continuous micro-segment to optimize the continuous micro-segment through the processing of track dead pixels; spline fitting is carried out on the optimized continuous micro-segment to obtain a B spline track, interpolation processing is carried out on two adjacent B spline tracks, and the micro-segment is smoothed through the B spline tracks. The invention provides an algorithm for fitting a micro line segment into a cubic B-spline curve, and the fitted B-spline track is smoother than the track formed by the original micro line segment, so that the processing quality of the surface of a workpiece is improved, the speed is smooth, the acceleration is continuous, and the processing efficiency of the workpiece is improved.
Description
Technical Field
The invention belongs to the technical field of five-axis machining, relates to a curved surface machining method, and particularly relates to a trace fairing method of a micro line segment, a medium and machine tool numerical control equipment.
Background
In the existing numerical control machining technology, a line segment is generally used for describing a machining path, a large number of tiny line segments are needed for describing a curved surface with a large curvature in order to approximate to the original shape of a workpiece, and if a large number of tiny lower line segments are directly machined, a system needs to be accelerated and decelerated frequently, so that fluctuation of speed and acceleration is caused, and the machining quality of the surface of the workpiece and the machining efficiency of the workpiece are influenced. One solution to this problem is to use the spline curve to re-describe the path of the trajectory to be processed, i.e. to perform trajectory smoothing. However, the current trajectory smoothing method using a large number of tiny line segments to describe a curved surface needs to be further improved in smoothness of a speed curve and surface smoothness of a processed workpiece.
Therefore, how to provide a trace fairing method for a micro line segment, a medium and a machine tool numerical control device to solve the defects that the prior art cannot ensure the high smoothness of a speed curve and the high smoothness of the surface of a workpiece when the curved surface with large curvature of the workpiece is processed becomes a technical problem to be solved by the technical personnel in the field.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method, medium and machine tool numerical control device for smoothing trace of a micro line segment, which are used to solve the problems that the prior art cannot ensure high smoothness of a speed curve and high smoothness of a workpiece surface when processing a curved surface with a large curvature of the workpiece.
In order to achieve the above and other related objects, an aspect of the present invention provides a method for fairing a trace of a micro line segment, including: acquiring data points on a workpiece machining track, carrying out continuous micro-segment identification on the data points to determine data points suitable for curve fitting, and taking a track formed by the data points as a continuous micro-segment; preprocessing the continuous micro-segment to optimize the continuous micro-segment through the processing of track dead pixels; spline fitting is carried out on the optimized continuous micro-segment to obtain a B spline track, interpolation processing is carried out on two adjacent B spline tracks, and the micro-segment is subjected to smoothing processing through the B spline tracks.
In an embodiment of the present invention, the step of acquiring data points on the processing trajectory of the workpiece and performing continuous micro-segment identification on the data points includes: determining Euclidean distances and angles between each adjacent track segment formed by the data points; and taking the track segment corresponding to the Euclidean distance smaller than a first preset threshold and the angle smaller than a second preset threshold as the continuous micro segment.
In an embodiment of the present invention, the step of preprocessing the continuous micro-segment to optimize the continuous micro-segment by processing the track dead pixel includes: and optimizing the track dead points according to the corresponding relation between the data points in the continuous micro-segment and the curved surface of the model to be processed.
In an embodiment of the present invention, the step of performing spline fitting on the optimized continuous micro-segment to obtain B-spline tracks, and performing interpolation processing on two adjacent B-spline tracks includes: judging whether the number of the data points of the continuous micro-segment is less than a preset number threshold value or not; if so, fitting all data points of the continuous micro-segment; if not, the preset number threshold is used as the fitting number of the data points, and the data points with the number being the fitting number are selected from all the data points of the continuous micro-segment to be fitted.
In an embodiment of the present invention, the step of fitting the data points includes: calculating node parameters of the data points, and determining a node vector of a cubic B spline according to the node parameters; determining control points of cubic B splines by combining the node parameters and the node vectors; calculating the fitting error of the cubic B-spline curve corresponding to the control point, and determining the successfully fitted data point through the judgment of the fitting error to form a cubic B-spline curve; fitting another cubic B-spline curve to the data points after the cubic B-spline curve to form another cubic B-spline curve; and (4) connecting two adjacent cubic B spline curves through a cubic Bessel curve.
In an embodiment of the present invention, the step of determining the control points of the cubic B-spline by combining the node parameters and the node vectors includes: calculating a basis function matrix according to the node parameters and the node vectors; and determining a control point matrix by combining the basis function matrix and a matrix formed by the data points, wherein the control point matrix comprises the control points of the cubic B-spline.
In an embodiment of the present invention, the step of calculating a fitting error of a cubic B-spline curve corresponding to the control point, and determining a successfully-fitted data point through judgment of the fitting error to form a cubic B-spline curve includes: judging whether the fitting error is larger than a fitting error threshold value or not; if so, reducing a data point in the continuous micro-segment, and recalculating the fitting error of the cubic B-spline curve corresponding to the control point until the recalculated fitting error meets the fitting precision requirement; if not, judging that the fitting error meets the fitting precision requirement, and fitting to generate the cubic B spline curve.
In an embodiment of the present invention, the step of joining two adjacent cubic B-splines by a cubic bezier curve includes: and performing connection processing on two adjacent cubic B spline curves according to the last two control points of the cubic B spline curve, the first two control points of the other cubic B spline curve and the control points of the cubic Bezier curve.
Another aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the trajectory fairing method for micro line segments.
In a final aspect, the present invention provides a numerical control apparatus for a machine tool, comprising: a processor and a memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory so as to enable the machine tool numerical control equipment to execute the trace fairing method of the micro line segment.
As described above, the method, medium and machine tool numerical control device for smoothing the trace of a micro line segment according to the present invention have the following advantages:
(1) the B-spline track deviation is controllable: the least square method is adopted to approach the original data points, the smoothness of the surface of the workpiece is improved, the controllable deviation is guaranteed, the calculation of the node vector accords with the actual engineering, the curve shape of the fitted B spline under the method is reasonable, and the curve fitting success rate is high.
(2) The deviation track of the Bezier curve is controllable, and the deviation limit can be used for directly reversely deducing the control point of the Bezier curve for 3 times.
(3) Second order continuity inside the fitted curve: both the cubic B-spline curve and the cubic Bezier curve are G2 continuous. The fitted curve track ensures the smoothness of the processing speed and the continuity of the acceleration, and avoids the sudden change of the speed and the acceleration of the machine tool. The surface quality and the processing efficiency of the workpiece can be effectively improved.
(4) First order continuity at the curve junction: the junction of the cubic B-spline curve and the cubic Bezier curve is G1 continuous. The curve joint ensures continuous speed, and can effectively improve the surface quality and the processing efficiency of the workpiece.
Drawings
Fig. 1 is a schematic flow chart illustrating a trace fairing method for micro-segments according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a continuous micro segment of the trace fairing method of the micro segment in an embodiment of the invention.
Fig. 3 is a schematic diagram illustrating a fitting determination of the trace fairing method of a micro line segment in an embodiment of the present invention.
Fig. 4 is a flow chart of data point fitting in an embodiment of the trace fairing method for a micro line segment according to the present invention.
Fig. 5 is a graph showing the effect of curve fitting in an embodiment of the trace fairing method for a micro line segment according to the present invention.
Fig. 6 is a diagram illustrating an actual processing effect of the trace fairing method for micro line segments according to an embodiment of the present invention.
FIG. 7 is a schematic structural connection diagram of a numerical control apparatus for a machine tool according to an embodiment of the present invention.
Description of the element reference numerals
7 numerical control equipment of machine tool
71 processor
72 memory
S11-S13
S131 to S133
S41-S45
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
The trace fairing method of the micro line segment utilizes a cubic B-spline curve to fit the optimized continuous micro line segment, and the B-spline curve has the advantages of strong convex hull, local modification and the like. In engineering practice, due to the requirement of real-time performance, the number of control points of one B spline curve cannot be infinitely increased, so that the number of control points of a single B spline curve needs to be constrained; in order to improve the success rate of each fitting and reduce the number of iterations, the number of data points of each fitting needs to be restricted. And performing piecewise fitting on the track points of the continuous micro-segments, fitting a plurality of continuous micro-segment tracks in a range allowed by the chord height error by using cubic B-spline curve fitting, and connecting a section of micro-segment between two sections of cubic B-spline curves in a range allowed by the chord height error by using a cubic Bezier curve. Therefore, a large number of micro-segments are described by using a continuous spline curve, an original sample piece model can be approximated, and a speed curve can be smoother and the surface smoothness of a workpiece is higher based on interpolation of the continuous spline curve.
The principle and implementation of the trace fairing method, medium and machine tool numerical control device for the micro line segment according to the present embodiment will be described in detail below with reference to fig. 1 to 7, so that those skilled in the art can understand the trace fairing method, medium and machine tool numerical control device for the micro line segment according to the present embodiment without creative work.
Referring to fig. 1, a schematic flow chart of a trajectory fairing method for micro line segments according to an embodiment of the present invention is shown. As shown in fig. 1, the method for fairing the trace of the tiny line segment specifically includes the following steps:
and S11, acquiring data points on the workpiece machining track, carrying out continuous micro-segment identification on the data points to determine data points suitable for curve fitting, and taking the track formed by the data points as a continuous micro-segment.
In the present embodiment, S11 includes:
(1) determining Euclidean distances and angles between adjacent track segments formed by the data points.
(2) And taking the track segment corresponding to the Euclidean distance smaller than a first preset threshold and the angle smaller than a second preset threshold as the continuous micro segment.
Please refer to fig. 2, which is a schematic diagram of a continuous micro segment in an embodiment of the trace fairing method for micro segments according to the present invention. As shown in FIG. 2, the data point of the machining trace of the workpiece, i.e., the CAM (Computer Aided Manufacturing) trace, is denoted as P1P2...Pn-1PnThe angle between the tracks of the front and rear segments is recorded as theta1θ2...θn-3θn-2Length between front and rear tracks L1L2...Ln-2Ln-1. Recording track fitting deviation E preset by systemmax。
Specifically, it is required that the euclidean distance between data points is not too large and the angle change is gentle at the time of identification. Thereby setting the Euclidean distance parameter (first preset threshold) to dmaxThe angle parameter (second preset threshold) is thetamaxParameter dmaxAnd thetamaxAnd setting according to engineering experience.
Recording Euclidean distance parameter d smaller than Euclidean distance in continuous trackmaxAnd the angle is smaller than the angle parameter thetamaxThe track segment of (1) is a continuous micro-segment, as shown in FIG. 2, Pi...PjThe length and angle of the line segment between are less than the preset parameters, namely Pi...PjThe data points in between are consecutive micro-segments.
S12, preprocessing the continuous micro-segment to optimize the continuous micro-segment through the processing of the track dead pixel.
In this embodiment, the track dead pixel is optimized according to the corresponding relationship between the data point in the continuous micro-segment and the curved surface of the model to be processed. Specifically, for continuous micro-segment Pi...PjThe track dead pixel is preprocessed, when a certain data point is obviously deviated from the curved surface of the model to be processed, the track dead pixel is considered to be the track dead pixel, and the dead pixel is processed, wherein the processing method comprises the steps of eliminating, dead pixel optimization according to a correction or compensation method in the prior art and the like. In connection with FIG. 2, assume a continuous micro-segment Pi...PjIf no track dead point is found, recording the track point after pretreatment as Qi...Qj。
And S13, spline fitting is carried out on the optimized continuous micro-segment to obtain a B spline track, interpolation processing is carried out on two adjacent B spline tracks, and the micro-segment is subjected to smoothing processing through the B spline track.
Specifically, the spline fitting of successive micro-segments includes 3B-spline approximations and 3 Bezier curve interpolations. Adopting least square method approximation to fit deviation E in the track preset by the systemmaxWithin the range, the cubic B-spline curve is used for approximating the tracing point Qi...Qj. In engineering practice, due to real-time nature andand the precision requirement is met when the size of the matrix is 4 multiplied by 4 in matrix inversion found in a test, so that the number of the control points of each B spline curve is set to be 6 in the invention. In order to improve the success rate of fitting and ensure the real-time performance of track fitting, the number of track points of the continuous micro-segment which is fitted for the first time is set to be N, and N generally takes a value of 20 in actual use. It should be noted that the number of the control points and the number N of the trace points of the B-spline curve may be adjusted adaptively by taking other reasonable values within the range of the principle implementation of the trace fairing method for the micro line segment in another embodiment.
Please refer to fig. 3, which is a schematic diagram illustrating a fitting determination method of a trajectory fairing method of a micro line segment according to an embodiment of the present invention. As shown in fig. 3, S13 includes:
s131, judging whether the number of the data points of the continuous micro-segment is less than a preset number threshold value. Specifically, the preset number threshold means that the number of trace points of the first-fit continuous micro-segment is N.
And S132, if so, fitting all data points of the continuous micro-segment.
Specifically, if (j-i +1) < N, then Q is directly pairedi…QjAnd (6) fitting. The number of data points of the continuous micro-segment actually fitted is recorded as m.
And S133, if not, taking the preset number threshold value as the fitting number of the data points, and selecting the data points with the number of the fitting number from all the data points of the continuous micro-segment for fitting.
If (j-i +1) is not less than N, then Q is applied to the continuous pointsi...Qi+N-1And performing cubic B-spline fitting on N data points based on least squares.
Referring to fig. 4, a flow chart of data point fitting in an embodiment of the trajectory fairing method for a micro line segment according to the present invention is shown. The spline fitting of successive micro-segments includes cubic B-spline approximation and cubic Bezier curve interpolation. As shown in fig. 4, the step of fitting the data points in S132 and S133 specifically includes:
and S41, calculating the node parameters of the data points, and determining the node vectors of the cubic B splines according to the node parameters.
Specifically, the node parameters of the corresponding data points are calculated by using a chord length methodIn order to ensure that the water-soluble organic acid,the specific calculation formula is as follows:
in the formula (1), m represents the number of data points of the continuous micro-segment actually fitted, t is 2, …, m, i represents the subscript value of Qi, and the trace point after preprocessing is Qi…Qj。
According to the calculated data point parametersDetermining a B spline node vector U, wherein U is [0, 0, 0, 0, U ═ 05,u6,0,0,0,0]. The specific calculation of the node vector U is as follows:
in formula (2), k is 1, 2; p is taken as 3, and represents 3-time B splines;r ═ I × k +1-j (where j ═ floor (I × k +1)), floor denotes rounding down.
And S42, determining the control points of the cubic B spline by combining the node parameters and the node vectors.
In the present embodiment, S42 includes:
(1) and calculating a basis function matrix according to the node parameters and the node vectors.
And calculating the B spline control points for 3 times. According to data point parametersAnd the node vector U calculates a basis function matrix.
In the formula (3) and the formula (4), m represents the number of data points of the continuous micro segment actually fitted, n represents the control point number constraint parameter, and n is 6.
(2) And determining a control point matrix by combining the basis function matrix and a matrix formed by the data points, wherein the control point matrix comprises the control points of the cubic B-spline.
Calculating a control point matrix D of the cubic B-spline curve by a least square method:
and S43, calculating the fitting error of the cubic B spline curve corresponding to the control point, and determining the successfully fitted data point through the judgment of the fitting error to form a cubic B spline curve.
In the present embodiment, S43 includes: judging whether the fitting error is larger than a fitting error threshold value or not; if so, reducing a data point in the continuous micro-segment, and recalculating the fitting error of the cubic B-spline curve corresponding to the control point until the recalculated fitting error meets the fitting precision requirement; if not, judging that the fitting error meets the fitting precision requirement, and fitting to generate the cubic B spline curve.
Specifically, the fitting error of the cubic B-spline curve corresponding to the control point P is calculated. The fitting error is calculated as:
in the formula (6), the first and second groups,represents the fitted B-spline curve in the parametersThe value of (f) is 1, …, m, g, i, …, j, whereby E is [ E ═ E1,...,em]。
The fitting error is calculated by the following formula:
FitE ═ max (e) equation (7)
If the calculated cubic B-spline curve fitting error FitE is greater than the fitting error limit EmaxThen one data point is reduced for refitting, i.e. trace point Qi...Qj-1And (j-i) fitting the trace points, and calculating a fitting error (fitting precision) until the fitting precision meets the requirement.
And S44, fitting another cubic B-spline curve to the data points after the cubic B-spline curve to form another cubic B-spline curve.
Specifically, the trace point of successful fitting (fitting error meets the requirement) is recorded as Qi...Qf(i is more than f and less than or equal to j), and a cubic B spline curve is formed by fitting, so that the trace point Q is obtainedf+1...QjThe fitting is performed according to the same cubic B-spline method, and thus another cubic B-spline curve is formed by fitting.
And S45, connecting two adjacent cubic B spline curves through a cubic Bessel curve.
In the present embodiment, S45 includes: and performing connection processing on two adjacent cubic B spline curves according to the last two control points of the cubic B spline curve, the first two control points of the other cubic B spline curve and the control points of the cubic Bezier curve.
Specifically, QfQf+1And adjacent cubic B-spline curves are connected between the two points by a cubic Bezier curve. Let the unit first derivative at the end point of the previous B-spline curve be TeThe unit first derivative at the starting point of the latter B-spline curve is TsThe calculation of the first derivative of the B-spline curve is a conventional mathematical method, which is not described herein.
Recording the control point of the cubic Bezier curve as B1,B2,B3And B4Then, the expression of the cubic Bezier curve is:
X(u)=B1(1-u)3+3B2u(1-u)+3B3u2(1-u)+B4u3formula (8)
In formula (8), the node parameter u is 0. ltoreq. 1. Wherein, B1=Qf;B2=B1+Te*d;B4=Qf+1;B3=B4-Ts*d;
The calculation formula of d is: d ═ min (E)max/sin(θ1),Emax/sin(θ2),||Qf+1-QfI/2), wherein EmaxFor fit error limitation, T-Qf+1-Qf,θ1Is a vector TeAngle of T, theta2Is a vector TsAnd the angle of T.
In a practical application of this embodiment, the trace fairing method of the micro line segment is used to perform spline fitting on 31 original data points to be fitted in the workpiece processing trace, and the G01(G01 is a straight line interpolation command in a numerical control processing technology command) code includes 31 original data points to be fitted:
each row in the matrix represents a set of coordinates (x, y, z) that represent a data point. The fitting error of the cubic B-spline curve is limited to 0.005.
The fitting suitable point of the 31 data points is found through steps S11 and S12, and all of the 31 data points of the matrix are suitable for fitting.
The determined data points are fitted, including 3B-spline approximations and 3 Bezier curve interpolations, via step S13.
(1) 3-order B-spline approximation: the first 20 data points (i.e., the 1 st to 20 th data points) in the data point matrix are read as the data point matrix Q of this fitting. Parameterizing Q by using a chord length method to obtain a data point parameter corresponding to each data pointAccording to obtainingCalculating node vector U ═ 0, 0, 0, 0.3294, 0.6631, 1, 1]. The cubic B-spline curve of the 6 control points is used for approximating 20 data points by a least square method to obtain a control point matrix of the cubic B-spline curve
And then continues to fit the 21 st to 31 st Data points in the Data point matrix Data. The node vector U of the cubic B-spline curve is obtained as [0, 0, 0, 0, 0.3327, 0.6666, 1, 1](ii) a Control point matrix
(2)3 Bezier curve interpolations: and connecting the two B splines by using a cubic Bezier curve according to the control point of the previous B spline and the control point of the next B spline, namely connecting the 20 th data point and the 21 st data point by using the cubic Bezier curve.
Please refer to fig. 5, which is a graph showing the curve fitting effect of the trace fairing method of the micro line segment according to an embodiment of the present invention. As shown in fig. 5, the curve fitting effect of the 31 data points is shown, wherein the circle is the original data point, and therefore, the consistency of the fitted curve and the original data point is high in the graph.
Please refer to fig. 6, which is a diagram illustrating an actual processing effect of the micro-segment trajectory fairing method of the present invention in an embodiment. As shown in fig. 6, since the graph (a) is a graph of a workpiece processed by the trajectory fairing method in the related art and the graph (b) is a graph of a workpiece processed by the trajectory fairing method of the minute line segment according to the present invention, the graph (b) has a smoother trajectory and higher processing quality of the workpiece surface than the graph (a).
The protection scope of the trace fairing method for the tiny line segments is not limited to the execution sequence of the steps listed in the embodiment, and all the schemes of adding, subtracting and replacing the steps in the prior art according to the principle of the invention are included in the protection scope of the invention.
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements a trajectory fairing method for the micro line segments.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned computer-readable storage media comprise: various computer storage media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Please refer to fig. 7, which is a schematic structural connection diagram of a numerical control apparatus of a machine tool according to an embodiment of the present invention. As shown in fig. 7, the present embodiment provides a machine tool numerical control apparatus 7, the machine tool numerical control apparatus 7 including: a processor 71 and a memory 72; the memory 72 is used for storing a computer program, and the processor 71 is used for executing the computer program stored in the memory, so that the machine tool numerical control equipment executes each step of the trace fairing method of the micro line segment.
The Memory 72 may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The Processor 71 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware component.
In summary, the trace fairing method, medium and machine tool numerical control equipment of the tiny line segment realize controllable deviation of the B-spline trace: the least square method is adopted to approach the original data points, the smoothness of the surface of the workpiece is improved, the controllable deviation is guaranteed, the calculation of the node vector accords with the actual engineering, the curve shape of the fitted B spline under the method is reasonable, and the curve fitting success rate is high. The deviation track of the Bezier curve is controllable, and the deviation limit can be used for directly reversely deducing the control point of the Bezier curve for 3 times. Second order continuity inside the fitted curve: both the cubic B-spline curve and the cubic Bezier curve are G2 continuous. The fitted curve track ensures the smoothness of the processing speed and the continuity of the acceleration, and avoids the sudden change of the speed and the acceleration of the machine tool. The surface quality and the processing efficiency of the workpiece can be effectively improved. First order continuity at the curve junction: the junction of the cubic B-spline curve and the cubic Bezier curve is G1 continuous. The curve joint ensures continuous speed, and can effectively improve the surface quality and the processing efficiency of the workpiece. The invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which may be made by those skilled in the art without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims (10)
1. A trace fairing method for a tiny line segment is characterized by comprising the following steps:
acquiring data points on a workpiece machining track, carrying out continuous micro-segment identification on the data points to determine data points suitable for curve fitting, and taking a track formed by the data points as a continuous micro-segment;
preprocessing the continuous micro-segment to optimize the continuous micro-segment through the processing of track dead pixels;
spline fitting is carried out on the optimized continuous micro-segment to obtain a B spline track, interpolation processing is carried out on two adjacent B spline tracks, and the micro-segment is subjected to smoothing processing through the B spline tracks.
2. The method for fairing the trace of a micro line segment according to claim 1, wherein said step of obtaining data points on the processing trace of the workpiece and identifying successive micro segments of said data points comprises:
determining Euclidean distances and angles between each adjacent track segment formed by the data points;
and taking the track segment corresponding to the Euclidean distance smaller than a first preset threshold and the angle smaller than a second preset threshold as the continuous micro segment.
3. The method for fairing the trace of a micro line segment as claimed in claim 1, wherein said step of preprocessing said continuous micro segment to optimize said continuous micro segment by processing the trace dead pixel comprises:
and optimizing the track dead points according to the corresponding relation between the data points in the continuous micro-segment and the curved surface of the model to be processed.
4. The trajectory fairing method of a micro line segment as claimed in claim 1, wherein said step of performing spline fitting on the optimized continuous micro segment to obtain B-spline trajectories and performing interpolation processing on two adjacent B-spline trajectories comprises:
judging whether the number of the data points of the continuous micro-segment is less than a preset number threshold value or not;
if so, fitting all data points of the continuous micro-segment; if not, the preset number threshold is used as the fitting number of the data points, and the data points with the number being the fitting number are selected from all the data points of the continuous micro-segment to be fitted.
5. The method for fairing the trace of a micro-segment as claimed in claim 4, wherein the step of fitting the data points comprises:
calculating node parameters of the data points, and determining a node vector of a cubic B spline according to the node parameters;
determining control points of cubic B splines by combining the node parameters and the node vectors;
calculating the fitting error of the cubic B-spline curve corresponding to the control point, and determining the successfully fitted data point through the judgment of the fitting error to form a cubic B-spline curve;
fitting another cubic B-spline curve to the data points after the cubic B-spline curve to form another cubic B-spline curve;
and (4) connecting two adjacent cubic B spline curves through a cubic Bessel curve.
6. The method of claim 5, wherein the step of determining control points of a cubic B-spline in combination with the nodal parameters and the nodal vectors comprises:
calculating a basis function matrix according to the node parameters and the node vectors;
and determining a control point matrix by combining the basis function matrix and a matrix formed by the data points, wherein the control point matrix comprises the control points of the cubic B-spline.
7. The method for fairing the trace of a tiny line segment according to claim 5, wherein said step of calculating the fitting error of the cubic B-spline curve corresponding to said control point and determining the successfully fitted data point by the judgment of said fitting error to form a cubic B-spline curve comprises:
judging whether the fitting error is larger than a fitting error threshold value or not;
if so, reducing a data point in the continuous micro-segment, and recalculating the fitting error of the cubic B-spline curve corresponding to the control point until the recalculated fitting error meets the fitting precision requirement; if not, judging that the fitting error meets the fitting precision requirement, and fitting to generate the cubic B spline curve.
8. The method for fairing the trace of a tiny line segment as claimed in claim 5, wherein said step of joining two adjacent cubic B-spline curves by cubic Bessel curve comprises:
and performing connection processing on two adjacent cubic B spline curves according to the last two control points of the cubic B spline curve, the first two control points of the other cubic B spline curve and the control points of the cubic Bezier curve.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the trajectory fairing method for micro line segments as claimed in any one of claims 1 to 8.
10. A machine tool numerical control apparatus, characterized by comprising: a processor and a memory;
the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory so as to enable the machine tool numerical control equipment to execute the track fairing method of the micro line segment as claimed in any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011254697.7A CN114488941A (en) | 2020-11-11 | 2020-11-11 | Trace fairing method and medium for micro line segments and machine tool numerical control equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011254697.7A CN114488941A (en) | 2020-11-11 | 2020-11-11 | Trace fairing method and medium for micro line segments and machine tool numerical control equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114488941A true CN114488941A (en) | 2022-05-13 |
Family
ID=81490761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011254697.7A Pending CN114488941A (en) | 2020-11-11 | 2020-11-11 | Trace fairing method and medium for micro line segments and machine tool numerical control equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114488941A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115480519A (en) * | 2022-11-04 | 2022-12-16 | 济南邦德激光股份有限公司 | B spline curve fitting method, device and medium based on orthogonal trigonometric decomposition |
CN116795044A (en) * | 2023-08-16 | 2023-09-22 | 通用技术集团机床工程研究院有限公司 | Speed planning method, device, machine tool control system and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10240329A (en) * | 1997-02-26 | 1998-09-11 | Mitsubishi Electric Corp | Curve fine-segmentation method and numerical controller provided with spline interpolation function |
CN109571473A (en) * | 2018-12-03 | 2019-04-05 | 武汉工程大学 | A kind of small line segment track method for fairing that error is controllable |
CN109664303A (en) * | 2019-02-28 | 2019-04-23 | 武汉工程大学 | A kind of four smooth orbit generation methods of shaft industrial robot B-spline transition type that error is controllable |
WO2020133049A1 (en) * | 2018-12-27 | 2020-07-02 | 深圳配天智能技术研究院有限公司 | Numerically controlled machining method, numerically controlled machine tool and computer storage medium |
-
2020
- 2020-11-11 CN CN202011254697.7A patent/CN114488941A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10240329A (en) * | 1997-02-26 | 1998-09-11 | Mitsubishi Electric Corp | Curve fine-segmentation method and numerical controller provided with spline interpolation function |
CN109571473A (en) * | 2018-12-03 | 2019-04-05 | 武汉工程大学 | A kind of small line segment track method for fairing that error is controllable |
WO2020133049A1 (en) * | 2018-12-27 | 2020-07-02 | 深圳配天智能技术研究院有限公司 | Numerically controlled machining method, numerically controlled machine tool and computer storage medium |
CN111684374A (en) * | 2018-12-27 | 2020-09-18 | 深圳配天智能技术研究院有限公司 | Numerical control machining method, numerical control machine tool, and computer storage medium |
CN109664303A (en) * | 2019-02-28 | 2019-04-23 | 武汉工程大学 | A kind of four smooth orbit generation methods of shaft industrial robot B-spline transition type that error is controllable |
Non-Patent Citations (1)
Title |
---|
孙艳艳: "基于参数弧长化、G2桥接和质量评估的刀具轨迹B样条拟合方法,孙艳艳", 《中国优秀硕士学位论文全文数据库 工程科技I辑》, pages 17 - 23 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115480519A (en) * | 2022-11-04 | 2022-12-16 | 济南邦德激光股份有限公司 | B spline curve fitting method, device and medium based on orthogonal trigonometric decomposition |
CN115480519B (en) * | 2022-11-04 | 2023-02-21 | 济南邦德激光股份有限公司 | B-spline curve fitting method, device and medium based on orthogonal trigonometric decomposition |
CN116795044A (en) * | 2023-08-16 | 2023-09-22 | 通用技术集团机床工程研究院有限公司 | Speed planning method, device, machine tool control system and storage medium |
CN116795044B (en) * | 2023-08-16 | 2023-11-14 | 通用技术集团机床工程研究院有限公司 | Speed planning method, device, machine tool control system and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6249936B2 (en) | Method and system for generating trajectories | |
CN109571473B (en) | Error-controllable small line segment trajectory fairing method | |
CN109416529B (en) | Numerical control system, device with storage function and NURBS curve interpolation method | |
CN110900612B (en) | Pose-synchronous six-axis industrial robot track smoothing method | |
WO2011052800A1 (en) | Tool path generation method and device | |
US8774965B2 (en) | Method and device for controlling a manipulator | |
CN109976262B (en) | Global curvature continuous fairing method for micro-line segment processing | |
CN114488941A (en) | Trace fairing method and medium for micro line segments and machine tool numerical control equipment | |
Zhang et al. | Curve fitting and optimal interpolation on CNC machines based on quadratic B-splines | |
CN111055286B (en) | Industrial robot track generation method, system, device and storage medium | |
CN112015142A (en) | NURBS-based small segment processing method | |
JP5615377B2 (en) | Tool path generation method and generation apparatus | |
CN113276130B (en) | Free-form surface spraying path planning method and system based on point cloud slice | |
CN114115131B (en) | Time spline curve fitting and interpolation method applied to five-axis numerical control machine tool | |
CN114815743A (en) | Curve interpolation method and system of numerical control machine tool and storage medium | |
CN113504764A (en) | Continuous line segment numerical control machining path smoothing method based on position vector weighted integral | |
CN113001263A (en) | Robot-based high point polishing method and equipment | |
CN113021329B (en) | Robot motion control method and device, readable storage medium and robot | |
WO2018205248A1 (en) | Spline path interpolation method and relevant device | |
CN114019911B (en) | Curve fitting method based on speed planning | |
CN111610751A (en) | Iterative calculation method for repeatedly subdividing interpolation errors of NURBS (non-uniform rational B-spline) interpolation curve of over-point set | |
CN116551457A (en) | Method and equipment for connecting and processing straight line segment and circular arc segment through spline curve | |
CN112305994B (en) | Straight line segment smoothing method, device and equipment based on average filtering and storage medium | |
Yan et al. | THREE-AXIS TOOL-PATH B-SPLINE FITTING BASED ON PREPROCESSING, LEAST SQUARE APPROXIMATION AND ENERGY MINIMIZATION AND ITS QUALITY EVALUATION. | |
CN114967597A (en) | Curve fitting method for guaranteeing numerical control machining tool path G2 continuity based on bidirectional Taylor |
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 |