Disclosure of Invention
Aiming at the problem that the prior art cannot meet the high-speed and high-precision machining requirements of a complex profile, the invention aims to provide the instruction point shaping, compressing and interpolating method which is high in machining efficiency and machining precision and is suitable for the numerical control device.
In order to solve the technical problems, the invention adopts the technical scheme that:
the invention relates to an instruction point shaping, compressing and interpolating method suitable for a numerical control device, which comprises the following steps of:
identification of continuous tiny line segment processing area: judging whether any three adjacent instruction points on the processed curved surface meet continuous processing conditions according to the read numerical control processing program;
estimation of interpolation point: when any adjacent three instruction points on the processed curved surface meet the continuous processing condition, inserting an arc which has a distance with the middle point which is a set tolerance of the numerical control device and is tangent with a line segment between the adjacent instruction points into the middle point of every adjacent three instruction points, wherein the tangent point is used as an interpolation point which is closer to the expected curve than the instruction point;
trimming of interpolation points: trimming the interpolation points obtained in the steps to reduce the calculation error and the rounding error in the interpolation point presumption process and enable the processing path to be smoother;
selecting characteristic interpolation points: selecting characteristic interpolation points by judging the bending direction of the processing path at each interpolation point of the processing path;
fitting of spline curve: fitting a continuous polynomial spline curve having a second derivative to the characteristic interpolation points to generate a smooth curve;
interpolation of spline curve: and (4) approximately calculating the interpolation point of the current interpolation period on the smooth curve, and sending the position of the interpolation point to a servo system of the numerical control device to drive a servo motor to move.
The method for judging whether any three adjacent instruction points on the processed curved surface meet the continuous processing condition adopts a double-chord high error method, which specifically comprises the following steps:
calculating the distance between any three adjacent instruction points on the processed curved surface;
calculating the double-chord height error according to the arc segment and the distance between the adjacent command points;
if the calculated double-chord height error is smaller than the maximum chord height error set by the numerical control device, the three instruction points meet continuous processing conditions;
and if the calculated double-chord height error is not smaller than the maximum chord height error set by the numerical control device, the continuous processing conditions are not satisfied among the three instruction points.
And (3) trimming the interpolation point by adopting a least square method, wherein the formula is as follows:
<math><mrow>
<mfenced open='{' close=''>
<mtable>
<mtr>
<mtd>
<mfenced open='' close=''>
<mtable>
<mtr>
<mtd>
<msub>
<mi>O</mi>
<mi>k</mi>
</msub>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mn>3</mn>
</mfrac>
<mrow>
<mo>(</mo>
<msub>
<mi>Q</mi>
<mi>i</mi>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msub>
<mi>Q</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msub>
<mi>Q</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>2</mn>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>O</mi>
<mi>k</mi>
<mo>′</mo>
</msubsup>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mn>3</mn>
</mfrac>
<mrow>
<mo>(</mo>
<msubsup>
<mi>O</mi>
<mi>i</mi>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msubsup>
<mi>O</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msubsup>
<mi>O</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>2</mn>
</mrow>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>O</mi>
<mi>k</mi>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mn>3</mn>
</mfrac>
<mrow>
<mo>(</mo>
<msubsup>
<mi>O</mi>
<mi>i</mi>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msubsup>
<mi>O</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msubsup>
<mi>Q</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>2</mn>
</mrow>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
</mtable>
</mfenced>
</mtd>
<mtd>
<mfenced open='' close=''>
<mtable>
<mtr>
<mtd>
<mrow>
<mo>(</mo>
<mn>1</mn>
<mo>≤</mo>
<mi>i</mi>
<mo>≤</mo>
<mi>n</mi>
<mo>-</mo>
<mn>4</mn>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mo>(</mo>
<mn>4</mn>
<mo>≤</mo>
<mi>k</mi>
<mo>≤</mo>
<mi>n</mi>
<mo>-</mo>
<mn>4</mn>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
</mtable>
</mfenced>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>-</mo>
<mo>-</mo>
<mo>-</mo>
<mrow>
<mo>(</mo>
<mn>9</mn>
<mo>)</mo>
</mrow>
</mrow></math>
wherein:
Qi(u)=aiu3+biu2+ciu+di (ui≤u≤ui+4) (5)
ai、bi、ci、difor successive interpolation points Qi、Qi+1、Qi+2、Qi+3And Qi+4Curve Q obtained by fitting with least squares penaltyiCoefficient vector of (u), uiAnd ui+4Are respectively interpolated points QiAnd Qi+4Corresponding parameter value, OkIs an interpolation point OkThe corrected value.
The selection process of the characteristic interpolation point comprises the following steps:
marking the initial interpolation point O1For the characteristic interpolation point in the current continuous tiny line segment processing area, and calculating the initial interpolation point O1And an interpolation point O adjacent thereto2Is processed to a pilot vector O'1And O'2Cross product between to obtain vector v12;
Judging the subscript j of the interpolation point to be calculated and the number n of the interpolation points, if j is less than n, calculating the interpolation point Oj-1And OjIs processed to a pilot vector O'j-1And O'jCross product between to obtain vector vj-1j;
Calculating the vector vj-2j-1And vj-1jAngle alpha therebetweenjIf α isjIf j is less than 90 degrees, j is j +1, and the size step of judging the subscript j of the interpolation point to be calculated currently and the number n of the interpolation points is carried out;
if α isjNot less than 90 DEG, an interpolation point O is markedjAs a characteristic interpolation point, j is j +1, and interpolation point O is set asj-1As a new initial interpolation point, switching to a step of marking the initial interpolation point O1 as a characteristic interpolation point in the processed curved surface meeting the continuous processing condition;
if j is n, mark point OjFor the feature interpolation point, the feature interpolation point selection is ended.
The method also comprises a machining precision control step between the spline curve fitting step and the spline curve interpolation step, and the process is as follows:
inputting interpolation points between two adjacent characteristic interpolation points and a spline curve formed by fitting;
calculating an interpolation point O between two adjacent characteristic interpolation pointsmThe distance L between the corresponding spline curve is not greater than the distance L of the numerical control systemWhen the maximum profile deviation is set, the spline curve is explained at the interpolation point OmThe requirement of processing precision is met;
taking and interpolating point OmAdjacent next interpolation point Om+1Judging whether all interpolation points are completely taken;
if all the interpolation points are taken out, judging all the interpolation points Om+1Whether the requirements of machining precision are met;
if the distance L does not meet the machining precision requirement, finding out an interpolation point O corresponding to the maximum value in the distance LsTaking the interpolation point as a new characteristic interpolation point between the two adjacent characteristic interpolation points;
fitting a new spline curve by using the new characteristic interpolation points to replace the original spline curve, and continuously inputting interpolation points between two adjacent characteristic interpolation points and the spline curve to be synthesized;
if the interpolation points are not completely taken, the calculation is switched to the calculation of the interpolation point O between two adjacent characteristic interpolation pointsmA distance L step from the corresponding spline curve;
when L is larger than the maximum contour deviation preset by the numerical control system, the spline curve is shown at the interpolation point OmIf the position does not meet the machining precision requirement, recording the serial number of the current interpolation point and the distance from the current interpolation point to the spline curve, and continuously taking the interpolation point OmAdjacent next interpolation point Om+1And (5) carrying out the following steps.
The invention has the following beneficial effects and advantages:
1. the processing efficiency is high. The calculation of the interpolation points of the method is carried out on the smooth curve, so that the switching speed between the adjacent interpolation points is greatly improved, the time required by processing is greatly shortened, and the processing efficiency is improved to the maximum extent.
2. The processing precision is high. The method of the present invention can reduce the influence of the tolerance between the command point and the desired curve on the machining accuracy by presuming the interpolation point closer to the desired curve than the command point, and can reduce the influence of the calculation error and the rounding error on the machining accuracy and the machined surface finish by trimming the interpolation point.
3. The surface processing quality is high. The method can fit the instruction points in the continuous tiny line segment processing area into a smooth curve with C2 continuity, thereby eliminating the break angle between adjacent line segments and improving the processing quality of the surface of the workpiece.
Detailed Description
The method of the present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 3, the command point shaping, compressing and interpolating method for a numerical control device according to the present invention includes the steps of:
identification of continuous tiny line segment processing area: judging whether any three adjacent instruction points on the processed curved surface meet continuous processing conditions according to the read numerical control processing program;
estimation of interpolation point: when any adjacent three instruction points on the processed curved surface meet the continuous processing condition, inserting an arc which has a distance with the middle point which is a set tolerance of the numerical control device and is tangent with a line segment between the adjacent instruction points into the middle point of every adjacent three instruction points, wherein the tangent point is used as an interpolation point which is closer to the expected curve than the instruction point;
trimming of interpolation points: trimming the interpolation points obtained in the steps to reduce the calculation error and the rounding error in the interpolation point presumption process and enable the processing path to be smoother;
selecting characteristic interpolation points: selecting characteristic interpolation points by judging the bending direction of the processing path at each interpolation point of the processing path;
fitting of spline curve: fitting the n characteristic interpolation points by using an n-1 section polynomial spline curve with continuous second derivative to generate a smooth curve;
interpolation of spline curve: and (4) approximately calculating the interpolation point of the current interpolation period on the smooth curve, and sending the position of the interpolation point to a servo system of the numerical control device to drive a servo motor to move.
Step one, the specific process of analyzing the processing path is as follows:
for a given numerical control machining program, whether continuous machining conditions are met between any three adjacent instruction points is judged through a double-chord height error method, and therefore the instruction points in the numerical control machining program are divided into a discontinuous micro-line segment machining area and a continuous micro-line segment machining area. As shown in FIG. 4, for three instruction points P in arbitrary order
i-1、P
iAnd P
i+1,L
i-1iAnd L
ii+1Are respectively an instruction point P
i-1And P
iAnd P
iAnd P
i+1Distance between, δ
1And delta
2Are respectively over-command points P
i-1、P
iAnd P
i+1Arc segment and line segment P
i-1P
iAnd P
iP
i+1The generated double chord height error is R which is three command points P
i-1、P
iAnd P
i+1The radius of the determined circle is determined,
is three instruction points P
i-1、P
iAnd P
i+1Two command points P on the determined circle
i-1、P
iHalf of the central angle corresponding to the middle minor arc,
is three instruction points P
i-1、P
iAnd P
i+1Two command points P on the determined circle
i、P
i+1Half of central angle corresponding to middle minor arc, theta is vector
And
the included angle therebetween. The value can be calculated by the following formula:
if the calculated double chord height error delta1And delta2Are all smaller than the maximum chord height error delta set by the numerical control devicecmaxThen, the instruction point P is describedi-1、PiAnd Pi+1The continuous processing condition is met; if the calculated double chord height error delta1And delta2One is larger than the maximum chord height error delta set by the numerical control devicecmaxThen, the instruction point P is describedi-1、PiAnd Pi+1The condition of continuous processing is not satisfied. Therefore, the instruction points in the numerical control machining program can be divided into a discontinuous micro-line segment machining area and a continuous micro-line segment machining area by judging every three adjacent instruction points.
Step two, the specific process of estimating the interpolation point is as follows:
for any one continuous micro-line segment processing area, at the middle point formed by continuous three instruction points, an arc which has a tolerance set for the numerical control system and is tangent to two line segments with the adjacent instruction points is inserted to estimate an interpolation point which is closer to the expected curve than the instruction point. As shown in fig. 5, from the instruction point Pi-1、PiAnd Pi+1Two adjacent small line segments Pi-1PiAnd PiPi+1At the corner of which a distance corner command point P is insertediTo a tolerance deltatmaxSize and line segment Pi-1PiAnd PiPi+1Tangent to point QiAnd Qi+1After the arc, the following equation can be obtained according to the geometrical knowledge:
<math><mrow>
<mfenced open='{' close=''>
<mtable>
<mtr>
<mtd>
<mi>L</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mi>sin</mi>
<mfrac>
<mi>β</mi>
<mn>2</mn>
</mfrac>
</mrow>
<mrow>
<mn>1</mn>
<mo>-</mo>
<mi>cos</mi>
<mfrac>
<mi>β</mi>
<mn>2</mn>
</mfrac>
</mrow>
</mfrac>
<msub>
<mi>δ</mi>
<mrow>
<mi>t</mi>
<mi>max</mi>
</mrow>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>R</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mi>cos</mi>
<mfrac>
<mi>β</mi>
<mn>2</mn>
</mfrac>
</mrow>
<mrow>
<mn>1</mn>
<mo>-</mo>
<mi>cos</mi>
<mfrac>
<mi>β</mi>
<mn>2</mn>
</mfrac>
</mrow>
</mfrac>
<msub>
<mi>δ</mi>
<mrow>
<mi>t</mi>
<mi>max</mi>
</mrow>
</msub>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>-</mo>
<mo>-</mo>
<mo>-</mo>
<mrow>
<mo>(</mo>
<mn>2</mn>
<mo>)</mo>
</mrow>
</mrow></math>
wherein L is a tangent point and an instruction point P
iBeta is a vector of
And
the included angle therebetween. Under the condition that the set tolerance of the numerical control system is certain, the tangent point Q can be found by combining the
graph 2 and the graph 5
iAnd Q
i+1Ratio instruction point P
iCloser to the desired curve. Therefore, after the numerical control system sets the tolerance, the point Q can be taken off
iAnd Q
i+1As a point of instruction P
iThe corresponding interpolation point. At this time, tangent point Q
iAnd Q
i+1The coordinates of (a) can be written as:
wherein L isi-1iAnd Lii+1Are respectively line segment Pi-1PiAnd PiPi+1Length of (2)And a point P of instructioni-1、PiAnd Pi+1The coordinates of (a) can be obtained from a numerical control machining program. As shown in FIG. 6, to prevent the intersection of the interpolation points corresponding to the adjacent command points due to the too short line segment, the tangent point and the command point PiThe distance L between the adjacent line segments should be constrained by the length of the adjacent line segments, in addition to the tolerance set by the system:
<math><mrow>
<mi>L</mi>
<mo>≤</mo>
<mi>min</mi>
<mrow>
<mo>(</mo>
<mfrac>
<msub>
<mi>L</mi>
<mrow>
<mi>i</mi>
<mo>-</mo>
<mn>1</mn>
<mi>i</mi>
</mrow>
</msub>
<mn>2</mn>
</mfrac>
<mo>,</mo>
<mfrac>
<msub>
<mi>L</mi>
<mrow>
<mi>ii</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mo>-</mo>
<mo>-</mo>
<mo>-</mo>
<mrow>
<mo>(</mo>
<mn>4</mn>
<mo>)</mo>
</mrow>
</mrow></math>
at this time, the interpolation point corresponding to each of the remaining instruction points except the first and last instruction points in the continuous minute line segment processing area can be calculated by the above-described method, and the first and last instruction points can take themselves as the interpolation points corresponding thereto.
Step three, the trimming of the interpolation point specifically comprises the following steps:
the interpolation points are estimated from the tolerances set by the command points and numerical control system, and therefore, the distance from each interpolation point to a desired curve is much larger than the distances from other interpolation points to desired curves. Therefore, it is obviously undesirable to generate a smooth curve machining path directly by fitting the interpolated points. In order to reduce the calculation error and rounding error in the interpolation point estimation process and to make the curve fitted to the interpolation points smoother, the present embodiment uses a least square method based on cubic polynomial to trim every five consecutive interpolation points.
Before trimming the interpolation points, each interpolation point needs to be parameterized to ensure that each interpolation point has a corresponding parameter value. In order to enable the parameter value corresponding to each interpolation point to reflect the turning condition of the line segment formed by the interpolation points, the method adopts a centripetal parameterization method to parameterize the interpolation points.
After parameterizing each interpolation point, take u3,u2U, 1 as a set of orthogonal basis functions of a cubic polynomial space, at which arbitrary five successive interpolation points Q are presenti、Qi+1、Qi+2、Qi+3And Qi+4Fitted curve Q betweeni(u) can be written as:
Qi(u)=aiu3+biu2+ciu+di(ui≤u≤ui+4) (5)
wherein a isi、bi、ci、diIs a fitted curve QiCoefficient vector of (u) (vector dimension is same as number of motion axes), uiAnd ui+4Interpolation of points QiAnd Qi+4The corresponding parameter value. At this time, the point Q is interpolatedi、Qi+1、Qi+2、Qi+3、Qi+4To QiHaving a parameter value u on (u)i、ui+1、ui+2、ui+3、ui+4Point Q ofi(ui)、Qi(ui+1)、Qi(ui+2)、Qi(ui+3) The sum of the squares Ji of the distances between can be written as:
<math><mrow>
<msub>
<mi>J</mi>
<mi>i</mi>
</msub>
<mo>=</mo>
<munderover>
<mi>Σ</mi>
<mrow>
<mi>k</mi>
<mo>=</mo>
<mi>i</mi>
</mrow>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>4</mn>
</mrow>
</munderover>
<msup>
<mrow>
<mo>|</mo>
<msub>
<mi>Q</mi>
<mi>i</mi>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>-</mo>
<msub>
<mi>Q</mi>
<mi>k</mi>
</msub>
<mo>|</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>=</mo>
<msub>
<mi>J</mi>
<mi>ix</mi>
</msub>
<mo>+</mo>
<msub>
<mi>J</mi>
<mi>iy</mi>
</msub>
<mo>+</mo>
<msub>
<mi>J</mi>
<mi>iz</mi>
</msub>
<mo>-</mo>
<mo>-</mo>
<mo>-</mo>
<mrow>
<mo>(</mo>
<mn>6</mn>
<mo>)</mo>
</mrow>
</mrow></math>
wherein,
<math><mrow>
<mfenced open='{' close=''>
<mtable>
<mtr>
<mtd>
<msub>
<mi>J</mi>
<mi>ix</mi>
</msub>
<mo>=</mo>
<munderover>
<mi>Σ</mi>
<mrow>
<mi>k</mi>
<mo>=</mo>
<mi>i</mi>
</mrow>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>4</mn>
</mrow>
</munderover>
<msup>
<mrow>
<mo>|</mo>
<msub>
<mi>Q</mi>
<mi>ix</mi>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>-</mo>
<msub>
<mi>X</mi>
<mi>k</mi>
</msub>
<mo>|</mo>
</mrow>
<mn>2</mn>
</msup>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>J</mi>
<mi>iy</mi>
</msub>
<mo>=</mo>
<munderover>
<mi>Σ</mi>
<mrow>
<mi>k</mi>
<mo>=</mo>
<mi>i</mi>
</mrow>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>4</mn>
</mrow>
</munderover>
<msup>
<mrow>
<mo>|</mo>
<msub>
<mi>Q</mi>
<mi>iy</mi>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>-</mo>
<msub>
<mi>Y</mi>
<mi>k</mi>
</msub>
<mo>|</mo>
</mrow>
<mn>2</mn>
</msup>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>J</mi>
<mi>iz</mi>
</msub>
<mo>=</mo>
<munderover>
<mi>Σ</mi>
<mrow>
<mi>k</mi>
<mo>=</mo>
<mi>i</mi>
</mrow>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>4</mn>
</mrow>
</munderover>
<msup>
<mrow>
<mo>|</mo>
<msub>
<mi>Q</mi>
<mi>iz</mi>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>-</mo>
<msub>
<mi>Z</mi>
<mi>k</mi>
</msub>
<mo>|</mo>
</mrow>
<mn>2</mn>
</msup>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>-</mo>
<mo>-</mo>
<mo>-</mo>
<mrow>
<mo>(</mo>
<mn>7</mn>
<mo>)</mo>
</mrow>
</mrow></math>
in the formula, Qix(uk)、Qiy(uk)、Qix(uk) Are respectively QiHaving a parameter value u on (u)kPoint Q ofi(uk) Coordinate values in the X, Y, Z directions, Xk、Yk、ZkAre respectively interpolated points QkCoordinate values in the X, Y, Z directions, Jix、Jiy、JizAre respectively interpolated points Qi、Qi+1、Qi+2、Qi+3、Qi+4To curve with parameter value ui、ui+1、ui+2、ui+3、ui+4Point Q ofi(ui)、Qi(ui+1)、Qi(ui+2)、Qi(ui+3) The sum of the squares of the distances in the X, Y, Z directions. It can be found from equations (6) and (7) that J is to be expressediTo minimize, J should beix、JiyAnd JizAre all minimal. To this end, Jix、JiyAnd JizThe partial derivatives of (c) must satisfy the following condition:
<math><mrow>
<mfenced open='{' close=''>
<mtable>
<mtr>
<mtd>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>ix</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>a</mi>
</mrow>
<mi>ix</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>ix</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>b</mi>
</mrow>
<mi>ix</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>ix</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>c</mi>
</mrow>
<mi>ix</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>ix</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>d</mi>
</mrow>
<mi>ix</mi>
</msub>
</mfrac>
<mo>=</mo>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>iy</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>a</mi>
</mrow>
<mi>iy</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>iy</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>b</mi>
</mrow>
<mi>iy</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>iy</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>c</mi>
</mrow>
<mi>iy</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>iy</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>d</mi>
</mrow>
<mi>iy</mi>
</msub>
</mfrac>
<mo>=</mo>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>iz</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>a</mi>
</mrow>
<mi>iz</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>iz</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>b</mi>
</mrow>
<mi>iz</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>iz</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>c</mi>
</mrow>
<mi>iz</mi>
</msub>
</mfrac>
<mo>=</mo>
<mfrac>
<msub>
<mrow>
<mo>∂</mo>
<mi>J</mi>
</mrow>
<mi>iz</mi>
</msub>
<msub>
<mrow>
<mo>∂</mo>
<mi>d</mi>
</mrow>
<mi>iz</mi>
</msub>
</mfrac>
<mo>=</mo>
<mn>0</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>-</mo>
<mo>-</mo>
<mo>-</mo>
<mrow>
<mo>(</mo>
<mn>8</mn>
<mo>)</mo>
</mrow>
</mrow></math>
interpolating point Qi、Qi+1、Qi+2、Qi+3And Qi+4And a parameter value u corresponding to the coordinate valuei、ui+1、ui+2、ui+3And ui+4After substituting equation (8), the calculation is performedCurve Qi(u) coefficient vectors in the X, Y and Z directions, respectively. In calculating QiAfter the expression (u), there is a parameter value ui、ui+1、ui+2、ui+3And ui+4And the first and second derivatives at that point can be written as:
<math><mrow>
<mfenced open='{' close=''>
<mtable>
<mtr>
<mtd>
<mfenced open='' close=''>
<mtable>
<mtr>
<mtd>
<msub>
<mi>O</mi>
<mi>k</mi>
</msub>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mn>3</mn>
</mfrac>
<mrow>
<mo>(</mo>
<msub>
<mi>Q</mi>
<mi>i</mi>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msub>
<mi>Q</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msub>
<mi>Q</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>2</mn>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>O</mi>
<mi>k</mi>
<mo>′</mo>
</msubsup>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mn>3</mn>
</mfrac>
<mrow>
<mo>(</mo>
<msubsup>
<mi>O</mi>
<mi>i</mi>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msubsup>
<mi>O</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msubsup>
<mi>O</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>2</mn>
</mrow>
<mo>′</mo>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>O</mi>
<mi>k</mi>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<mn>3</mn>
</mfrac>
<mrow>
<mo>(</mo>
<msubsup>
<mi>O</mi>
<mi>i</mi>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msubsup>
<mi>O</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>+</mo>
<msubsup>
<mi>Q</mi>
<mrow>
<mi>i</mi>
<mo>+</mo>
<mn>2</mn>
</mrow>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
<mrow>
<mo>(</mo>
<msub>
<mi>u</mi>
<mi>k</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
</mtable>
</mfenced>
</mtd>
<mtd>
<mfenced open='' close=''>
<mtable>
<mtr>
<mtd>
<mrow>
<mo>(</mo>
<mn>1</mn>
<mo>≤</mo>
<mi>i</mi>
<mo>≤</mo>
<mi>n</mi>
<mo>-</mo>
<mn>4</mn>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mo>(</mo>
<mn>4</mn>
<mo>≤</mo>
<mi>k</mi>
<mo>≤</mo>
<mi>n</mi>
<mo>-</mo>
<mn>4</mn>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
</mtable>
</mfenced>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>-</mo>
<mo>-</mo>
<mo>-</mo>
<mrow>
<mo>(</mo>
<mn>9</mn>
<mo>)</mo>
</mrow>
</mrow></math>
in the formula, OkIs an interpolation point OkThe corrected value. If there are n interpolation points in the current continuous tiny line segment processing area, divide the first three interpolation points Q1、Q2、Q3And the last three interpolation points qn-2、Qn-1QnThe trimmed new interpolation point and the first and second derivative vectors at the point need to be considered separately, and the trimmed new interpolation points and the first and second derivative vectors at the point of the rest interpolation points can be taken as the average values of the point with the parameter value corresponding to the interpolation point and the first and second derivative vectors at the point on the middle three of the five curves approximating the interpolation point.
Step four, selecting the characteristic interpolation points specifically comprises the following steps:
for the same continuous tiny line segment processing area, if the processing path designated by a plurality of interpolation points is bent along the same direction, the requirement of processing precision can be met only by an expected curve formed by fitting the geometric information of the first and last interpolation points of the processing path. Therefore, for the purpose of compressing the number of interpolation points and reducing the number of times of fitting, it is possible to find an interpolation point where the bending direction of the processing path changes in advance before fitting the interpolation points, and define such an interpolation point as a characteristic interpolation point.
As shown in fig. 7 and 8, n corrected interpolation point values O1、O2...、On-1And OnAnd finding out a characteristic interpolation point where the bending direction of the processing path changes by the constructed continuous tiny line segment processing area through the following steps:
(1) marking the initial interpolation point O1For the characteristic interpolation point in the current continuous tiny line segment processing area, and calculating the initial interpolation point O1And an interpolation point O adjacent thereto2Is processed to a pilot vector O'1And O'2Cross product between to obtain vector v12;
(2) Judging the subscript j of the interpolation point to be calculated and the number n of the interpolation points, if j is less than n, calculating the interpolation point Oj-1And OjIs processed to a pilot vector O'j-1And O'jCross product between to obtain vector vj-1j;
(3) Calculating the vector vj-2j-1And vj-1jAngle alpha therebetweenjIf α isjIf j is less than 90 degrees, j is j +1, and the step (2) is carried out to judge the size of the subscript j of the interpolation point to be calculated currently and the number n of the interpolation points;
(4) if α isjNot less than 90 DEG, an interpolation point O is markedjAs a characteristic interpolation point, j is j +1, and interpolation point O is set asj-1As a new initial interpolation point, go to step (1) to mark the initial interpolation point O1Characteristic interpolation points in the processed curved surface which meet continuous processing conditions;
(5) if j is n, mark point OjFor the feature interpolation point, the feature interpolation point selection is ended.
Step five, the fitting process of the characteristic interpolation points is as follows:
for N characteristic interpolation points in any continuous tiny line segment processing area, fitting can be carried out by using an N-1-segment quintic polynomial spline curve with continuous second derivative so as to achieve the purpose of generating a smooth curve. As shown in FIG. 9, the point O is interpolated for any two adjacent featuresiAnd OjBetween them by an interpolated point Oi+1、...、Oj-1Specified broken lineMachining path and passing feature interpolation point OiAnd OjSmooth curve O formed by fitting geometric informationk(u) wherein the curve O is smoothedkThe expression of (u) can be written as:
Ok(u)=Aku5+Bku4+Cku3+Dku2+Eku+Fk(u∈[ui,uj]) (10)
wherein A isk、Bk、Ck、Dk、EkAnd FkIs OkCoefficient vector of (u) (vector dimension equals number of motion axes), uiAnd ujRespectively being characteristic interpolation points OiAnd OjThe corresponding parameter value. O isk(u) there are 6 coefficient vectors, so 6 boundary conditions are needed to determine these coefficient vectors. To ensure Ok(u) passing the characteristic interpolation point OiAnd OjAnd satisfies C2 continuity with adjacent curves at the characteristic interpolation point, optionally the characteristic interpolation point OiAnd OjThe coordinate value and the first and second lead vectors are used as a spline curve Ok(u) boundary conditions, these boundary conditions being taken into Ok(u) the following equation is obtained:
<math><mrow>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<msubsup>
<mi>u</mi>
<mi>i</mi>
<mn>5</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mi>u</mi>
<mi>i</mi>
<mn>4</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mi>u</mi>
<mi>i</mi>
<mn>3</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mi>u</mi>
<mi>i</mi>
<mn>2</mn>
</msubsup>
</mtd>
<mtd>
<msub>
<mi>u</mi>
<mi>i</mi>
</msub>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>5</mn>
<msubsup>
<mi>u</mi>
<mi>i</mi>
<mn>4</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mrow>
<mn>4</mn>
<mi>u</mi>
</mrow>
<mi>i</mi>
<mn>3</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mrow>
<mn>3</mn>
<mi>u</mi>
</mrow>
<mi>i</mi>
<mn>2</mn>
</msubsup>
</mtd>
<mtd>
<mn>2</mn>
<msub>
<mi>u</mi>
<mi>i</mi>
</msub>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>20</mn>
<msubsup>
<mi>u</mi>
<mi>i</mi>
<mn>3</mn>
</msubsup>
</mtd>
<mtd>
<mn>12</mn>
<msubsup>
<mi>u</mi>
<mi>i</mi>
<mn>2</mn>
</msubsup>
</mtd>
<mtd>
<mn>6</mn>
<msub>
<mi>u</mi>
<mi>i</mi>
</msub>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>u</mi>
<mi>j</mi>
<mn>5</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mi>u</mi>
<mi>j</mi>
<mn>4</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mi>u</mi>
<mi>j</mi>
<mn>3</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mi>u</mi>
<mi>j</mi>
<mn>2</mn>
</msubsup>
</mtd>
<mtd>
<msub>
<mi>u</mi>
<mi>j</mi>
</msub>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>5</mn>
<msubsup>
<mi>u</mi>
<mi>j</mi>
<mn>4</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mrow>
<mn>4</mn>
<mi>u</mi>
</mrow>
<mi>j</mi>
<mn>3</mn>
</msubsup>
</mtd>
<mtd>
<msubsup>
<mrow>
<mn>3</mn>
<mi>u</mi>
</mrow>
<mi>j</mi>
<mn>2</mn>
</msubsup>
</mtd>
<mtd>
<mn>2</mn>
<msub>
<mi>u</mi>
<mi>j</mi>
</msub>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>20</mn>
<msubsup>
<mi>u</mi>
<mi>j</mi>
<mn>3</mn>
</msubsup>
</mtd>
<mtd>
<mn>12</mn>
<msubsup>
<mi>u</mi>
<mi>j</mi>
<mn>2</mn>
</msubsup>
</mtd>
<mtd>
<msub>
<mrow>
<mn>6</mn>
<mi>u</mi>
</mrow>
<mi>j</mi>
</msub>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<msub>
<mi>A</mi>
<mi>k</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>B</mi>
<mi>k</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>C</mi>
<mi>k</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>D</mi>
<mi>k</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>E</mi>
<mi>k</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>F</mi>
<mi>k</mi>
</msub>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>=</mo>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<msub>
<mi>O</mi>
<mi>i</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>O</mi>
<mi>i</mi>
<mo>′</mo>
</msubsup>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>O</mi>
<mi>i</mi>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
</mtd>
</mtr>
<mtr>
<mtd>
<msub>
<mi>O</mi>
<mi>j</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>O</mi>
<mi>j</mi>
<mo>′</mo>
</msubsup>
</mtd>
</mtr>
<mtr>
<mtd>
<msubsup>
<mi>O</mi>
<mi>j</mi>
<mrow>
<mo>′</mo>
<mo>′</mo>
</mrow>
</msubsup>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>-</mo>
<mo>-</mo>
<mo>-</mo>
<mrow>
<mo>(</mo>
<mn>11</mn>
<mo>)</mo>
</mrow>
</mrow></math>
interpolating features by a point OiAnd OjCoordinate value of (d), corresponding parameter value uiAnd ujAnd a calculated first derivative vector O'iAnd O'jAnd a second derivative vector O ″)iAnd O ″)jWith the formula (11), the spline curve O can be calculatedkCoefficient of (u).
Step six, the calculation of the interpolation points comprises the following specific processes:
for the fitted curve O (u), a second-order Taylor expansion method is adopted to approximately calculate a parameter value u corresponding to the interpolation point of the ith interpolation periodiAt this time uiThe formula of (c) can be expressed by the following formula:
wherein u isi-1The parameter value corresponding to the interpolation point of the i-1 th interpolation period, T is the interpolation period of the numerical control system, Vi-1And Ai-1The machining speed and acceleration, O' (u), planned for the i-1 th interpolation period, respectivelyi-1) And O' (u)i-1) Are each O (u) at ui-1The first and second derivative vectors of (c) can be calculated by their expressions. Introducing the planned processing speed and accelerationThe formula (12) can calculate the parameter value corresponding to the interpolation point of the current interpolation period, and the calculated parameter value is substituted into the expression of the expected curve to obtain the interpolation point of the current interpolation period.
In order to improve the processing precision, the method of the invention designs a processing precision control step between the step 5) and the step 6), and the specific process is as follows:
the method judges whether the spline curve formed by fitting meets the requirement of machining precision at the interpolation point by calculating the distance between the interpolation point and the corresponding curve point (the point of the expected curve with the parameter value corresponding to the interpolation point) in real time. And for the interpolation points which do not meet the machining precision requirement, the curve segment shape of the spline curve at the interpolation points is adjusted by adding new characteristic interpolation points, so that the fitted spline curve meets the machining precision requirement at all the interpolation points.
Interpolation points O for two adjacent features shown in FIG. 9iAnd OjThe processing precision of the spline curve at the interpolation point can be controlled by the following process, and the specific flow is shown in fig. 10:
(1) calculating a characteristic interpolation point OiAnd OjInterpolation point O betweenm(m starting from i + 1) to the corresponding spline Ok(um) A distance L between umIs an interpolation point OmThe corresponding parameter value. When L is less than or equal to emaxWhen (e)maxThe maximum profile deviation preset for the system) is transferred to the process (2); when L > emaxWhen the process is finished, the process (3) is switched to;
(2)L≤emaxillustrates a spline curve Ok(u) at the interpolation point OmMeets the requirement of processing precision. Judging the sizes of m and j, if m is less than j, describing the characteristic interpolation point OiAnd OjIf all interpolation points between the m and the m are not judged completely, adding 1 to the m and then switching to the process (1); if m is j, the characteristic interpolation point O is describediAnd OjAfter all interpolation points are judged, the process is switched to the process (4);
(3)L>emaxdescription curve segment Ok(u) at the interpolation point OmThe processing precision requirement is not met. And recording the value of m and the distance L, and judging the sizes of m and j. If m < j, the characteristic interpolation point O is specifiediAnd OjIf all interpolation points between the m and the m are not judged completely, adding 1 to the m and then switching to the process (1); if m is j, the characteristic interpolation point O is describediAnd OjAfter all interpolation points are judged, the process is switched to the process (4);
(4) and judging whether an m value is recorded. If no m value is recorded, curve segment O is illustratedk(u) at a characteristic interpolation point OiAnd OjAll the interpolation points between the two points meet the requirement of the processing precision, and the processing precision control is finished; if m is recorded, the curve segment O is illustratedk(u) at a characteristic interpolation point OiAnd OjFinding out the interpolation point O corresponding to the maximum value in L when the interpolation point does not meet the processing precisions(and curve segment O)k(u) interpolation point farthest away) and takes the interpolation point as a characteristic interpolation point OiAnd OjInterpolating points with new features, and going to the process (5);
(5) by interpolation of points O by featuresiAnd OsAnd OsAnd OjFitting a new spline curve Os-1(u) and Os(u) instead of Ok(u) as a characteristic interpolation point OiAnd OjThe new curve segment is formed, and the machining precision control is carried out again according to the process until the characteristic interpolation point OiAnd OjThe curve segment between meets the machining precision requirement at all the interpolation points.
The invention has the following execution effects:
the executing mechanism of the method adopts an Anduan Mechatolin-III bus and a sigma-2 servo and motor, the control machine tool is a three-axis numerical control milling machine, and the main parameters of the device are as follows:
CPU Pentium M-1.6GHz memory 512M hard disk 40G
The feed rate F is 3000m/min
Interpolation period T1 ms
Maximum acceleration Amax=500mm/s-2
Chord height error deltacmax=0.01mm
Tolerance deltatmax=0.01mm
Error of contour emax=0.01mm
In order to verify the effectiveness of the method, the complex profile shown in fig. 11 is actually processed by respectively adopting a traditional interpolation method, a smooth interpolation algorithm and the method, a processing path is generated by CAD/CAM software UG under the condition that the internal and external tolerance is set to be 0.03mm, as shown in fig. 11, and comparison and analysis are respectively carried out on the processing speed, the processing precision and the surface processing quality. Fig. 12a, 12b, and 12c show comparison graphs of the processing speeds of the above three methods, and fig. 13a, 13b, and 13c show comparison graphs of interpolation points and original models generated in the actual processing process of the above three methods; FIGS. 14a, 14b, and 14c are comparative graphs showing the machined surfaces of the sample pieces in the above three methods.
From the three figures above, it can be seen that:
1. compared with the traditional interpolation method, the method can greatly reduce the time required by the complex profile processing, and the processing time required by adopting the text algorithm and the smooth interpolation algorithm is not greatly different, as shown in fig. 12a, 12b and 12 c. The invention is mainly characterized in that when the method and the smooth interpolation algorithm are adopted, the calculation of interpolation points is carried out on a smooth curve, so that the switching speed between adjacent interpolation points is greatly improved, and the time required by processing is greatly shortened.
2. Compared with the traditional interpolation method and the smooth interpolation algorithm, the method can greatly reduce the number of over-cut points and under-cut points, as shown in fig. 13a, 13b and 13c, wherein the points with darker color gray levels are the over-cut points, and the points with lighter color gray levels are the under-cut points, and can effectively eliminate break angles between adjacent line segments and make the processed surface smoother, as shown in fig. 14a, 14b and 14 c. This is because the method generates a smooth curve by fitting an interpolation point closer to the CAM expected curve than the command point, thereby reducing the influence of the deviation between the command point and the expected curve on the machining accuracy and improving the workpiece surface machining accuracy.