A kind of six-axis linkage interpolating method for spark machined
Technical field
The present invention relates to the movement control technology field in digital control system, relate in particular to a kind of six-axis linkage interpolating method that comprises three linear axis and three rotating shafts for spark machined.
Background technology
Closed blisk class part is the key component in Aeronautics and Astronautics engine, and it is semiclosed, the processing of the flow passage structure of bending has proposed high requirement to the spatial accessibility of cutter.A kind of effective processing method for such part is multi-shaft interlocked spark machined, its principle is: to being full of the tool-electrode prototype of leaf dish runner, carry out dimension reduction, make the tool-electrode can be along a complicated space curve without entering interferingly runner position, then by the shape copy of tool-electrode, gone out the shape of blade profile.In order to realize along the processing in given space curve feeding path, need to the interpolator in digital control system curve be separated into a series of intermediate point (being interpolated point), by all kinematic axis, according to interpolated point order, complete motion.Guarantee that tool-electrode can, along complicated space curve without entering interferingly runner position and can meeting the frequent slightly reciprocal servo feed requirement of spark machined, just require interpolator can carry out accurately smooth-going forward and reverse interpolation.
Application number is 201110008305.3, name be called the six-axis control of < < based on ARM9 embedded system and CPLD method > > patent Introduction a kind of six-axis linkage interpolation that is similar to digital integration, be that six axles arrange respectively integration accumulator, value in each interpolation cycle in each axle integration accumulator increases by fixed proportion, if there is accumulator to overflow corresponding axis, moves a pulse equivalency.Application number is 201010022856.0, name is called in < < digital control system the patent based on the fixing multi-axis interpolation method > > of radius of turn and rotating shaft coordinate is multiplied by a fixing radius coefficient turns to linear axis, movement locus unification is considered as to the straight line in sextuple space, then carries out interpolation with data sampling method.The limitation of each method is only to carry out interpolation for each axle numerical control code of linear corresponding relation each other that moves above, does not possess the direct interpolation function to curvilinear path; If use it for general curve track, need CAM system in advance curve discretization to be become to a series of little straightway, thereby introduce new approximate error, straightway joining place due to speed discontinuous will cause the impact of motion, and when curvilinear path is longer, curvature is larger, approximation accuracy requires when higher, need the little straightway of generation more, the memory space taking is huger.Application number is 200610078188.7, name is called the linear track that the patent of < < curve interpolating method > > provides numerical control code and again fits to two respectively for the curve of linear axis and rotating shaft, has caused introducing new error of fitting.Application number is 201110027578.2, the five-axle linkage track that name is called two nurbs curves descriptions that patent that < < has five axle Spline Interpolator > > of tool length compensate function combines with cutter shaft orientation vector for cutter heart point carries out interpolation, belong to real time data sampling method, the sampling of carrying out every a segment distance along curve is equivalent to rough interpolation (in advance curve discretization being become the method for a series of little straightway similar with described employing CAM system above), on the line between sampled point, motion is equivalent to the smart interpolation to little straightway, still be difficult to avoid introduce larger bow high level error when rough interpolation, in addition, parameter increase in its each interpolation cycle is to take the arc length of the path curves of cutter heart point within this cycle as with reference to calculating, only considered the bow high level error of cutter heart point curve, in every interpolation cycle, the arc length of cutter shaft orientation vector curve is compared with the arc length of the cutter heart point curve when larger, and the bow high level error of cutter shaft orientation vector curve is also larger.
Application number is 201210328234.X, name is called in the patent of the arc length increment interpolation > > of < < unit and has provided containing the locus interpolation scheme of the axle that rotatablely moves, and is applicable to the synchronous interpolation (for example interpolation of line cutting laid abnormity face) of one or more Closed Parametric Curve.And comprise three linear motion axis and three axles that rotatablely move for the six-axis linked numerical control electric spark machine tool of closed blisk, how by direct interpolation, to produce suitable feeding pulse train to coordinate the motion of six axles, making tool-electrode accurate and smooth-going as far as possible with respect to motion of space curve track and the attitude of workpiece, is the key that determines workpiece form and dimensional precision.In addition, when reducing error of interpolation, avoid a large amount of consumption of memory space, will avoid curve rough interpolation to become a series of little straightways, the process to the smart interpolation of little straightway again, and should directly to curve, carry out smart interpolation.Spark machined is adjusted the gap between tool-electrode and workpiece repeatedly according to interpolar discharge state, needs interpolation algorithm can accurately carry out forward and reverse interpolation frequently, and interpolating method in the past only designs for the machining of admission mostly.In sum, method in the past is still difficult to meet the target to the positive and negative two-way synchronous direct interpolation of six-axis linkage of the high accuracy of space curve.
Therefore, those skilled in the art is devoted to develop a kind of six-axis linkage interpolating method for spark machined, expansion can Interpolation Spaces curve type scope, the machining accuracy that improves six-axis linked numerical control electric spark machine tool and the ride comfort of motion, realize to shaped electrode the position of Six-freedom-degree space curvilinear motion and the direct interpolation of attitude angle along three linear motion axis and three axle synthesizeds that rotatablely move.
Summary of the invention
Because the above-mentioned defect of prior art, technical problem to be solved by this invention is to provide a kind of six-axis linkage interpolating method for spark machined, improve unit arc length increment interpolation, expansion can Interpolation Spaces curve type scope, improve the machining accuracy of six-axis linked numerical control electric spark machine tool and the ride comfort of motion, realize to shaped electrode the position of Six-freedom-degree space curvilinear motion and the direct interpolation of attitude angle along three linear motion axis and three axle synthesizeds that rotatablely move.
If numerical control code instruction provides the parameter curve of a working motion track:
u∈[us,ue]
U wherein
sand u
ebe respectively the corresponding parameter value of space curve starting point and terminal.Without loss of generality, establish u
s=0.For the description of unified length and angle, each coordinate figure is unit with the pulse equivalency (BLU, Basic Length Unit) of respective shaft, for example: if X (u)=0.15mm and X-axis resolution ratio are 0.001mm/BLU,
if A (u)=0.08 ° and A axle resolution ratio are 0.001 °/BLU,
for the description of shortcut calculation, adopt unified symbol to represent each coordinate, make X=x
1, Y=x
2, Z=x
3, A=x
4, B=x
5, C=x
6, curve representation formula is rewritten as:
u∈[0,u
e]
The motion that most existing interpolations are only processed six axles is the situation of linear corresponding relation each other, is equivalent to the expression formula of each coordinate of curve to be defined as:
u∈[0,u
e],i=1,2,…,6(1)
X wherein
isand x
iebe respectively the i axial coordinate value of the origin of curve and terminal.Although the linear corresponding relation of each axle can make interpolation easy, denotable path curves shape is very limited, during for approximating curve track, may produce larger error, is not suitable for curvilinear path to carry out direct interpolation.In order to address this problem, the present invention promotes the type of three linear axis resultant motion geometric locuses, and allowing linear axis resultant motion geometric locus is general parameter curve, no longer limits x
1(u), x
2and x (u)
3(u) be the form of (1) formula.
The implication of interpolation as shown in Figure 1.In each interpolation cycle, instrument is the location point from curve (being called reference point) A with respect to workpiece
1set out along given motion of space curve one segment distance, arrive a new reference point A on space curve
2.Yet, be subject to each axle resolution ratio---the restriction of each kinematic axis movement resolution of single BLU representative, the location point that actual motion arrives (being called interpolated point) B
2can only take a series of summits of the grid that single BLU is the length of side (as B
21, B
22, B
23) on get, the task of interpolation is exactly from a series of grid vertexes, to select the interpolated point nearest with reference point, makes the interpolated point B of this interpolated point and a upper interpolation cycle simultaneously
1line and the error between given curve as far as possible little.As can be seen here, only have when the amount of exercise of each axle in each interpolation cycle is controlled in the scope that is not more than 1BLU, just likely meet to the full extent the requirement of interpolation precision.In order to reach this purpose, the present invention is considered as linear axis resultant motion a mass motion, the motion of three rotating shafts is considered as to three independently motions, from these four motions, is chosen at given parameters interval [0, u
e] interior arc length the maximum moves as benchmark, benchmark length, the motion of its excess-three interpolation of synchronizeing with the proportionate relationship maintenance equal proportion of benchmark motion arc length by it of a BLU of only interpolation of moving in each interpolation cycle.
In order to establish the synchronous interpolation relation of six axles, need to rewrite curve representation formula.For three linear axis i=1,2,3, because its resultant motion track is exactly a curve in three dimensions, therefore three linear axis to be considered depending on as a whole, j=1 is for comprising three linear axis i=1, the resultant motion of 2,3 translational motions in definition motion; And three rotating shaft i=4,5,6 effect is the attitude relation between adjustment instrument and workpiece, and the distance of each point and pivot is different on instrument, make the movement locus that on instrument, each point produces in workpiece coordinate system all different, if therefore take, the angular displacement of rotating shaft motion being turned to displacement of the lines will make Interpolation Process become extremely complicated with the scheme that the motion merging of linear axis is considered again, in order to simplify Interpolation Process, each rotating shaft is independently considered, definition motion j=4,5,6 are respectively three rotating shaft i=4,5,6 rotatablely move.The mode of each axle relation of processing like this is mainly the processing method of the translational motion of three linear axis different from the difference of traditional data sampling method: traditional data sampling method is equivalent to three linear axis i=1, and 2,3 translational motion is divided into independently three motion j=1,2,3 consider, its principle as shown in Figure 2, six motion j=1,2,3,4,5,6 and six axle i=1,2,3,4, relation between 5,6 as shown in Figure 3; The present invention is by three linear axis i=1, and 2,3 translational motion synthesizes a motion to be considered, its principle as shown in Figure 4, four motion j=1,4,5,6 and six axle i=1,2,3,4,5, the relation between 6 is as shown in Figure 5.S wherein
jand L
j(j=1,2,3,4,5,6) are respectively arc length parameters and the arc length of motion j in present instruction of motion j, and unit is BLU.In data sampling method and method of the present invention, the interpolation progress of each motion (is arc length parameters s
j) between proportionate relationship be all by the arc length L of each motion in present instruction
jbetween proportionate relationship determine.In the present invention, the arc length parameters s of four motions
jbetween (j=1,4,5,6), by parameter of curve u, form contact.For linear axis resultant motion j=1, parameter of curve u and arc length parameters s
1between be related to u=u (s
1) by how much, naturally establish:
For three rotating shaft motion j=4,5,6, be defined as following expression:
x
j(u(s
j))=x
js+sgn(x
je-x
js)·sj,s
j∈[0,|x
je-x
js|],j=4,5,6(3)
The increment of coordinate absolute value of rotating shaft motion and the 1:1 corresponding relation of its arc length parameters increment have been stipulated thus.(3) formula is actually the another kind of expression way of (1) formula.The synchronism of four motions requires four arc length parameters to meet following relation exactly:
Simultaneous (2) formula and (4) formula just can be established u=u (s
j) relationship between expression of (j=4,5,6).In sum, curve representation formula is rewritten as following form:
s
j∈[0,L
j],j=1,4,5,6(5)
Thereby established the synchronous interpolation relation of six axles.
The invention provides a kind of six-axis linkage interpolating method for spark machined, it is characterized in that, comprise the steps:
Step 1: parameter initialization;
From numerical control code, read in interpolation instruction and coordinate figure be converted into the form with pulse equivalency BLUWei unit, determine the parameter curve expression formula of a working motion track:
s
j∈[0,L
j],j=1,4,5,6
Wherein, u is described parameter of curve, x
1, x
2x
3, x
4, x
5, x
6represent respectively X, Y, Z, A, B, the coordinate figure of six reference axis of C, wherein, X, Y, Z is three linear axis, A, B, C is three rotating shafts, and the translational motion of described three linear axis is synthesized to a motion, described three rotating shaft self-movements, described three linear axis and three rotating shafts form four motions, s
jand L
j, j=1 wherein, 4,5,6, be respectively arc length parameters and the arc length of motion j in present instruction of motion j, unit is BLU, x
is(i=4,5,6) are the rotating shaft starting point coordinates of described curve; x
ie(i=4,5,6) are the rotating shaft terminal point coordinates of described curve, described arc length parameters s
jbe the interpolation progress of each motion, the arc length parameters s of four motions
j, j=1 wherein, 4,5,6, between by parameter of curve u, form contact;
Read in the arc length L of linear axis resultant motion geometric locus
1, with described BLUWei unit, calculate rotating shaft movement angle L
i, with described BLUWei unit, i=4,5,6;
Initialization arc long parameter s
1, s
4, s
5, s
6;
Step 2: ask benchmark motion j
ref, obtain benchmark arc length simultaneously
and calculate each motion j the arc length increment Delta s of unit
j, wherein, j=1,4,5,6;
Step 3: each motion Yi Ge unit's arc length increment that advances, calculate each axle feeding pulse and direction, according to interpolation direction, upgrade described arc length parameters value: s
j±=Δ s
j, wherein, j=1,4,5,6, when getting positive sign, reverse interpolation when forward interpolation, " ± " number get negative sign;
Step 4: end point judging, with described arc length parameters s
jfor foundation is differentiated: if
interpolation finishes; Otherwise when starting, next interpolation cycle proceeds to step 3.
In better embodiment of the present invention, the described rotating shaft movement angle in described step 1 is calculated as: L
i=| x
ie-x
is|, i=4,5,6.
In better embodiment of the present invention, the described arc length parameters initial value in described step 1 is set to: s
1=s
4=s
5=s
6=0.
In better embodiment of the present invention, the described benchmark motion calculation in described step 2 is:
wherein, j=1,4,5,6.
In better embodiment of the present invention, described in described step 2, unit arc length increment is calculated as
j=1 wherein, 4,5,6.
In better embodiment of the present invention, described each axle feeding pulse in described step 3 and the calculating of direction comprise: by solving the differential equation
Obtain new parameter value u (s
1± Δ s
1), then by described new parameter value u (s
1± Δ s
1) substitution formula Δ x
k=[x
k(u (s
1± Δ s
1))]-[x
k(u (s
1))] calculate described pulse and the described direction of linear axis described in each in (k=1,2,3); By Δ x
i=[x
i(u (s
i)) ± sgn (x
ie-x
is) Δ s
i]-[x
i(u (s
i))] (i=4,5,6) calculate described pulse and the described direction of rotating shaft described in each; Wherein [], for rounding symbol, gets negative sign when " ± " number gets positive sign, reverse interpolation when forward interpolation.
As shown in Figure 6, the six-axis linkage interpolation effect of the inventive method as shown in Figure 7 for six-axis linkage interpolation effect based on data sampling method.Aspect motion smoothing: data sampling method, in the velocity discontinuity of straightway joining place (as A point), will be brought larger impact to high-speed motion; The arc length parameters increment of the present invention's each motion in the process of interpolation remains unchanged, and interpolation rate uniformity has guaranteed the ride comfort of motion.Aspect interpolation precision: data sampling method, when interpolation curve, must first be used little straightway approximating curve (this will cause action error ε), less straightway is done to smart interpolation, and its error of interpolation is the stack of action error and smart error of interpolation; The present invention directly carries out smart interpolation along curve, only comprises smart error of interpolation.In addition,, if the little straightway G code of data sampling method is generated in advance by CAM, the G code of large length will take a large amount of memory spaces; Method of the present invention only needs a G code instruction just can represent a complete parameter curve, can reduce in a large number the required memory space of numerical control code.
The present invention's arc length parameters increment of each motion in each interpolation cycle remains unchanged, wherein the arc length parameters increment perseverance of benchmark motion is a pulse equivalency, the interpolation rate uniformity of bringing has thus guaranteed the ride comfort of motion, and in each interpolation cycle, the amount of exercise of each axle is not more than a pulse equivalency, error of interpolation can be controlled to the close scope of least unit length determining with lathe resolution ratio.What be applicable to interpolation rate uniformity and interpolation precision to have relatively high expectations comprises linear axis and rotating shaft in interior multi-shaft interlocked space curve interpolation.
Below with reference to accompanying drawing, the technique effect of design of the present invention, concrete structure and generation is described further, to understand fully object of the present invention, feature and effect.
Accompanying drawing explanation
Fig. 1 is the implication key-drawing of interpolation;
Fig. 2 is the interpolation principle figure of traditional data sampling method;
Fig. 3 is each movement relation schematic diagram of traditional data sampling method;
Fig. 4 is the interpolation principle figure of method of the present invention;
Fig. 5 is each movement relation schematic diagram of the inventive method;
Fig. 6 is the effect schematic diagram of traditional data sampling method;
Fig. 7 is the effect schematic diagram of the inventive method;
Fig. 8 is the interpolating method flow chart of a preferred embodiment of the present invention;
Fig. 9 is the arc length increment Delta s of unit of the linear axis resultant motion of a preferred embodiment of the present invention
1projection on each axle is not more than the schematic diagram of 1BLU;
Figure 10 preferred embodiment of the present invention and traditional data sampling method error comparison diagram.
The specific embodiment
In the present invention's one specific embodiment, the resolution ratio of three linear axis X, Y, Z is 0.001mm/BLU, and the resolution ratio of rotating shaft A and B is 0.001 °/BLU, and the resolution ratio of rotating shaft C is 0.00036 °/BLU.Linear axis resultant motion (j=1) curve is a section in a B-spline Curve, origin parameters u
s=0, endpoint parameter u
e=0.007, arc length L
1=239BLU, control point is followed successively by:
Starting point and the terminal of A axle motion (j=4) are respectively x
4s=-0.4 °=-400BLU, x
4e=-0.6 °=-600BLU; Starting point and the terminal of B axle motion (j=5) are respectively x
5s=0.1 °=100BLU, x
5e=0.13 °=130BLU; Starting point and the terminal of C axle motion (j=6) are respectively x
6s=0.9 °=2500BLU, x
6e=1.05 °=2917BLU.
As shown in Figure 8, concrete steps are as follows for the concrete implementing procedure of interpolation:
Step 1, parameter initialization.
Particularly, from numerical control code instruction, read in the control point of linear axis resultant motion curve and starting point and the terminal that A, B, tri-rotating shafts of C move, determine as follows in the expression formula of the curve of (5) formula:
s
j∈[0,L
j],j=1,4,5,6
N wherein
k, 3(u) be B-spline Curve basic function.Read in the arc length L of linear axis resultant motion geometric locus
1=239BLU, by L
j=| x
je-x
js|, j=4,5,6 calculate rotating shaft movement angle:
L
4=|x
4e-x
4s|=200BLU,
L
5=|x
5e-x
5s|=30BLU,
L
6=|x
6e-x
6s|=417BLU。
Initialization arc long parameter: s
1=s
4=s
5=s
6=0.
Step 2, ask the unit arc length increment of each motion in benchmark motion, benchmark arc length and each interpolation cycle.
Particularly, ask benchmark motion j
ref
And the benchmark arc length of YiBLUWei unit
And calculate unit arc length increment of each motion in each interpolation cycle
j=1,4,5,6
Can obtain:
The arc length increment Delta s of unit
jmeet Δ s
j≤ 1BLU.
the select arc length parameters that represents as six-axis linkage curve from four arc length parameters, in each interpolation cycle
in each interpolation cycle, the increment of i axle is Δ s by the length of the motion j that comprises it
jthe projection of curved section on i axle, this has just guaranteed the amount of exercise≤1BLU of each axle in each interpolation cycle.Linear axis motion j=1 has comprised i=1, the motion of 2,3 three axles, Δ s in each interpolation cycle
1≤ 1BLU, Δ s
1at x
1, x
2and x
3projected length Δ s on axle
11, Δ s
12with Δ s
13all be not more than 1BLU, as shown in Figure 9.For rotating shaft motion j=4,5,6, because they only comprise respectively an axial coordinate x
j, so Δ s
jprojection on j axle is exactly Δ s
jitself, so projected length is also all not more than 1BLU.
Step 3, each motion Yi Ge unit's arc length increment that advances, calculates each axle feeding pulse and direction.Be subject to the restriction of lathe resolution ratio, the integer that each coordinate of interpolated point can only Qu YiBLUWei unit, so the interpolated point of curve at parameters u place is exactly
([x
1(u)],[x
2(u)],[x
3(u)],[x
4(u)],[x
5(u)],[x
6(u)])
T,
Wherein [] for rounding symbol, it is that curve is in the reference point at parameters u place
r(u)=(x
1(u),x
2(u),x
3(u),x
4(u),x
5(u),x
6(u))
T
The best approach a little.For the synthetic curve movement of linear axis, by by new arc length parameters value s
1± Δ s
1the solution of the substitution differential equation (2) obtains the new parameter value u (s of curve
1± Δ s
1), then by new parameter value u (s
1± Δ s
1) substitution (5) formula, calculate pulse and the direction thereof of each linear axis:
Δx
i=[x
i(u(s
1±Δs
1))]-[x
i(u(s
1))],i=1,2,3
For rotating shaft, by (5) formula, can obtain pulse and direction thereof:
Δx
i=[x
i(u(s
i))±sgn(x
ie-x
is)·Δs
i]-[x
i(u(s
i))],i=4,5,6
By Δ x
icalculating formula visible | Δ x
i| be an integer, represent the pulse of i axle in this interpolation cycle, and | Δ x
i|≤1, and Δ x
isymbol sgn (Δ x
i) represent the direction of i axle in this interpolation cycle.Will | Δ x
i| and sgn (Δ x
i) export i axle (i=1,2,3,4,5,6) motor to, drive lathe component movement.According to interpolation direction, upgrade the arc length parameters value of motion j, that is:
s
j±=Δs
j,j=1,4,5,6
Particularly, for linear axis resultant motion curve, by u (s
1± Δ s
1) expression formula at s
1place makes the second Taylor series approximate solution equation (2), the new parameter value of calculated curve:
Use de Boor algorithm to calculate the new reference point coordinate figure of B-spline curves
r(u(s
1±Δs
1))=x
1(u(s
1±Δs
1)),x
2(u(s
1±Δs
1)),x
3(u(s
1±Δs
1))
T,
Calculate again pulse and the direction thereof of each linear axis:
Δx
i=[x
i(u(s
1±Δs
1))]-[x
i(u(s
1))]=[x
i(u(s
1±0.573))]-[x
i(u(s
1))],i=1,2,3
Calculate pulse and the direction thereof of each rotating shaft:
Δx
4=[x
4(u(s
4))±sgn(x
4e-x
4s)·Δs
4]-[x
4(u(s
4))]=[x
4(u(s
4))±(-0.480)]-[x
4(u(s
4))]
Δx
5=[x
5(u(s
5))±sgn(x
5e-x
5s)·Δs
5]-[x
5(u(s
5))]=[x
5(u(s
5))±0.072]-[x
5(u(s
5))]
Δx
6=[x
6(u(s
6))±sgn(x
6e-x
6s)·Δs
6]-[x
6(u(s
6))]=[x
6(u(s
6))±1.000]-[x
6(u(s
6))]
By pulse signal | Δ x
i| and direction signal sgn (Δ x
i) export i axle (i=1,2,3,4,5,6) motor to, drive lathe component movement.By Δ s
jadd s
jin to upgrade the arc length parameters value of motion j, that is:
s
j±=Δs
j,j=1,4,5,6
Step 4, end point judging.Take arc length parameters as according to differentiating: if
interpolation finishes; Otherwise when starting, next interpolation cycle proceeds to step 3.
Particularly, if s
6>=417, interpolation finishes; Otherwise when starting, next interpolation cycle proceeds to step 3.
As shown in figure 10, wherein the curve sampling interval arc length of data sampling method is taken as 10BLU to the error comparable situation of the omnidistance forward interpolation of the omnidistance forward interpolation result of above-described embodiment and the six-axis linkage based on data sampling method result.Because the mode that data sampling method is used straightway to approach sampling curve section is carried out rough interpolation, again the straightway generating carried out to smart interpolation, the present invention directly carries out smart interpolation to curve, so the error that error ratio the present invention of data sampling method produces is large.In addition,, if the little straightway of data sampling method is generated in advance by CAM system, need 24 G code instructions could explain the geometric locus in the present embodiment; And the present invention only needs 1 G code instruction just can represent this curve, greatly saved the consumption of memory space.
More than describe preferred embodiment of the present invention in detail.Should be appreciated that those of ordinary skill in the art just can design according to the present invention make many modifications and variations without creative work.Therefore, all technical staff in the art, all should be in the determined protection domain by claims under this invention's idea on the basis of existing technology by the available technical scheme of logical analysis, reasoning, or a limited experiment.