[go: up one dir, main page]

CN113721551B - Numerical control machining method and numerical control machining equipment - Google Patents

Numerical control machining method and numerical control machining equipment Download PDF

Info

Publication number
CN113721551B
CN113721551B CN202010456287.4A CN202010456287A CN113721551B CN 113721551 B CN113721551 B CN 113721551B CN 202010456287 A CN202010456287 A CN 202010456287A CN 113721551 B CN113721551 B CN 113721551B
Authority
CN
China
Prior art keywords
micro
segment
curve
points
point
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.)
Active
Application number
CN202010456287.4A
Other languages
Chinese (zh)
Other versions
CN113721551A (en
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.)
Symg Shanghai Intelligence System Co ltd
Original Assignee
Symg Shanghai Intelligence System Co ltd
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 Symg Shanghai Intelligence System Co ltd filed Critical Symg Shanghai Intelligence System Co ltd
Priority to CN202010456287.4A priority Critical patent/CN113721551B/en
Publication of CN113721551A publication Critical patent/CN113721551A/en
Application granted granted Critical
Publication of CN113721551B publication Critical patent/CN113721551B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/4097Numerical 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 using design data to control NC machines, e.g. CAD/CAM
    • G05B19/4099Surface or curve machining, making 3D objects, e.g. desktop manufacturing
    • 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
    • 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/34083Interpolation general
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Human Computer Interaction (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 numerical control machining method and numerical control machining equipment, wherein the method comprises the following steps: 1) Continuous micro-segment identification: identifying continuous micro-segment parts needing smooth compression according to the length and vector angle between programming points of the program segment to be processed; 2) Node vector parameterization: parameterizing programming points of continuous micro-segment parts needing smooth compression to obtain node vector parameters corresponding to the programming points; 3) First order tangential vector solving: constructing an interpolation curve through 4 continuous programming points to calculate a first order tangent vector corresponding to the programming points; 4) Smooth compression program segment: compressing programming points into spline curves according to programming point instruction values of continuous micro-segments to be smoothly compressed and corresponding first-order tangent vector values; and (3) checking whether the Euclidean distance from the programming point to the corresponding spline point meets the machining precision, and correspondingly adjusting the control point to control errors. The numerical control machining method and the numerical control machining equipment are used for smoothing machining tracks within the precision range.

Description

Numerical control machining method and numerical control machining equipment
Technical Field
The invention relates to the technical field of numerical control machining, in particular to a numerical control machining method and numerical control machining equipment.
Background
In numerical control machine tool machining, free curves and free curved surfaces have been widely used in die machining, automobile parts machining and aerospace parts machining. But rapid high quality machining of free curves and curved surfaces has been a difficulty in machining. In the existing processing of free curves or curved surfaces of numerical control systems, CAM (Computer-aidedmanufacturing) software generally approximates a designed free curve or curved surface with a large number of tiny line segments, and then the numerical control system processes a large number of tiny straight line segments generated by the CAM software approximating the designed free curve or curved surface according to a straight line interpolation mode (G01 mode).
When CAM software is adopted for processing, if tolerance setting is large (such as + -0.03), the CAM software adopts micro line segments to approach a free curve or a curved surface designed, and then the CAM software is processed in a G01 mode, so that inclined planes, waves, speckles and the like appear on the surface of a processed workpiece, and the surface quality cannot meet the requirements. If the tolerance setting is small (e.g., ±0.001), the amount of program data generated by the CAM software is very large, which can take up a lot of computer resources. And the length of a micro line segment for approaching a free curved surface or a curve is too small, the acceleration of each axis can be changed frequently by adopting a linear interpolation mode in a numerical control system, so that the vibration of a machine tool is caused, and the surface quality of a processed workpiece is finally affected.
Chinese patent CN101881952B discloses a smooth compression processing method for program segments suitable for numerical control devices, which can avoid the surface roughness of a workpiece caused by linear interpolation at the transition of the program segments, but the processing precision is not precisely controllable.
Therefore, it is desirable to solve the problem that the precision and efficiency of the conventional micro-segment smoothing compression processing method for numerical control processing cannot meet the production requirements.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, an object of the present invention is to provide a numerical control processing method and a numerical control processing apparatus, which are used for solving the problem that the precision and efficiency of the micro-segment smooth compression processing method for numerical control processing in the prior art cannot meet the production requirement.
To achieve the above and other related objects, the present invention provides a numerical control processing method of a communication signal, including the steps of: providing a machining program curve P 0Pn required by numerical control machining equipment, wherein the machining program curve P 0Pn comprises at least two micro-segment instruction points P i and P j; identifying a continuous micro-segment portion P i Pj; And obtaining a target processing curve from the continuous micro-segment part P i Pj according to the deviation range: if the continuous micro-segment part P i Pj can be smoothly compressed into a spline curve meeting the processing precision, a target processing curve corresponding to the continuous micro-segment part P i Pj is formed; If the continuous micro-segment part P i Pj cannot be smoothly compressed into a spline curve meeting the machining precision, reducing j to k until the continuous micro-segment part P i Pk can be smoothly compressed into a spline curve meeting the machining precision, and obtaining a sub-target machining curve corresponding to the continuous micro-segment part P i Pk; Smoothly compressing the remaining micro-segment part P k Pj in the same way to obtain a sub-target processing curve corresponding to the instruction point of the remaining micro-segment part P k Pj; sequentially connecting all the sub-target processing curves to obtain a target processing curve of the continuous micro-segment part P i Pj; Wherein P i is any micro-segment instruction point on the processing program curve P 0Pn, i is more than or equal to k and less than or equal to j and less than or equal to m, and the points are all positive integers.
In an embodiment of the present invention, after obtaining the target machining curve of the continuous micro-segment portion P i Pj, the numerical control machining apparatus machines the workpiece according to the target machining curve.
In one embodiment of the present invention, the method for identifying the continuous micro-segment portion P i Pj includes: comparing the length between two adjacent micro-segment instruction points P n,Pn+1 on the machining program curve P 0Pm with a preset micro-segment length threshold d max, and setting the corresponding two micro-segment instruction points P n,Pn-1 as disconnection points of continuous micro-segments if the length between the two adjacent micro-segment instruction points is larger than the micro-segment length threshold d max; comparing a vector angle P n-1PnPn+1 formed by three adjacent micro-segment instruction points P n-1,Pn,Pn+1 with a preset angle threshold, and if the vector angle is larger than the angle threshold, setting a programming point P n corresponding to an intersection point of the vector angles as a disconnection point of the continuous micro-segment; a continuous micro-segment part between a starting point P 0 and a disconnection point P n adjacent thereto, an ending point P m and a disconnection point P n+1 adjacent thereto, or between two adjacent disconnection points, is identified as the continuous micro-segment part P i Pj, wherein n, m is a positive integer, and n < i.ltoreq.m or n < j.ltoreq.m.
In an embodiment of the present invention, the step of smoothly compressing the continuous micro-segment portion P i Pj into a spline curve satisfying the machining precision includes: acquiring node vector parameters corresponding to micro-segment instruction points on the continuous micro-segment part P i Pj; constructing an interpolation curve through 4 continuous micro-segment instruction points on the continuous micro-segment part P i Pj to calculate first-order tangent vectors corresponding to the 4 micro-segment instruction points; and compressing the continuous micro-segment part P i Pj into a first-order continuous smooth spline curve according to the micro-segment instruction points on the continuous micro-segment part P i Pj, the node vector parameters corresponding to the micro-segment instruction points and the first-order tangent vectors corresponding to the continuous 4 micro-segment instruction points on the continuous micro-segment part P i Pj.
In an embodiment of the present invention, the method for obtaining node vector parameters includes: and obtaining a node vector parameter u i corresponding to the micro-segment instruction point P i according to the chord length delta P i between two adjacent micro-segment instruction points and the vector angle P i-1PiPi+1 formed by three adjacent micro-segment instruction points.
In an embodiment of the present invention, the step of calculating the first order tangent vector corresponding to the 4 micro-segment instruction points by constructing an interpolation curve through the 4 micro-segment instruction points on the continuous micro-segment portion P i Pj includes: constructing a cubic polynomial interpolation curve Q i-2 (u) passing through 4 continuous micro-segment instruction points P i-2、Pi-1、Pi and P i+1 and a cubic polynomial interpolation curve Q i-1 (u) passing through 4 continuous micro-segment instruction points P i-1、Pi、Pi+1 and P i+2 according to the continuous micro-segment instruction points P i-2、Pi-1、Pi、Pi+1、Pi+2 and the node vector parameter values u i-2、ui-1、ui、ui+1、ui+2 corresponding to each instruction point; solving first-order tangential vectors Q' i-2(ui)、Q'i-1(ui of the two cubic polynomial interpolation curves Q i-2(u)、Qi-1 (u) at the micro-segment instruction point P i; the average value of the first-order tangential vectors Q' i-2(u)、Q'i-1 (u) at the micro-segment command point P i is used as the first-order tangential vector value T i corresponding to the micro-segment command point P i.
In one embodiment of the present invention, the step of compressing the continuous micro-segment portion P i Pj into the first-order continuous smooth spline satisfying the machining precision includes: calculating curve control points G 1 and G 2 between a starting point P i and an ending point P j of the continuous micro-segment portion to be smoothly compressed; acquiring fitted cubic Bezier curves corresponding to curve control points G 1 and G 2; and adjusting the curve control points G 1 and G 2 according to the machining error to adjust and fit the cubic Bezier curve, so as to obtain the first-order continuous smooth spline curve meeting the machining precision.
In an embodiment of the invention, the method for calculating the curve control point between the micro segment instruction points P i and P j includes: when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are coplanar, curve control points G k1 and G k2 sequentially approaching the micro-segment instruction point P k are calculated according to the least square method, wherein the micro-segment instruction point P k is a micro-segment instruction point between the micro-segment instruction points P i and P j.
In an embodiment of the invention, the method for calculating the curve control point between the micro segment instruction points P i and P j includes: when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are not coplanar, sequentially calculating the coefficient parameter alpha of the curve control point G k1 and the coefficient parameter beta of the curve control point G k2 passing through the micro-segment instruction point P k; when alpha is more than 0 and beta is less than 0, calculating curve control points G 1 and G 2 according to coefficient parameters alpha and beta; when alpha is less than or equal to 0 or beta is more than or equal to 0, j is reduced by 1, and if j is more than i+1, curve control points G 1 and G 2 are calculated according to coefficient parameters alpha and beta; if j=i+1, the control points G 1 and G 2 are directly calculated.
In an embodiment of the invention, the step of adjusting the curve control point according to the machining error includes: when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points, calculating the average values G 1 and G 2 of the obtained curve control points G k1 and G k2; calculating the deviation delta E of a fitted cubic Bezier curve taking P i、G1、G2、Pj as a control point; judging whether the deviation delta E is smaller than a preset deviation E, and when the deviation delta E is smaller than the preset deviation E, taking a fitted cubic Bezier curve with P i、G1、G2、Pj as a control point as the first-order continuous smooth spline curve meeting the machining precision; when the deviation Δe is greater than or equal to the preset deviation E, let j=j-1, and recalculate the curve control points G 1 and G 2 between P i and P j.
In an embodiment of the present invention, in the step of compressing the continuous micro-segment portion P i Pj into a first-order continuous smooth spline, when the micro-segment command points P i and P j are adjacent micro-segment command points, i.e. j=i+1, the curve control points G 1 and G 2 are directly calculated to obtain the fitted curve C t (u), and the fitted curve C t (u) is used as the target curve corresponding to the continuous micro-segment P i Pj.
In order to achieve the above object, the present invention also provides a numerical control processing device for communication signals, including: a machining program curve providing module, adapted to provide a machining program curve P 0Pn required by the numerical control machining equipment, where the machining program curve P 0Pn includes at least two micro-segment instruction points P i; A continuous micro-segment identification module adapted to identify a continuous micro-segment portion P iPj; The target machining curve module comprises a smooth compression unit, wherein the smooth compression unit is suitable for acquiring the target machining curve of the continuous micro-segment part P iPj according to a deviation range: if the continuous micro-segment part P iPj can be smoothly compressed into a spline curve meeting the processing precision, a target processing curve corresponding to the continuous micro-segment part P iPj is formed; the smooth compression unit is suitable for reducing j to k when the continuous micro-segment part P iPj cannot be compressed smoothly into a spline curve meeting the machining precision, until the continuous micro-segment part P iPk can be compressed smoothly into a spline curve meeting the machining precision, and then a sub-target machining curve corresponding to the continuous micro-segment part P iPk is obtained; The smoothing compression unit is further adapted to compress the remaining micro-segment portion P k Pj in a smoothing manner in the same manner to obtain a sub-target machining curve corresponding to the instruction point of the remaining micro-segment portion P k Pj; the target processing curve module is further suitable for sequentially connecting all the sub-target curves to obtain a target processing curve of the continuous micro-segment part P iPj; Wherein P i is any micro-segment instruction point on the processing program curve P 0Pn, i is more than or equal to k and less than or equal to j and less than or equal to m, and the points are all positive integers.
In an embodiment of the present invention, the numerical control machining apparatus machines the workpiece according to the target machining curve.
In one embodiment of the present invention, the continuous micro-segment identification module includes: the length comparison unit is adapted to compare the length between two adjacent micro-segment instruction points P n,Pn+1 on the machining program curve P 0Pm with a preset micro-segment length threshold d max, and if the length between the two adjacent micro-segment instruction points is greater than the micro-segment length threshold d max, setting the two corresponding micro-segment instruction points P n,Pn-1 as disconnection points of continuous micro-segments; the angle comparison unit is suitable for comparing a vector angle P n-1PnPn+1 formed by three adjacent micro-segment instruction points P n-1,Pn,Pn+1 with a preset angle threshold, and if the vector angle is larger than the angle threshold, setting a micro-segment instruction point P n corresponding to an intersection point of the vector angle as a disconnection point of a continuous micro-segment; and an identification unit adapted to identify a continuous micro-segment part between a start/end point and an adjacent break point or two adjacent break points as the continuous micro-segment part P iPj start point P 0 and the adjacent break point P n, the end point P m and the adjacent break point P n+1 or two adjacent break points as the continuous micro-segment part P iPj, wherein n, m is a positive integer, and n < i is less than or equal to m or n < j is less than or equal to m.
In an embodiment of the present invention, the smoothing compression unit includes: the node vector parameter component is suitable for acquiring node vector parameters corresponding to micro-segment instruction points on the continuous micro-segment part P iPj; a first order tangent vector component adapted to calculate a first order tangent vector corresponding to 4 micro-segment instruction points by constructing an interpolation curve from the 4 micro-segment instruction points on the continuous micro-segment portion P iPj; and the spline curve generating component compresses the continuous micro-segment part P iPj into a first-order continuous smooth spline curve according to the micro-segment instruction points on the continuous micro-segment part P iPj, node vector parameters corresponding to the micro-segment instruction points and first-order tangent vectors corresponding to the continuous 4 micro-segment instruction points on the continuous micro-segment part P iPj.
In an embodiment of the present invention, the node vector parameter component is adapted to calculate the node vector parameter u i corresponding to the micro-segment instruction point P i according to a chord length Δp i between two adjacent micro-segment instruction points and a vector angle P i-1PiPi+1 formed by three adjacent micro-segment instruction points.
In one embodiment of the present invention, the first order tangential component comprises: a quadratic polynomial interpolation curve part adapted to construct a cubic polynomial interpolation curve Q i-2 (u) passing through the continuous 4 micro-segment instruction points P i-2、Pi-1、Pi and P i+1 and a cubic polynomial interpolation curve Q i-1 (u) passing through the continuous 4 micro-segment instruction points P i-1、Pi、Pi+1 and P i+2, respectively, according to the continuous micro-segment instruction points P i-2、Pi-1、Pi、Pi+1、Pi+2 and the node vector parameter values u i-2、ui-1、ui、ui+1、ui+2 corresponding to each instruction point; a micro-segment instruction point first-order tangent vector component, adapted to calculate first-order tangent vectors Q' i-2(ui)、Q'i-1(ui of the two cubic polynomial interpolation curves Q i-2(u)、Qi-1 (u) at the micro-segment instruction point P i; and the first-order tangent vector average value component is suitable for taking the average value of the first-order tangent vectors Q' i-2(u)、Q'i-1 (u) at the micro-segment instruction point P i as a first-order tangent vector value T i corresponding to the micro-segment instruction point P i.
In one embodiment of the present invention, the spline curve generating component includes: a control point calculation unit adapted to calculate curve control points G 1 and G 2 between a start point P i and an end point P j of the continuous micro-segment portion to be smoothly compressed; the Bezier curve acquisition unit is suitable for acquiring fitted cubic Bezier curves corresponding to curve control points G 1 and G 2; and the processing error control part is suitable for enabling the control point calculation unit to adjust the curve control points G 1 and G 2 according to the processing error so as to adjust and fit the cubic Bezier curve, thereby obtaining the first-order continuous smooth spline curve meeting the processing precision.
In an embodiment of the present invention, the control point calculating unit includes: the first calculating unit is adapted to calculate curve control points G k1 and G k2 sequentially approaching the micro segment instruction point P k according to a least square method when the micro segment instruction points P i and P j are non-adjacent micro segment instruction points and P i、Pj、Ti、Tj are coplanar, wherein the micro segment instruction point P k is a micro segment instruction point between the micro segment instruction points P i and P j.
In an embodiment of the present invention, the curve control point calculating unit includes: the control point coefficient calculating unit is suitable for sequentially calculating coefficient parameters alpha of a curve control point G k1 and coefficient parameters beta of a curve control point G k2 passing through the micro-segment instruction point P k when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are not coplanar; a second calculation means adapted to calculate curve control points G 1 and G 2 from coefficient parameters α and β when α > 0 and β < 0; a third calculation means adapted to cause j to be self-subtracted by 1 when α is less than or equal to 0 or β is less than or equal to 0, and if j > i+1, calculate curve control points G 1 and G 2 according to coefficient parameters α and β; if j=i+1, the control points G 1 and G 2 are directly calculated.
In one embodiment of the present invention, the processing error control unit includes: the control point average value calculation unit is suitable for calculating the average values G 1 and G 2 of the obtained curve control points G k1 and G k2 when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points; the deviation calculating unit is suitable for calculating the deviation delta E of the fitted cubic Bezier curve by taking P i、G1、G2、Pj as a control point; the adjusting unit is suitable for taking the fitted cubic Bezier curve with P i、G1、G2、Pj as a control point as the first-order continuous smooth spline curve meeting the machining precision when the deviation delta E is smaller than the preset deviation E; when the deviation Δe is greater than or equal to the preset deviation E, a fourth curve control point calculating means is employed, which is adapted to let j=j-1, and recalculate the curve control points G 1 and G 2 between P i and P j.
In an embodiment of the present invention, the smoothing compression unit further includes a fifth curve control point calculating unit, where the fifth curve control point calculating unit is adapted to directly calculate the curve control point to obtain a fitted curve C t (u) when the micro-segment command points P i and P j are adjacent micro-segment command points, i.e., j=i+1, and take the fitted curve C t (u) as a target curve corresponding to the continuous micro-segment P i Pj.
As described above, the numerical control processing method and the numerical control processing apparatus of the present invention have the following advantageous effects: and the smooth processing track in the precision range can be provided.
Drawings
FIG. 1 is a flow chart of a numerical control method according to an embodiment of the present invention;
FIG. 2A is a continuous micro-segment judgment chart (one) of an embodiment of the numerical control machining method according to the present invention;
FIG. 2B is a continuous micro-segment judgment chart (II) of a numerical control machining method according to another embodiment of the invention;
FIG. 3 is a flow chart of continuous micro-segment target curve fitting in an embodiment of the numerical control machining method of the present invention;
FIG. 4A is a control point calculation diagram (one) of an embodiment of the numerical control processing method according to the present invention;
FIG. 4B is a control point calculation diagram (II) of a numerical control machining method according to another embodiment of the present invention;
FIG. 5 is a simulation result diagram of an embodiment of the numerical control machining method according to the present invention;
FIG. 6A is a workpiece processing surface without the numerical control machining method of the present invention;
FIG. 6B is a workpiece processing surface using the numerical control machining method of the present invention;
FIG. 7 is a schematic diagram of a numerical control system according to an embodiment of the present invention.
Description of element reference numerals
71. Machining program curve providing module
72. Continuous micro-segment identification module
73. Target machining curve module
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present invention by way of illustration, so that only the components related to the present invention are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, the form, number and proportion of each component in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
The numerical control processing method and the numerical control processing equipment are used for providing the micro-segment smooth compression processing method for numerical control processing, wherein the precision and the efficiency of the micro-segment smooth compression processing method can meet the production requirements.
As shown in fig. 1, the method of the present invention comprises the steps of:
Step (one), continuous micro-segment identification: and identifying the part shape of the workpiece needing smooth compression through the length of the line segment to be processed and vector angle information between the line segments.
Step (II), node vector parameterization: and parameterizing the programming points by combining the relation between the length and the angle of the continuous micro-segment part needing smooth compression, and obtaining node vector parameters corresponding to the programming points.
And (3) solving a first-order tangential vector: and solving a first-order tangent vector by adopting a four-point construction method, constructing a cubic polynomial through 4 continuous programming points, and solving the first-order tangent vector of the corresponding point.
And (4) smoothing and compressing the program segment in the precision requirement: compressing a broken line track described by a programming point into a first-order continuous smooth curve according to a continuous micro-segment programming point instruction value to be smoothly compressed and a corresponding first-order tangential vector; checking whether Euclidean distance between a programming point and a corresponding spline point (spline curve value corresponding to the node vector parameter value calculated by the programming point) meets processing precision, and adjusting control points of the spline curve to perform error control on the spline curve which does not meet the requirement.
The invention relates to a numerical control processing method of communication signals, which comprises the following steps:
Step 100, providing a machining program curve P 0Pn required by the numerical control machining equipment, wherein the machining program curve P 0Pn comprises at least two micro-segment instruction points P i and P j.
Step 200, identify a continuous micro-segment portion P i Pj.
And 300, obtaining a target processing curve of the continuous micro-segment part P i Pj according to the deviation range.
Specifically, if the continuous micro-segment portion P i Pj can be smoothly compressed into a spline curve that meets the machining precision, a target machining curve corresponding to the continuous micro-segment portion P i Pj is formed.
If the continuous micro-segment part P i Pj cannot be smoothly compressed into a spline curve meeting the processing precision, reducing j to k until the continuous micro-segment part P i Pk can be smoothly compressed into a spline curve meeting the processing precision, and obtaining a sub-target processing curve corresponding to the continuous micro-segment part P i Pk.
Step 400, smoothly compressing the remaining micro-segment portion P k Pj in the same manner to obtain the sub-target processing curve corresponding to the instruction point of the remaining micro-segment portion P kPj.
And 500, sequentially connecting all the sub-target processing curves to obtain a target processing curve of the continuous micro-segment part P i Pj.
Specifically, P i is any micro-segment instruction point on the machining program curve P 0Pn, i is greater than or equal to k and less than or equal to j and less than or equal to m, and all positive integers are obtained.
The following detailed description of the embodiments of the numerical control machining method according to the present invention will be given by way of specific examples, and it should be understood by those skilled in the art that the following embodiments are not intended to limit the scope of the present invention in any way, and are intended to be within the scope of the present invention in any other similar machining environments or by any other similar apparatus or similar methods.
In a specific embodiment, the numerical control machining device may be a numerical control lathe, a vertical machining center or a five-axis linkage machine tool, etc.
Step 100, providing a machining program curve P 0Pn required by the numerical control machining equipment, wherein the machining program curve P 0Pn comprises at least two micro-segment instruction points P i and P j.
Specifically, a processing drawing formed by drawing software is adopted. Generally, the two-dimensional pattern may be formed by CAD, and the three-dimensional pattern may be formed by Pro/E, inventor, solidworks or the like. The curve to be processed is the contour of a two-dimensional workpiece pattern or the contour of a cross-sectional pattern of a three-dimensional workpiece pattern.
The processing program curve is a curve for micro line segment differentiation of a curve of a free-form surface to be processed in a drawing by computer-aided manufacturing software according to the processing drawing. The micro-segment instruction point is a point at which the machining program curve is subdivided into micro-segment (hereinafter referred to as "micro-segment").
Step 200, identify a continuous micro-segment portion P i Pj.
Wherein, the method for identifying the continuous micro-segment part P i Pj in the step 200 includes:
Step 201 is performed: and comparing the length between two adjacent micro-segment instruction points P n,Pn+1 on the machining program curve P 0Pm with a preset micro-segment length threshold d max, and setting the corresponding two micro-segment instruction points P n,Pn-1 as disconnection points of continuous micro-segments if the length between the two adjacent micro-segment instruction points is larger than the micro-segment length threshold d max.
As shown in fig. 2A, a method of determining a continuous micro-segment will be described as an example. The lengths of the program segments P i-1Pi and P i+6Pi+7 are greater than the micro segment length d max (d max =2mm in this embodiment) set by the system, and the lengths of the program segments PiPi+1、Pi+1Pi+2、Pi+2Pi+3、Pi+ 3Pi+4、Pi+4Pi+5、Pi+5Pi+6 and P i+6Pi+7 are both smaller than the micro segment length d max. In the program segments PiPi+1、Pi+1Pi+2、Pi+2Pi+3、Pi+ 3Pi+4、Pi+4Pi+5 and P i+5Pi+6, except that the vector angle θ i+3 of the program segments P i+2Pi+3 and P i+3Pi+4 is larger than the maximum rotation angle θ max set by the system (θ max =30° in the present embodiment), all of them are smaller than θ max. At this time, the inferred program segment P iPi+1、Pi+1Pi+2、Pi+2Pi+3 is a continuous micro segment; program segment P i+3Pi+4、Pi+4Pi+5、Pi+5Pi+6 is a continuous micro-segment.
Step 202 is executed: and comparing a vector angle P n-1PnPn+1 formed by the adjacent three micro-segment instruction points P n-1,Pn,Pn+1 with a preset angle threshold, and if the vector angle is larger than the angle threshold, setting a programming point P n corresponding to the intersection point of the vector angles as a disconnection point of the continuous micro-segment.
As shown in fig. 2B, the lengths of program segments P i-1Pi and P i+6Pi+7 are greater than the system set micro-segment length d max, and the lengths of program segments PiPi+1、Pi+1Pi+2、Pi+2Pi+3、Pi+3Pi+4、Pi+4Pi+5、Pi+5Pi+6 and P i+6Pi+7 are both less than micro-segment length d max. In program segments PiPi+1、Pi+1Pi+2、Pi+2Pi+3、Pi+3Pi+4、Pi+4Pi+5 and P i+5Pi+6, except that vector angle θ i+3 of straight line segment P i+2Pi+3、Pi+3Pi+4 and vector angle θ i+4 of straight line segment P i+3Pi+4、Pi+4Pi+5 are greater than the maximum system set angle θ max, the other is less than θ max. At this time, the inferred program segment P iPi+1、Pi+1Pi+2、Pi+2Pi+3 is a continuous micro segment; program segment P i+4Pi+5、Pi+5Pi+6 is a continuous micro-segment.
Step 203 is performed: a continuous micro-segment part between a starting point P 0 and a disconnection point P n adjacent thereto, an ending point P m and a disconnection point P n+1 adjacent thereto, or between two adjacent disconnection points, is identified as the continuous micro-segment part P i Pj, wherein n, m is a positive integer, and n < i.ltoreq.m or n < j.ltoreq.m.
In CNC programs, among irregular program segments generated by CAM systems, the parts to be precisely machined often have the characteristics of large length of the program segments or sharp angle changes; the continuously and smoothly compressible portion tends to have a short length and a gentle angle change.
And identifying the continuous micro-segments in the CNC program through the length of the line segments to be processed and vector angles between the line segments. And judging whether the program segment in the CNC needs to be subjected to smooth compression processing or not through continuous micro-segment identification. The discontinuous micro-segment part is not subjected to smooth compression treatment; and carrying out smooth compression treatment on the continuous micro-segment part: the continuous micro-segment is processed into a continuous smooth path, and the processed path and the original path meet a certain deviation range.
Specifically, according to practical experience, preferably, the preset micro-segment length threshold d max is 0 mm-2 mm. The preset angle threshold is 0-30 degrees.
And 300, obtaining a target processing curve of the continuous micro-segment part P i Pj according to the deviation range.
Specifically, if the continuous micro-segment portion P i Pj can be smoothly compressed into a spline curve that meets the machining precision, a target machining curve corresponding to the continuous micro-segment portion P i Pj is formed.
If the continuous micro-segment part P i Pj cannot be smoothly compressed into a spline curve meeting the processing precision, reducing j to k until the continuous micro-segment part P i Pk can be smoothly compressed into a spline curve meeting the processing precision, and obtaining a sub-target processing curve corresponding to the continuous micro-segment part P i Pk.
Specifically, the step of smoothly compressing the continuous micro-segment portion P i Pj into a spline curve that satisfies the machining precision includes:
step 310: and acquiring node vector parameters corresponding to micro-segment instruction points on the continuous micro-segment part P i Pj.
The method for acquiring the node vector parameters comprises the following steps:
And solving a node vector parameter u i corresponding to the micro-segment instruction point P i according to the chord length delta P i between two adjacent micro-segment instruction points and the vector P i-1PiPi+1 formed by the three adjacent micro-segment instruction points.
The node vector parameter u i is calculated according to the following formula:
Wherein the method comprises the steps of
Where u i (i=1, 2, and n) is a parameter value, i Δp i i, i=1, 2, ··, n-1 is the Euclidean distance between two adjacent programming points (x i,yi,zi) and (x i+1,yi+1,zi+1), and the angle P i-1PiPi+1 is the vector angle formed by vectors P i-1Pi and P iPi+1.
Step 320 is performed: calculating a first order tangent vector corresponding to 4 micro-segment instruction points by constructing an interpolation curve through the 4 micro-segment instruction points on the continuous micro-segment part P i Pj, including:
Constructing a cubic polynomial interpolation curve Q i-2 (u) passing through 4 continuous micro-segment instruction points P i-2、Pi-1、Pi and P i+1 and a cubic polynomial interpolation curve Q i-1 (u) passing through 4 continuous micro-segment instruction points P i-1、Pi、Pi+1 and P i+2 according to the continuous micro-segment instruction points P i-2、Pi-1、Pi、Pi+1、Pi+2 and the node vector parameter values u i-2、ui-1、ui、ui+1、ui+2 corresponding to each instruction point;
solving first-order tangential vectors Q' i-2(ui)、Q'i-1(ui of the two cubic polynomial interpolation curves Q i-2(u)、Qi-1 (u) at the micro-segment instruction point P i;
The average value of the first-order tangential vectors Q' i-2(u)、Q'i-1 (u) at the micro-segment command point P i is used as the first-order tangential vector value T i corresponding to the micro-segment command point P i.
The CNC machining program has a large number of G01 instructions describing the shape of the workpiece to be machined, and the program does not contain the first-order tangential vector value of a programming point, and the first-order tangential vector of the programming point needs to be determined through the programming point and the front point and the rear point. Specifically, in this embodiment, the specific process of first-order tangent vector solving is as follows:
The programming point is P i, the front and back programming points which are continuous with the programming point are P i-2、Pi-1、Pi+1、Pi+2, the corresponding node vector parameter is u i-2、ui-1、ui、ui+1、ui+2, and two cubic polynomial interpolation curves can be constructed to pass through 4 continuous programming points P i-2、Pi-1、Pi and P i+1 and P i-1、Pi、Pi+1 and P i+2 respectively.
Qi-2(u)=ai-2+bi-2u+ci-2u2+di-2u3,u∈[ui-2,ui+1]
Qi-1(u)=ai-1+bi-1u+ci-1u2+di-1u3,u∈[ui-1,ui+2]
Solving two interpolation curves Q i-2(u)、Qi-1 (u) to obtain a first-order tangential vector Q' i-2(ui)、Q'i-1(ui at a programming point P i; specifically, the above two cubic polynomials pass through 4 consecutive programming points, and the corresponding coefficients a i-2、bi-2、ci-2、di-2 and a i-1、bi-1、ci-1、di-1 satisfy the following formulas:
Bringing the coordinate values of the programmed points P i-2、Pi-1、Pi、Pi+1 and P i+2 and the corresponding node vector parameter values u i-2、ui-1、ui、ui+1 and u i+2 into the above equation yields coefficients a i-2、bi-2、ci-2、di-2 and a i-1、bi-1、ci-1、di-1 of the cubic polynomial curves Q i-2 (u) and Q i-1 (u). The first order tangent vectors of the two third order polynomial curves at the programming point P i are respectively:
Q'i-2(ui)=bi-2+2ci-2ui+3di-2ui 2
Q'i-1(ui)=bi-1+2ci-1ui+3di-1ui 2
The average value of the first-order tangential vector Q' i-2(ui)、Q'i-1(ui) at the programming point P i is used as the first-order tangential vector value T i corresponding to the programming point P i.
In order to enable the calculated first-order tangent vector to be close to the first-order tangent vector of the program smooth compression acquisition curve, taking the average value of the first-order tangent vectors of the two cubic polynomials at the programming point P i as the first-order tangent vector of the programming point, and marking as T i, and determining according to the following formula:
the first order tangent vector of the two front and rear most programming points of the successive micro-segments is determined by the following formula:
Step 330: according to the micro-segment instruction points on the continuous micro-segment part P i Pj, the node vector parameters corresponding to the micro-segment instruction points and the first-order tangent vectors corresponding to the continuous 4 micro-segment instruction points on the continuous micro-segment part P i Pj, compressing the continuous micro-segment part P i Pj into a first-order continuous smooth cubic Bezier curve, and synthesizing a target curve by the continuous micro-segments consisting of P 1P2,P2P3,…,Pn-1Pn Wherein C t (u) is a cubic Bezier curve.
The step of compressing the continuous micro-segment portion P i Pj into the first-order continuous smooth spline satisfying the machining precision includes: compressing a continuous micro-segment composed of program segments P 1P2,P2P3,…,Pn-1Pn into a multi-segment cubic Bezier curve C t (u) meeting machining precision comprises control point calculation and machining error control, and comprises the following steps:
Step 331 is performed: curve control points G 1 and G 2 between the start point P i and the end point P j of the continuous micro-segment portion to be smoothly compressed are calculated.
The method for calculating the curve control point between the micro-segment instruction points P i and P j comprises the following steps:
When the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are coplanar, curve control points G k1 and G k2 sequentially approaching the micro-segment instruction point P k are calculated according to the least square method, wherein the micro-segment instruction point P k is a micro-segment instruction point between the micro-segment instruction points P i and P j.
For example, assuming micro-segment instruction points P i and P j, the corresponding first order tangent vectors are T i and T j, curve C t (u) is the curve segment of curve S (u) between programming points P i and P j, P k, k ε (i j) is the programming point between programming points P i and P j.
The other 2 control points G k1 and G k2 of the cubic Beizer curve through the micro segment instruction point start point P i, end point P j and intermediate point P k can be calculated as follows:
① Calculating an intersection point P d of the plane pi and a straight line passing through P k and parallel to T j;
② Calculating an intersection point P c of the straight line P i Pj and a straight line passing through P d and parallel to T i;
③ Control points G k1 and G k2 for the other 2 Beizer curves were calculated:
the method for calculating the curve control point between the micro-segment instruction points P i and P j comprises the following steps:
When the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are not coplanar, sequentially calculating the coefficient parameter alpha of the curve control point G k1 and the coefficient parameter beta of the curve control point G k2 passing through the micro-segment instruction point P k;
When alpha is more than 0 and beta is less than 0, calculating curve control points G 1 and G 2 according to coefficient parameters alpha and beta;
For example, another 2 control points of the cubic Beizer curve through the micro-segment instruction points start point P i, end point P j, and intermediate point P k may be calculated as follows:
① The uniform chord parameter u i~uj is
② Solving the unknowns alpha and beta by a least squares method according to the following formula:
(3s2tTi)α+(3t2sTj)β=Pk-(s3+3s2t)Pi-(t3+3t2s)Pj
s(s-2t)(Tk×Ti)α+t(2s-t)(Tk×Tj)β=2st(Tk×(Pi-Pj))
Wherein T k is a first order tangent vector corresponding to programming point P k, and s and T are determined according to the following formula:
③ Checking whether alpha > 0 and beta < 0, if so, calculating:
Gk1=Pi+αTi
Gk2=Pj+βTj
When alpha is less than or equal to 0 or beta is more than or equal to 0, j is reduced by 1, and if j is more than i+1, curve control points G 1 and G 2 are calculated according to coefficient parameters alpha and beta; if j=i+1, the control points G 1 and G 2 are directly calculated.
The step of adjusting the curve control point according to the machining error comprises the following steps:
When the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points, calculating the average values G 1 and G 2 of the obtained curve control points G k1 and G k2;
Wherein k i is a system number value corresponding to the starting point of the section of curve; k j is the system number value corresponding to the end point of the segment of the curve.
Calculating the deviation delta E of a fitted cubic Bezier curve taking P i、G1、G2、Pj as a control point;
judging whether the deviation delta E is smaller than a preset deviation E or not;
The deviation may be determined, for example, according to the following formula:
wherein, A programming point instruction value corresponding to u k; the function value of u k on the spline C t (u).
When the deviation delta E is smaller than a preset deviation E, fitting a cubic Bezier curve with P i、G1、G2、Pj as a control point to serve as the first-order continuous smooth spline curve meeting the machining precision;
When the deviation Δe is greater than or equal to the preset deviation E, let j=j-1, and recalculate the curve control points G 1 and G 2 between P i and P j.
For example, the method for solving the control point may be as follows:
The establishment of the quadratic equation is recorded as: aα 2 +bα +c=0 wherein:
A=16-|Ti+Tj|2
B=12(Pj-Pi)·(Ti+Tj)
C=-36|Pj-Pi|2
Obtaining parameter coefficients according to a root-finding formula:
the control point can be found:
Step 332: acquiring fitted cubic Bezier curves corresponding to curve control points G 1 and G 2;
Step 333: and adjusting the curve control points G 1 and G 2 according to the machining error to adjust and fit the cubic Bezier curve, so as to obtain the first-order continuous smooth spline curve meeting the machining precision.
Step 400, smoothly compressing the remaining micro-segment portion P k Pj in the same manner to obtain the sub-target processing curve corresponding to the instruction point of the remaining micro-segment portion P kPj.
Specifically, the remaining micro-segment portion P k Pj is smoothly compressed in a manner of repeating the step 300, so as to obtain a sub-target machining curve corresponding to the instruction point of the remaining micro-segment portion P k Pj.
Specifically, if the continuous micro-segment part P k Pj can be smoothly compressed into a spline curve meeting the machining precision, a target machining curve corresponding to the continuous micro-segment part P k Pj is formed;
If the continuous micro-segment part P k Pj cannot be smoothly compressed into a spline curve meeting the machining precision, reducing j to f until the continuous micro-segment part P k Pf can be smoothly compressed into a spline curve meeting the machining precision, and obtaining a sub-target machining curve corresponding to the continuous micro-segment part P k Pf;
and smoothly compressing the residual micro-segment part P f Pj in the same way to obtain a sub-target processing curve corresponding to the instruction point of the residual micro-segment part P f Pj.
And 500, sequentially connecting all the sub-target processing curves to obtain a target processing curve of the continuous micro-segment part P iPj.
Specifically, P i is any micro-segment instruction point on the machining program curve P 0Pn, i is greater than or equal to k and less than or equal to j and less than or equal to m, and all positive integers are obtained.
In the step of compressing the continuous micro-segment portion P i Pj into a first-order continuous smooth spline, when the micro-segment command points P i and P j are adjacent micro-segment command points, i.e., j=i+1, the curve control points G 1 and G 2 are directly calculated to obtain a fitted curve C t (u), and the fitted curve C t (u) is used as a target curve corresponding to the continuous micro-segment P i Pj.
The method comprises the following steps:
Step (one), continuous micro-segment identification: and identifying the part shape of the workpiece needing smooth compression through the length of the line segment to be processed and vector angle information between the line segments.
Step (II), node vector parameterization: and parameterizing the programming points by combining the relation between the length and the angle of the continuous micro-segment part needing smooth compression, and obtaining node vector parameters corresponding to the programming points.
And (3) solving a first-order tangential vector: and solving a first-order tangent vector by adopting a four-point construction method, constructing a cubic polynomial through 4 continuous programming points, and solving the first-order tangent vector of the corresponding point.
And (4) smoothing and compressing the program segment in the precision requirement: compressing a broken line track described by a programming point into a first-order continuous smooth curve according to a continuous micro-segment programming point instruction value to be smoothly compressed and a corresponding first-order tangential vector; checking whether Euclidean distance between a programming point and a corresponding spline point (spline curve value corresponding to the node vector parameter value calculated by the programming point) meets processing precision, and adjusting control points of the spline curve to perform error control on the spline curve which does not meet the requirement.
In the step (one) of the method, the specific process of continuous micro-segment identification is as follows:
successive micro-segment portions P i Pj are identified.
And obtaining a target processing curve from the continuous micro-segment part P i Pj according to the deviation range:
If the continuous micro-segment part P i Pj can be smoothly compressed into a spline curve meeting the processing precision, the target processing curve corresponding to the continuous micro-segment part P i Pj is formed.
If the continuous micro-segment part P i Pj cannot be smoothly compressed into a spline curve meeting the processing precision, reducing j to k until the continuous micro-segment part P i Pk can be smoothly compressed into a spline curve meeting the processing precision, and obtaining a sub-target processing curve corresponding to the continuous micro-segment part P i Pk.
In the step (II) of the method, the specific process of node vector parameterization is as follows:
Successive micro-segments of P 1P2,P2P3,…,Pn-1Pn are fitted to a target curve S (u) consisting of a plurality of segments of cubic Beizer curve C t (u), C t (u) being a segment of cubic Beizer curve of the target curve S (u) between the programmed points P i and P j. The programming points P i (i.e., micro-segment instruction points) need to be parameterized, and the node vector parameter value u i corresponding to each programming point P i is obtained according to the length relation and the angle relation between the programming points, and parameterized according to the following formula:
As shown in fig. 3, in the step (four) of the present invention, a specific process of obtaining the cubic Bezier curve C t (u) according to the deviation range is as follows:
① Reading in continuous micro-segments P i (i is more than or equal to 1 and less than or equal to n) and corresponding first-order tangential vectors T i (i is more than or equal to 1 and less than or equal to n);
② Let i=1, j=n;
③ Judging whether j=i+1, namely judging whether P i、Pj is two adjacent points (namely adjacent micro-segment instruction points), if j is larger than i+1, namely P i、Pj is not an adjacent programming point (namely non-adjacent micro-segment instruction points), entering the following steps:
④ It is determined whether P i、Pj、Ti、Tj is coplanar. If the two points are coplanar, calculating curve control points G k1 and G k2 which sequentially approach P k (i < k < j) according to a least square method; if not, the following steps are entered:
⑤ Sequentially calculating coefficient parameters alpha and beta of curve control points G k1 and G k2 of the approaching point P k (i is less than k is less than j), and if the conditions of alpha > 0 and beta is less than 0 are not met, letting j=j-1, and returning to the step ④; otherwise, the following steps are entered:
⑥ Calculating average values G 1 and G 2 of control points G k1 and G k2, and if deviation requirement E is met, replacing a straight line segment between P i、Pj by a cubic Beizer curve with P i、G1、G2 and P j being 4 control points; let i=j, j=n, return to step ④; otherwise, let j=j-1, return to step ③.
The specific process of the control point calculation in the step (four) is as follows:
1. If j=i+1, directly fitting a spline curve, and solving the control point is as follows:
The establishment of the quadratic equation is recorded as: aα 2 +bα +c=0 wherein:
A=16-|Ti+Tj|2
B=12(Pj-Pi)·(Ti+Tj)
C=-36|Pj-Pi|2
Obtaining parameter coefficients according to a root-finding formula:
the control point can be found:
2. If j > i+1:
Assuming programming points P i and P j, the corresponding first order tangent vectors are T i and T j, curve C t (u) is the curve segment of curve S (u) between programming points P i and P j, P k, k ε (i j) is the programming point between programming points P i and P j.
The specific process of calculating the other 2 control points of the cubic Beizer curve through or approaching the programmed point start point P i, end point P j, and intermediate programmed points P k, k ε (i j) is as follows:
1) T j is in the plane pi defined by P i、Pj、Ti
As shown in fig. 4A, the solving process is as follows:
a) Calculating an intersection point P d of the plane pi and a straight line passing through P k and parallel to T j;
b) Calculating an intersection point P c of the straight line P i Pj and a straight line passing through P d and parallel to T i;
c) Control points G k1 and G k2 for the other 2 Beizer curves were calculated:
2) T j is not in the plane pi defined by P i、Pj、Ti
As shown in fig. 4B, the solving process is as follows:
a) The uniform chord parameter u i~uj is
B) Solving the unknowns alpha and beta by a least squares method according to the following formula:
(3s2tTi)α+(3t2sTj)β=Pk-(s3+3s2t)Pi-(t3+3t2s)Pj
s(s-2t)(Tk×Ti)α+t(2s-t)(Tk×Tj)β=2st(Tk×(Pi-Pj))
Wherein T k is a first order tangent vector corresponding to programming point P k, and s and T are determined according to the following formula:
c) Checking whether alpha > 0 and beta < 0, if so, calculating
Gk1=Pi+αTi
Gk2=Pj+βTj
If not, let j decrease by 1, return to step ③ to recalculate the curve control point.
In the step (four) of the invention, if j is more than i+1, whether the machining error meets the requirement is further judged. The specific process of processing error calculation is as follows:
Based on the control points G k1 and G k2 obtained above, the average value is calculated according to the following formula
Wherein k i is a system number value corresponding to the starting point of the section of curve; k j is the system number value corresponding to the end point of the segment of the curve.
The candidate cubic Bezier curve C t (u) is defined by the control points P i、G1、G2 and P j. The deviation calculation of the fitted curve is determined according to the following formula:
wherein, A system instruction value corresponding to u k; The spline curve corresponding to uk on the spline curve C t (u).
If the deviation is within the preset range E, replacing a straight line segment between P i、Pj by a cubic Bezier curve C t (u) defined by the control points P i、G1、G2 and P j; if the requirement is not satisfied, let j=j-1, return to step ③ to recalculate the curve control point.
In the step (four) of the invention, the smooth compression program section in the precision requirement range is as follows: fitting the continuous micro-segment formed by P 1P2,P2P3,…,Pn-1Pn into a target curve S (u) formed by a plurality of sections of cubic Beizer curves C t (u) according to a command value P i, a node vector parameter value u i and a first-order tangent vector value T i corresponding to a programming point of the continuous micro-segment, wherein C t (u) is a section of cubic Beizer curve of the target curve S (u) between programming points P i and P j, and smoothly compressing the continuous micro-segment between the programming points P i and P j into a curve C t (u) comprises the following steps:
Step four, calculating curve control points G 1 and G 2 between programming points P i and P j to obtain a fitted curve;
And step (IV) performing machining error control according to the curve control points G 1 and G 2 to adjust the fitting curve.
Wherein in step (four), the calculating the curve control points between the programming points P i and P j to obtain the fitted curve comprises the steps of:
step four, judging whether the programming points P i and P j are non-adjacent programming points;
Step (four two) if the programming points P i and P j are non-adjacent programming points, the programming point P k is the programming point between the programming points P i and P j, and whether P i、Pj、Ti、Tj is coplanar is determined, if so, curve control points G k1 and G k2 approaching the programming point P k are calculated according to the least square method.
For example, assuming programming points P i and P j, the corresponding first order tangent vectors are T i and T j, curve C t (u) is the curve segment of curve S (u) between programming points P i and P j, P k, k ε (i j) is the programming point between programming points P i and P j.
The other 2 control points G k1 and G k2 of the cubic Beizer curve through the programming point start point P i, end point P j and intermediate programming point P k can be calculated as follows:
① Calculating an intersection point P d of the plane pi and a straight line passing through P k and parallel to T j;
② Calculating an intersection point P c of the straight line P i Pj and a straight line passing through P d and parallel to T i;
③ Control points G k1 and G k2 for the other 2 Beizer curves were calculated:
Wherein, in step (four two), if P i、Pj、Ti、Tj is not coplanar, coefficient parameters α and β of curve control points G k1 and G k2 approximating programming points P k, k ε (i j) are sequentially calculated.
For example, another 2 control points of the cubic Beizer curve through the programming point start point P i, end point P j, and intermediate programming point P k can be calculated as follows:
① The uniform chord parameter u i~uj is
② Solving the unknowns alpha and beta by a least squares method according to the following formula:
(3s2tTi)α+(3t2sTj)β=Pk-(s3+3s2t)Pi-(t3+3t2s)Pj
s(s-2t)(Tk×Ti)α+t(2s-t)(Tk×Tj)β=2st(Tk×(Pi-Pj))
Wherein T k is a first order tangent vector corresponding to programming point P k, and s and T are determined according to the following formula:
③ Checking whether alpha > 0 and beta < 0, if so, calculating:
Gk1=Pi+αTi
Gk2=Pj+βTj
if not, let j decrease by 1, return to step (four one) to recalculate the curve control point.
In the step (four two), the process error control according to the curve control point is performed under the condition that the programming points P i and P j are non-adjacent programming points, and the method comprises the following steps:
Step (four two one) of calculating the average values G 1 and G 2 of the obtained curve control points G k1 and G k2;
step (four two) of calculating the deviation delta E of a fitting curve C i (u) taking P i、G1、G2、Pj as a control point;
And step (IV, III) judging whether the deviation delta E is smaller than the preset deviation E, if yes, taking a fitting curve C i (u) taking P i、G1、G2、Pj as a control point as a target curve between programming points P i and P j.
In step (four by one), the average values G 1 and G 2 can be obtained, for example, according to the following formula:
Wherein k i is a system number value corresponding to the starting point of the section of curve; k j is the system number value corresponding to the end point of the segment of the curve.
In step (four by two), the deviation can be determined, for example, according to the following formula:
wherein, A programming point instruction value corresponding to u k; the function value of u k on the spline C t (u).
In the step (four two three), if the result of determining whether the deviation Δe is smaller than the preset deviation E is no, let j=j-1, and return to the step (four one) to recalculate the curve control point.
In step (four, if the programming points P i and P j are adjacent programming points, the curve control points are directly calculated to obtain the fitted curve C t (u), and the fitted curve C t (u) is used as the target curve between the programming points P i and P j.
For example, the method for solving the control point may be as follows:
The establishment of the quadratic equation is recorded as: aα 2 +bα +c=0 wherein:
A=16-|Ti+Tj|2
B=12(Pj-Pi)·(Ti+Tj)
C=-36|Pj-Pi|2
Obtaining parameter coefficients according to a root-finding formula:
the control point can be found:
fig. 5 shows the simulation effect of the method according to the invention, as shown in fig. 5, the path curve obtained according to the method according to the invention is smoother compared to the original machining path.
In order to further verify the effect of the inventive method in actual numerical control machining, the inventive method was applied to the processing of program segments in numerical control machining, and the machining results for the use of the inventive method and the machining results for the non-use of the inventive method are shown in fig. 6A and 6B.
As can be seen from a comparison of fig. 6A and 6B, the machined surface obtained using the method of the present invention is almost free from asperities and is significantly smoother.
The method has the following beneficial effects and advantages:
1. high efficiency: the algorithm is integrated in the machine tool, so that the time consumed by providing smaller tolerance data by CAM software is avoided, and the efficiency of generating the whole component is improved;
2. Accuracy: the algorithm can restore the design prototype of the workpiece in the CAM software on line according to the point information provided by the CAM software;
3. Stability: the algorithm disclosed by the invention fits a large number of micro-segments into the curve, and effectively reduces the vibration of the machine tool through curve interpolation, so that the stability of the machine tool is improved.
While this invention has been described in terms of preferred embodiments, there are alterations, permutations, and various substitute equivalents, which fall within the scope of this invention. It should also be noted that there are a variety of alternative ways of implementing the methods and systems of the present invention. It is therefore intended that the following appended claims be interpreted as including all such alterations, permutations, and various substitute equivalents as fall within the true spirit and scope of the present invention.
As shown in fig. 7, in an embodiment, the inventive communication signal digital control processing system includes a processing program curve providing module 71, a continuous micro-segment identifying module 72, and a target processing curve module 73.
The machining program curve providing module 71 is adapted to provide a machining program curve P 0Pn required by the numerical control machining device, and the machining program curve P 0Pn includes at least two micro-segment instruction points P i.
The continuous micro-segment identification module 72 is adapted to identify the continuous micro-segment portion P iPj.
The target machining curve module 73 includes a smoothing compression unit adapted to obtain a target machining curve for the continuous micro-segment portion P iPj within a deviation range: if the continuous micro-segment part P iPj can be smoothly compressed into a spline curve meeting the processing precision, a target processing curve corresponding to the continuous micro-segment part P iPj is formed; the smooth compression unit is suitable for reducing j to k when the continuous micro-segment part P iPj cannot be compressed smoothly into a spline curve meeting the machining precision, until the continuous micro-segment part P iPk can be compressed smoothly into a spline curve meeting the machining precision, and then a sub-target machining curve corresponding to the continuous micro-segment part P iPk is obtained; the smoothing compression unit is further adapted to smooth compress the remaining micro-segment portion P kPj in the same manner to obtain a sub-target machining curve corresponding to the instruction point of the remaining micro-segment portion P k Pj.
The target machining curve module 73 is further adapted to sequentially connect all sub-target curves to obtain a target machining curve of the continuous micro-segment portion P iPj.
Wherein P i is any micro-segment instruction point on the processing program curve P 0Pn, i is more than or equal to k and less than or equal to j and less than or equal to m, and the points are all positive integers.
Specifically, the numerical control machining device machines the workpiece according to the target machining curve.
The continuous micro-segment identification module 72 includes: the length comparison unit is adapted to compare the length between two adjacent micro-segment instruction points P n,Pn+1 on the machining program curve P 0Pm with a preset micro-segment length threshold d max, and if the length between the two adjacent micro-segment instruction points is greater than the micro-segment length threshold d max, setting the two corresponding micro-segment instruction points P n,Pn-1 as disconnection points of continuous micro-segments;
The angle comparison unit is suitable for comparing a vector angle P n-1PnPn+1 formed by three adjacent micro-segment instruction points P n-1,Pn,Pn+1 with a preset angle threshold, and if the vector angle is larger than the angle threshold, setting a micro-segment instruction point P n corresponding to an intersection point of the vector angle as a disconnection point of a continuous micro-segment;
And an identification unit adapted to identify a continuous micro-segment part between a start/end point and an adjacent break point or two adjacent break points as the continuous micro-segment part P iPj start point P 0 and the adjacent break point P n, the end point P m and the adjacent break point P n+1 or two adjacent break points as the continuous micro-segment part P i Pj, wherein n, m is a positive integer, and n < i is less than or equal to m or n < j is less than or equal to m.
Specifically, the smoothing compression unit includes: the node vector parameter component is suitable for acquiring node vector parameters corresponding to micro-segment instruction points on the continuous micro-segment part P i Pj; a first order tangent vector component adapted to calculate a first order tangent vector corresponding to 4 micro-segment instruction points by constructing an interpolation curve from the 4 micro-segment instruction points on the continuous micro-segment portion P i Pj; and the spline curve generating component compresses the continuous micro-segment part P i Pj into a first-order continuous smooth spline curve according to the micro-segment instruction points on the continuous micro-segment part P i Pj, node vector parameters corresponding to the micro-segment instruction points and first-order tangent vectors corresponding to the continuous 4 micro-segment instruction points on the continuous micro-segment part P i Pj.
Specifically, the node vector parameter component is adapted to calculate the node vector parameter u i corresponding to the micro-segment instruction point P i according to the chord length Δp i between two adjacent micro-segment instruction points and the vector angle P i-1PiPi+1 formed by three adjacent micro-segment instruction points.
Specifically, the first order tangential component comprises: a quadratic polynomial interpolation curve part adapted to construct a cubic polynomial interpolation curve Q i-2 (u) passing through the continuous 4 micro-segment instruction points P i-2、Pi-1、Pi and P i+1 and a cubic polynomial interpolation curve Q i-1 (u) passing through the continuous 4 micro-segment instruction points P i-1、Pi、Pi+1 and P i+2, respectively, according to the continuous micro-segment instruction points P i-2、Pi-1、Pi、Pi+1、Pi+2 and the node vector parameter values u i-2、ui-1、ui、ui+1、ui+2 corresponding to each instruction point; a micro-segment instruction point first-order tangent vector component, adapted to calculate first-order tangent vectors Q' i-2(ui)、Q'i-1(ui of the two cubic polynomial interpolation curves Q i-2(u)、Qi-1 (u) at the micro-segment instruction point P i; and the first-order tangent vector average value component is suitable for taking the average value of the first-order tangent vectors Q' i-2(u)、Q'i-1 (u) at the micro-segment instruction point P i as a first-order tangent vector value T i corresponding to the micro-segment instruction point P i.
Specifically, the spline curve generation component includes: a control point calculation unit adapted to calculate curve control points G 1 and G 2 between a start point P i and an end point P j of the continuous micro-segment portion to be smoothly compressed; the Bezier curve acquisition unit is suitable for acquiring fitted cubic Bezier curves corresponding to curve control points G 1 and G 2; and the processing error control part is suitable for enabling the control point calculation unit to adjust the curve control points G 1 and G 2 according to the processing error so as to adjust and fit the cubic Bezier curve, thereby obtaining the first-order continuous smooth spline curve meeting the processing precision.
The control point calculation unit includes: the first calculating unit is adapted to calculate curve control points G k1 and G k2 sequentially approaching the micro segment instruction point P k according to a least square method when the micro segment instruction points P i and P j are non-adjacent micro segment instruction points and P i、Pj、Ti、Tj are coplanar, wherein the micro segment instruction point P k is a micro segment instruction point between the micro segment instruction points P i and P j.
The curve control point calculation unit includes: the control point coefficient calculating unit is suitable for sequentially calculating coefficient parameters alpha of a curve control point G k1 and coefficient parameters beta of a curve control point G k2 passing through the micro-segment instruction point P k when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are not coplanar; a second calculation means adapted to calculate curve control points G 1 and G 2 from coefficient parameters α and β when α >0 and β < 0; a third calculation means adapted to cause j to be self-subtracted by 1 when α is less than or equal to 0 or β is less than or equal to 0, and if j > i+1, calculate curve control points G 1 and G 2 according to coefficient parameters α and β; if j=i+1, the control points G 1 and G 2 are directly calculated.
The processing error control means includes: the control point average value calculation unit is suitable for calculating the average values G 1 and G 2 of the obtained curve control points G k1 and G k2 when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points; the deviation calculating unit is suitable for calculating the deviation delta E of the fitted cubic Bezier curve by taking P i、G1、G2、Pj as a control point; the adjusting unit is suitable for taking the fitted cubic Bezier curve with P i、G1、G2、Pj as a control point as the first-order continuous smooth spline curve meeting the machining precision when the deviation delta E is smaller than the preset deviation E; when the deviation Δe is greater than or equal to the preset deviation E, a fourth curve control point calculating means is employed, which is adapted to let j=j-1, and recalculate the curve control points G 1 and G 2 between P i and P j.
The smooth compression unit further comprises a fifth curve control point calculating unit, wherein the fifth curve control point calculating unit is suitable for directly calculating curve control points to obtain a fitting curve C t (u) when the micro-segment command points P i and P j are adjacent micro-segment command points, namely j=i+1, and taking the fitting curve C t (u) as a target curve corresponding to the continuous micro-segment P i Pj.
It should be noted that, the structures and principles of the processing program curve providing module 71, the continuous micro-segment identifying module 72 and the target processing curve module 73 are in one-to-one correspondence with the steps in the above-mentioned numerical control processing method of the communication signals, so that the description thereof will not be repeated here.
It should be noted that, it should be understood that the division of the modules of the above system is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a form of calling software by a processing element, and the method can be realized in a form of hardware by a part of modules. For example, the x module may be a processing element that is set up separately, may be implemented in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the function of the x module may be called and executed by a processing element of the apparatus. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
For example, the modules above may be one or more integrated circuits configured to implement the methods above, such as: one or more Application SPECIFIC INTEGRATED Circuits (ASIC), or one or more microprocessors (Micro Processor Uint MPU), or one or more field programmable gate arrays (Field Programmable GATE ARRAY FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
In an embodiment of the present invention, the present invention further includes a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements any of the above-mentioned communication signal numerical control processing methods.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by computer program related hardware. The aforementioned computer program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
In summary, the numerical control processing method and the numerical control processing device of the invention are used for providing the micro-segment smooth compression processing method for numerical control processing, which can meet the production requirements in precision and efficiency. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.

Claims (22)

1. The numerical control machining method is characterized by comprising the following steps of:
Providing a machining program curve P 0 Pn required by numerical control machining equipment, wherein the machining program curve P 0 Pn comprises at least two micro-segment instruction points P i and P j;
identifying a continuous micro-segment portion P i Pj;
And obtaining a target processing curve from the continuous micro-segment part P i Pj according to the deviation range:
If the continuous micro-segment part P i Pj can be smoothly compressed into a spline curve meeting the processing precision, a target processing curve corresponding to the continuous micro-segment part P i Pj is formed;
If the continuous micro-segment part P i Pj cannot be smoothly compressed into a spline curve meeting the machining precision, reducing j to k until the continuous micro-segment part P i Pk can be smoothly compressed into a spline curve meeting the machining precision, and obtaining a sub-target machining curve corresponding to the continuous micro-segment part P i Pk;
Smoothly compressing the remaining micro-segment part P k Pj in the same way to obtain a sub-target processing curve corresponding to the instruction point of the remaining micro-segment part P k Pj;
Sequentially connecting all the sub-target processing curves to obtain a target processing curve of the continuous micro-segment part P i Pj;
Wherein P i is any micro-segment instruction point on the processing program curve P 0 Pn, i is more than or equal to k and less than or equal to j and less than or equal to m, and the points are all positive integers.
2. The numerical control machining method according to claim 1, wherein after the target machining curve of the continuous micro-segment portion P i Pj is obtained, the numerical control machining apparatus machines a workpiece in accordance with the target machining curve.
3. The numerical control machining method according to claim 1, characterized in that the method of identifying the continuous micro-segment portion P i Pj includes:
Comparing the length between two adjacent micro-segment instruction points P n,Pn+1 on the machining program curve P 0 Pm with a preset micro-segment length threshold d max, and setting the corresponding two micro-segment instruction points P n,Pn-1 as disconnection points of continuous micro-segments if the length between the two adjacent micro-segment instruction points is larger than the micro-segment length threshold d max;
Comparing a vector angle P n-1PnPn+1 formed by three adjacent micro-segment instruction points P n-1,Pn,Pn+1 with a preset angle threshold, and if the vector angle is larger than the angle threshold, setting a programming point P n corresponding to an intersection point of the vector angles as a disconnection point of the continuous micro-segment;
A continuous micro-segment part between a starting point P 0 and a disconnection point P n adjacent thereto, an ending point P m and a disconnection point P n+1 adjacent thereto, or between two adjacent disconnection points, is identified as the continuous micro-segment part P i Pj, wherein n, m is a positive integer, and n < i.ltoreq.m or n < j.ltoreq.m.
4. The numerical control machining method according to claim 1, characterized in that the step of smoothly compressing the continuous micro-segment portion P i Pj into a spline curve satisfying machining accuracy includes:
Acquiring node vector parameters corresponding to micro-segment instruction points on the continuous micro-segment part P i Pj;
Constructing an interpolation curve through 4 continuous micro-segment instruction points on the continuous micro-segment part P i Pj to calculate first-order tangent vectors corresponding to the 4 micro-segment instruction points;
And compressing the continuous micro-segment part P i Pj into a first-order continuous smooth spline curve according to the micro-segment instruction points on the continuous micro-segment part P i Pj, the node vector parameters corresponding to the micro-segment instruction points and the first-order tangent vectors corresponding to the continuous 4 micro-segment instruction points on the continuous micro-segment part P i Pj.
5. The numerical control machining method according to claim 4, wherein the method of obtaining the node vector parameters includes:
According to the vector angle formed by the chord length delta P i between two adjacent micro-segment instruction points and three adjacent micro-segment instruction points
And calculating a node vector parameter u i corresponding to the micro-segment instruction point P i by using the angle P i-1PiPi+1.
6. The numerical control machining method according to claim 4, wherein the step of calculating the first order tangent vectors corresponding to the 4 micro-segment instruction points by constructing an interpolation curve from the 4 micro-segment instruction points on the continuous micro-segment portion P i Pj includes:
Constructing a cubic polynomial interpolation curve Q i-2 (u) passing through 4 continuous micro-segment instruction points P i-2、Pi-1、Pi and P i+1 and a cubic polynomial interpolation curve Q i-1 (u) passing through 4 continuous micro-segment instruction points P i-1、Pi、Pi+1 and P i+2 according to the continuous micro-segment instruction points P i-2、Pi-1、Pi、Pi+1、Pi+2 and the node vector parameter values u i-2、ui-1、ui、ui+1、ui+2 corresponding to each instruction point;
solving first-order tangential vectors Q' i-2(ui)、Q'i-1(ui of the two cubic polynomial interpolation curves Q i-2(u)、Qi-1 (u) at the micro-segment instruction point P i;
The average value of the first-order tangential vectors Q' i-2(u)、Q'i-1 (u) at the micro-segment command point P i is used as the first-order tangential vector value T i corresponding to the micro-segment command point P i.
7. The numerical control machining method according to claim 4, characterized in that the step of compressing the continuous micro-segment portion P i Pj into the first-order continuous smooth spline satisfying machining accuracy includes:
Calculating curve control points G 1 and G 2 between a starting point P i and an ending point P j of the continuous micro-segment portion to be smoothly compressed;
Acquiring fitted cubic Bezier curves corresponding to curve control points G 1 and G 2;
And adjusting the curve control points G 1 and G 2 according to the machining error to adjust and fit the cubic Bezier curve, so as to obtain the first-order continuous smooth spline curve meeting the machining precision.
8. The method of claim 7, wherein the calculating curve control points between the micro-segment command points P i and P j comprises:
When the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are coplanar, curve control points G k1 and G k2 sequentially approaching the micro-segment instruction point P k are calculated according to the least square method, wherein the micro-segment instruction point P k is a micro-segment instruction point between the micro-segment instruction points P i and P j.
9. The method of claim 7, wherein the calculating curve control points between the micro-segment command points P i and P j comprises:
When the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are not coplanar, sequentially calculating the coefficient parameter alpha of the curve control point G k1 and the coefficient parameter beta of the curve control point G k2 passing through the micro-segment instruction point P k;
When alpha is more than 0 and beta is less than 0, calculating curve control points G 1 and G 2 according to coefficient parameters alpha and beta;
When alpha is less than or equal to 0 or beta is more than or equal to 0, j is reduced by 1, and if j is more than i+1, curve control points G 1 and G 2 are calculated according to coefficient parameters alpha and beta; if j=i+1, the control points G 1 and G 2 are directly calculated.
10. The method of numerical control machining according to claim 7, wherein the step of adjusting the curve control point according to the machining error includes:
When the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points, calculating the average values G 1 and G 2 of the obtained curve control points G k1 and G k2;
Calculating the deviation delta E of a fitted cubic Bezier curve taking P i、G1、G2、Pj as a control point;
judging whether the deviation delta E is smaller than a preset deviation E,
When the deviation delta E is smaller than a preset deviation E, fitting a cubic Bezier curve with P i、G1、G2、Pj as a control point to serve as the first-order continuous smooth spline curve meeting the machining precision;
When the deviation Δe is greater than or equal to the preset deviation E, let j=j-1, and recalculate the curve control points G 1 and G 2 between P i and P j.
11. The numerical control machining method according to claim 1, wherein in the step of compressing the continuous micro-segment portion P i Pj into a first-order continuous smooth spline, when the micro-segment command points P i and P j are adjacent micro-segment command points, i.e., j=i+1, curve control points G 1 and G 2 are directly calculated to obtain a fitted curve Ct (u), and the fitted curve Ct (u) is taken as a target curve corresponding to the continuous micro-segment P i Pj.
12. A numerical control machining apparatus, characterized by comprising:
a machining program curve providing module, adapted to provide a machining program curve P 0 Pn required by the numerical control machining equipment, where the machining program curve P 0 Pn includes at least two micro-segment instruction points P i;
A continuous micro-segment identification module adapted to identify a continuous micro-segment portion P iPj;
The target machining curve module comprises a smooth compression unit, wherein the smooth compression unit is suitable for acquiring the target machining curve of the continuous micro-segment part P iPj according to a deviation range: if the continuous micro-segment part P iPj can be smoothly compressed into a spline curve meeting the processing precision, a target processing curve corresponding to the continuous micro-segment part P iPj is formed;
the smooth compression unit is suitable for reducing j to k when the continuous micro-segment part P iPj cannot be compressed smoothly into a spline curve meeting the machining precision, until the continuous micro-segment part P iPk can be compressed smoothly into a spline curve meeting the machining precision, and then a sub-target machining curve corresponding to the continuous micro-segment part P iPk is obtained;
The smoothing compression unit is further adapted to compress the remaining micro-segment portion P k Pj in a smoothing manner in the same manner to obtain a sub-target machining curve corresponding to the instruction point of the remaining micro-segment portion P k Pj;
the target processing curve module is further suitable for sequentially connecting all the sub-target curves to obtain a target processing curve of the continuous micro-segment part P iPj;
Wherein P i is any micro-segment instruction point on the processing program curve P 0 Pn, i is more than or equal to k and less than or equal to j and less than or equal to m, and the points are all positive integers.
13. The numerical control machining apparatus according to claim 12, characterized in that the numerical control machining apparatus machines a workpiece in accordance with the target machining curve.
14. The numerical control machine of claim 12, wherein the continuous micro-segment identification module includes:
The length comparison unit is adapted to compare the length between two adjacent micro-segment instruction points P n,Pn+1 on the machining program curve P 0 Pm with a preset micro-segment length threshold d max, and if the length between the two adjacent micro-segment instruction points is greater than the micro-segment length threshold d max, setting the two corresponding micro-segment instruction points P n,Pn-1 as disconnection points of continuous micro-segments;
The angle comparison unit is suitable for comparing a vector angle P n-1PnPn+1 formed by three adjacent micro-segment instruction points P n-1,Pn,Pn+1 with a preset angle threshold, and if the vector angle is larger than the angle threshold, setting a micro-segment instruction point P n corresponding to an intersection point of the vector angle as a disconnection point of a continuous micro-segment;
And an identification unit adapted to identify a continuous micro-segment part between a start/end point and an adjacent break point or two adjacent break points as the continuous micro-segment part P i Pj start point P 0 and the adjacent break point P n, the end point P m and the adjacent break point P n+1 or two adjacent break points as the continuous micro-segment part P i Pj, wherein n, m is a positive integer, and n < i is less than or equal to m or n < j is less than or equal to m.
15. The numerical control machine of claim 12, wherein the smoothing compression unit includes:
The node vector parameter component is suitable for acquiring node vector parameters corresponding to micro-segment instruction points on the continuous micro-segment part P i Pj;
A first order tangent vector component adapted to calculate a first order tangent vector corresponding to 4 micro-segment instruction points by constructing an interpolation curve from the 4 micro-segment instruction points on the continuous micro-segment portion P i Pj;
And the spline curve generating component compresses the continuous micro-segment part P i Pj into a first-order continuous smooth spline curve according to the micro-segment instruction points on the continuous micro-segment part P i Pj, node vector parameters corresponding to the micro-segment instruction points and first-order tangent vectors corresponding to the continuous 4 micro-segment instruction points on the continuous micro-segment part P i Pj.
16. The numerical control machining device according to claim 15, wherein the node vector parameter component is adapted to calculate the node vector parameter u i corresponding to the micro-segment instruction point P i based on the chord length Δp i between two adjacent micro-segment instruction points and the vector angle P i-1PiPi+1 formed by three adjacent micro-segment instruction points.
17. The numerical control machine of claim 15, wherein the first order tangential component comprises:
A quadratic polynomial interpolation curve part adapted to construct a cubic polynomial interpolation curve Q i-2 (u) passing through the continuous 4 micro-segment instruction points P i-2、Pi-1、Pi and P i+1 and a cubic polynomial interpolation curve Q i-1 (u) passing through the continuous 4 micro-segment instruction points P i-1、Pi、Pi+1 and P i+2, respectively, according to the continuous micro-segment instruction points P i-2、Pi-1、Pi、Pi+1、Pi+2 and the node vector parameter values u i-2、ui-1、ui、ui+1、ui+2 corresponding to each instruction point;
A micro-segment instruction point first-order tangent vector component, adapted to calculate first-order tangent vectors Q' i-2(ui)、Q'i-1(ui of the two cubic polynomial interpolation curves Q i-2(u)、Qi-1 (u) at the micro-segment instruction point P i;
And the first-order tangent vector average value component is suitable for taking the average value of the first-order tangent vectors Q' i-2(u)、Q'i-1 (u) at the micro-segment instruction point P i as a first-order tangent vector value T i corresponding to the micro-segment instruction point P i.
18. The numerical control machining apparatus according to claim 15, wherein the spline curve generating component includes:
A control point calculation unit adapted to calculate curve control points G 1 and G 2 between a start point P i and an end point P j of the continuous micro-segment portion to be smoothly compressed;
The Bezier curve acquisition unit is suitable for acquiring fitted cubic Bezier curves corresponding to curve control points G 1 and G 2;
And the processing error control part is suitable for enabling the control point calculation unit to adjust the curve control points G 1 and G 2 according to the processing error so as to adjust and fit the cubic Bezier curve, thereby obtaining the first-order continuous smooth spline curve meeting the processing precision.
19. The numerical control machine tool according to claim 18, wherein the control point calculating unit includes:
The first calculating unit is adapted to calculate curve control points G k1 and G k2 sequentially approaching the micro segment instruction point P k according to a least square method when the micro segment instruction points P i and P j are non-adjacent micro segment instruction points and P i、Pj、Ti、Tj are coplanar, wherein the micro segment instruction point P k is a micro segment instruction point between the micro segment instruction points P i and P j.
20. The numerical control machine tool according to claim 18, wherein the control point calculating unit includes:
The control point coefficient calculating unit is suitable for sequentially calculating coefficient parameters alpha of a curve control point G k1 and coefficient parameters beta of a curve control point G k2 passing through the micro-segment instruction point P k when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points and P i、Pj、Ti、Tj are not coplanar;
A second calculation means adapted to calculate curve control points G 1 and G 2 from coefficient parameters α and β when α >0 and β < 0;
A third calculation means adapted to cause j to be self-subtracted by 1 when α is less than or equal to 0 or β is less than or equal to 0, and if j > i+1, calculate curve control points G 1 and G 2 according to coefficient parameters α and β; if j=i+1, the control points G 1 and G 2 are directly calculated.
21. The numerical control machine tool according to any one of claims 18, wherein the machining error control means includes:
The control point average value calculation unit is suitable for calculating the average values G 1 and G 2 of the obtained curve control points G k1 and G k2 when the micro-segment instruction points P i and P j are non-adjacent micro-segment instruction points;
The deviation calculating unit is suitable for calculating the deviation delta E of the fitted cubic Bezier curve by taking P i、G1、G2、Pj as a control point;
The adjusting unit is suitable for taking the fitted cubic Bezier curve with P i、G1、G2、Pj as a control point as the first-order continuous smooth spline curve meeting the machining precision when the deviation delta E is smaller than the preset deviation E;
When the deviation Δe is greater than or equal to the preset deviation E, a fourth curve control point calculating means is employed, which is adapted to let j=j-1, and recalculate the curve control points G 1 and G 2 between P i and P j.
22. The numerical control machining apparatus according to claim 12, wherein the smoothing compression unit further includes a fifth curve control point calculation section adapted to directly calculate a curve control point to obtain a fitted curve C t (u) when the micro-segment command points P i and P j are adjacent micro-segment command points, i.e., j=i+1, and take the fitted curve C t (u) as a target curve corresponding to the continuous micro-segment P i Pj.
CN202010456287.4A 2020-05-26 2020-05-26 Numerical control machining method and numerical control machining equipment Active CN113721551B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010456287.4A CN113721551B (en) 2020-05-26 2020-05-26 Numerical control machining method and numerical control machining equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010456287.4A CN113721551B (en) 2020-05-26 2020-05-26 Numerical control machining method and numerical control machining equipment

Publications (2)

Publication Number Publication Date
CN113721551A CN113721551A (en) 2021-11-30
CN113721551B true CN113721551B (en) 2024-09-10

Family

ID=78672023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010456287.4A Active CN113721551B (en) 2020-05-26 2020-05-26 Numerical control machining method and numerical control machining equipment

Country Status (1)

Country Link
CN (1) CN113721551B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566494A (en) * 2010-12-09 2012-07-11 中国科学院沈阳计算技术研究所有限公司 Five-axis numerical control interpolation method based on smooth compression of tool vectors
CN103699056A (en) * 2013-12-02 2014-04-02 嘉兴学院 Real-time smooth transition interpolation method of small high-speed and high-accuracy numerical control machining line segment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3366213B2 (en) * 1997-02-26 2003-01-14 三菱電機株式会社 Curve minute line differentiation method and numerical controller having spline interpolation function
CN104865898A (en) * 2014-02-26 2015-08-26 温州博纳激光科技有限公司 Method and equipment for processing micro path segment in numerical control machine tool
CN104007705B (en) * 2014-05-05 2016-09-28 上海交通大学 The prediction interpolation system that little line segment path compression is smooth
CN109521731B (en) * 2017-09-19 2021-07-30 沈阳高精数控智能技术股份有限公司 G2 continuous Bezier tool path smoothing algorithm based on tolerance zone
CN108170094B (en) * 2017-12-12 2020-05-15 烟台大学 Method for smoothly compressing cutter path
CN108153245A (en) * 2017-12-26 2018-06-12 深圳市汇川技术股份有限公司 Smooth trajectory forwarding method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566494A (en) * 2010-12-09 2012-07-11 中国科学院沈阳计算技术研究所有限公司 Five-axis numerical control interpolation method based on smooth compression of tool vectors
CN103699056A (en) * 2013-12-02 2014-04-02 嘉兴学院 Real-time smooth transition interpolation method of small high-speed and high-accuracy numerical control machining line segment

Also Published As

Publication number Publication date
CN113721551A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
US6044309A (en) Three-dimensional machining method and recording medium stored with a three-dimensional machining control program
CN101539769B (en) Method for fitting and interpolating G01 code based on quadratic B spline curve
Bi et al. A general, fast and robust B-spline fitting scheme for micro-line tool path under chord error constraint
Zhang et al. Curve fitting and optimal interpolation on CNC machines based on quadratic B-splines
CN108073138B (en) Elliptical arc smooth compression interpolation algorithm suitable for high-speed high-precision machining
Xu et al. A mapping-based spiral cutting strategy for pocket machining
Dhanda et al. Adaptive Tool Path Planning Strategy for Freeform Surface Machining using Point Cloud.
Li et al. Tool-path generation for sheet metal incremental forming based on STL model with defects
Li et al. Tool path optimization in postprocessor of five-axis machine tools
CN109991921B (en) Smooth B spline track direct generation method
US7110852B2 (en) Die machining method and device by V-CAD data
CN113721551B (en) Numerical control machining method and numerical control machining equipment
Lin et al. CNC codes conversion from linear and circular paths to NURBS curves
CN118288121B (en) A method for processing aspherical optical element
Lauwers et al. Five-axis rough milling strategies for complex shaped cavities based on morphing technology
CN1294466C (en) Direct numerical control processing method based on measuring data points
CN113467376B (en) A multi-axis trajectory compression method for multi-processing scenarios
Qu et al. Raster milling tool‐path generation from STL files
Zhu et al. Tool path generation for the five-axis CNC multi-stage incremental forming
Bouchenitfa et al. Improvement of toolpath quality combining polynomial interpolation with reduction of toolpath points
Hsieh Modelling tool path in wire electric discharge machining using Denavit–Hartenberg notation
Ghogare et al. Efficient CNC tool path planning using point cloud
Yang et al. A new high precision fitting approach for NURBS tool paths generation
Jichun et al. Parameter u and arc S modeling of B-spline for NC machining with CL points preprocessing algorithm
CN118838257B (en) Intelligent quality control processing method and system for photovoltaic equipment parts

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
GR01 Patent grant
GR01 Patent grant