The digital control system asymmetric loads integration circular interpolation method
Technical field
The present invention relates to a kind of digital control system asymmetric and load integration circular interpolation method, belong to the digital control processing technique field of digital control system.
Background technology
The digital control system that traditional integration circular interpolation method can not be used for having relatively high expectations.The target of basic pulse interpolation is when satisfying performance need, to reduce the complicacy of system cost and computing, makes system adopt cheap processor and simple middle small scale integrated circuit as far as possible, reduces the lathe cost.But can't use in the system that has relatively high expectations, reason is: if 1. system realizes with hardware, though can solve the problem of process velocity, can't carry out very complicated interpolation and calculate, system's interpolation performance is affected; If 2. adopt software to realize interpolation, if algorithm is simple, then interpolation precision is not high, and interpolation has influenced speed of feed often; If complex algorithm, then interpolation precision is high, but the execution time is long, and operand is big, also can influence speed of feed.It is thus clear that improper if algorithm is selected, the software interpolation makes system be difficult to process velocity and the precision that reaches higher.
Therefore, it is big to change traditional integration interpolation error, and each pulse output is very inhomogeneous, when improving speed of feed and interpolation precision, does not increase the complicacy of interpolation algorithm, is the objective of the struggle that enlarges the economical NC machine tool scope of application.
At present, digital control system integration circular interpolation job operation mainly contains following several kinds:
Referring to Fig. 1, introduction be a kind of one section circular arc AB of traditional integration circular interpolation method processing, radius R is 7.Traditional integration circular interpolation error might be greater than a pulse equivalency; Reason is that the frequency of digital integration overflow pulse is directly proportional with the poke of integrand register; When near coordinate axis, carrying out interpolation; The integrand value of an integrator approaches zero, and the integrand value of another integrator is near maximal value.Like this, the latter possibly overflowed continuously, and the former does not almost have overflow pulse, and the overflow pulse speed of two integrators differs greatly, and causes interpolation track deviation theory curve.
During process finishing, the actual cutter location of cutter is B ' (5,6), rather than ideal point B (5,5), this by the interpolation error shine into.And the interpolation maximum error is not at B ', sees that from the interpolation track maximum interpolation error produces at the C point, and the interpolation error is:
The mismachining tolerance of traditional obviously integration interpolating method is sometimes greater than a pulse equivalency.
Referring to Fig. 2, introduction be a kind of one section circular arc of processing when two axles all adopt false add to carry, can find out point (6,20) from the furthest of circular arc, and error is the poor of maximum distance and arc radius, is
Greater than 0.88 pulse equivalency.
Also have least deviation interpolation algorithm and direct acceleration and deceleration control method etc. in addition.But complex algorithm is higher to hardware requirement, has improved the cost of lathe.
Summary of the invention
The present invention provides a kind of digital control system asymmetric to load integration circular interpolation method, and purpose is to guarantee that the interpolation number of times obviously reduces, and makes each output shaft pulse distribution more even under the situation that the interpolation algorithm complexity does not improve.Compare with traditional integration circular interpolation method, when interpolation rate improved, interpolation precision doubled, but the lathe cost does not improve; Can be suitable for various open-loop control systems, enlarge the scope of application of economical NC machine tool.
For realizing above-mentioned purpose, the technical scheme that the present invention adopts is following: a kind of digital control system asymmetric loads integration circular interpolation method, adopts a kind of loading method of asymmetric to increase the numerical value in the integration totalizer; The integration totalizer initialize that is about to the direction of principal axis feeding of circular arc starting point place is 2/3rds a smallest positive integral more than or equal to this direction maximal increment value, and is 1/2nd maximum integer smaller or equal to this direction maximal increment value at the integration totalizer initialize of an other direction of principal axis feeding; Operation steps is following:
(1) in y axle and x axle integrand register, deposits x, the initial value x of y
0, y
0, s
xAnd s
yBe respectively the integration totalizer of x axle and y axial coordinate direction, totalizer control capacity is q=max (x
0, y
0, x
e, y
e), adopt a kind of loading method of asymmetric to increase the numerical value in the integration totalizer; With the integration totalizer initialize of circular arc starting point place direction of principal axis feeding is 2/3rds smallest positive integral more than or equal to this direction maximal increment value, and is 1/2nd maximum integer smaller or equal to this direction maximal increment value at the integration totalizer initialize of an other direction of principal axis feeding; For example when at the contrary circular interpolation of the 1st quadrant the direction of feed of x axle and y axle be respectively-x and+the y direction; With circular arc starting point place direction of principal axis is x to integration totalizer initialize for 2/3rds smallest positive integral more than or equal to x direction maximal increment value, promptly rounds up; Note is done:
And the initial value of the axial integration totalizer of y is 1/2nd a maximum integer smaller or equal to y direction maximal increment value, promptly rounds downwards; Note is done:
In like manner, if the 1st quadrant is along circular interpolation, then
R is an arc radius;
(2) after interpolation clock sent a pulse, EOP (end of program) " wait " state began to calculate x axle integration s
xThe overflow pulse that draws that adds up of the number of each integrand register and the number of its totalizer is dealt into respective direction; The overflow pulse that draws that adds up of the number of the number of x axle integrand register and its totalizer is dealt into-the x direction during like the contrary circular interpolation of first quartile, and the overflow pulse that draws that adds up of the number of the number of y axle integrand register and its totalizer is dealt into+the y direction; The overflow pulse that draws that adds up of the number of first quartile x axle integrand register when the circular interpolation and the number of its totalizer is dealt into+the x direction, and the overflow pulse that draws that adds up of the number of the number of y axle integrand register and its totalizer is dealt into-the y direction;
(3) coordinate figure in the integrand register is revised; Integrator is made up of totalizer and integrand register, is depositing the instantaneous value of coordinate in the integrand register at any time; During like the contrary circular interpolation of first quartile, when the x direction is sent the feeding pulse, make y axle integrand content of registers subtract 1; When the y direction is sent the feeding pulse, make x axle integrand content of registers add 1;
(4) end point judging of circular interpolation; When the step number of certain coordinate axis feeding equates with the absolute value of the difference of terminal point and starting point coordinate, explain that this axle reaches home, pulse output is not being arranged; After two coordinates are all reached home, i.e. N=|x
e-x
0|+| y
e-y
0|, then computing finishes, and interpolation is accomplished.
Description of drawings
Fig. 1 is conventional digital integration circular interpolation cutting tool path figure.
Fig. 2 is false add integration circular interpolation cutting tool path figure when carrying.
Fig. 3 is reference examples 1 conventional digital integration circular interpolation cutting tool path figure.
Fig. 4 is reference examples 1 a conventional digital integration circular interpolation x axle pulse distribution oscillogram.
Fig. 5 is reference examples 1 a conventional digital integration circular interpolation y axle pulse distribution oscillogram.
Fig. 6 is that embodiment 1 asymmetric loads integration circular interpolation cutting tool path figure.
Fig. 7 is that embodiment 1 asymmetric loads integration circular interpolation x axle pulse distribution oscillogram.
Fig. 8 is that embodiment 1 asymmetric loads integration circular interpolation y axle pulse distribution oscillogram.
Fig. 9 is that the first quartile asymmetric loads contrary circular arc integration interpolation process flow diagram.
Figure 10 is reference examples 2 conventional digital integration circular interpolation x axle pulse distribution oscillograms.
Figure 11 is reference examples 2 conventional digital integration circular interpolation y axle pulse distribution oscillograms.
Figure 12 is that embodiment 2 asymmetrics load integration circular interpolation cutting tool path figure.
Figure 13 is that embodiment 2 asymmetrics load integration circular interpolation x axle pulse distribution oscillogram.
Figure 14 is that embodiment 2 asymmetrics load integration circular interpolation y axle pulse distribution oscillogram.
Embodiment
Below in conjunction with reference examples, accompanying drawing and embodiments of the invention scheme of the present invention and effect are described further.
Reference examples 1:
With traditional integration interpolating method the contrary circular arc AB of first quartile is carried out interpolation, the starting point coordinate of circular arc AB is A (20,0), and terminal point coordinate is B (0,20), adopts five binary registers and totalizer, scale-up factor q=32 then, and the processing total step number is N=|x
e-x
0|+| y
e-y
0|=| 0-20|+|20-0|=40.Its interpolation track is as shown in Figure 3, and x axle pulse distribution waveform is as shown in Figure 4, and y axle pulse distribution waveform is as shown in Figure 5.
Embodiment 1:
Load integration circular interpolation method with asymmetric circular arc AB is carried out interpolation, the starting point coordinate of circular arc AB is A (20,0), and terminal point coordinate is B (0,20), then scale-up factor q=max (x
0, y
0, x
e, y
e)=max (20,0,0,20)=20, its interpolation track is as shown in Figure 6, and x axle pulse distribution waveform is as shown in Figure 7, and y axle pulse distribution waveform is as shown in Figure 8.
Circular arc AB is carried out interpolation, and through relatively drawing, the interpolation number of times of traditional quadrature circular interpolation method is 51 times; The interpolation number of times that asymmetric loads integration circular interpolation method is 31 times.The interpolation number of times has reduced 39.216%.
Fig. 3 and Fig. 6 compare, and error is
it is thus clear that interpolation precision is doubled for
asymmetric loads the interpolation of integration circular interpolation method maximum can to calculate traditional quadrature circular interpolation maximum interpolation error.
Fig. 7 and Fig. 4 compare, and the pulse of traditional quadrature circular interpolation x axle does not have clear regularity property, and the largest interval that pulse is not exported is 12, and is very inhomogeneous; The more past afterpulse output of pulse of asymmetric loading integration circular interpolation method x axle is continuous more, and the largest interval that pulse is not exported is 4, and is more even.
Fig. 8 and Fig. 5 compare, and the recurrent interval of traditional quadrature circular interpolation y axle is 4 pulse equivalencies to the maximum; The recurrent interval that asymmetric loads integration circular interpolation method y axle is 2 pulse equivalencies, and is more even.
For the contrary circular interpolation of first quartile, its interpolation process flow diagram is as shown in Figure 9.
Reference examples 2:
Referring to Fig. 1, be one section circular arc AB that a kind of traditional integration circular interpolation method is processed, the starting point coordinate of circular arc AB is A (7,1), terminal point coordinate is B (5,5), adopts triad register and totalizer, then scale-up factor q=8.It is B ' (5,6) that interpolation finishes the actual cutter location in back, declines on terminal point coordinate B (5,5) point.The interpolation maximum error is:
Its x axle pulse distribution waveform is shown in figure 10, and y axle pulse distribution waveform is shown in figure 11.
Embodiment 2:
Load integration circular interpolation method with asymmetric circular arc AB is carried out interpolation, the starting point coordinate of circular arc AB is A (7,1), and terminal point coordinate is B (5,5), and then pulse number is q=max (x
0, y
0, x
e, y
e)=max (7,1,5,5)=7, its interpolation track is shown in figure 12.Circular arc AB is carried out interpolation, and through relatively drawing, the interpolation number of times of traditional quadrature circular interpolation method is 6 times; The interpolation number of times that asymmetric loads integration circular interpolation method is 4 times, and the interpolation number of times has reduced 33.333%.Compare with Fig. 1, interpolation finishes the actual cutter location in back and has dropped on just on terminal point coordinate B (5, the 5) point.X axle pulse distribution waveform is shown in figure 13, compares with Figure 10, and maximum impulse is reduced to 2 by 5 at interval.Y axle pulse distribution waveform is shown in figure 14, compares with Figure 11, and pulse is output continuously.The interpolation error is:
It is thus clear that interpolation precision has improved more than two times.
Asymmetric loading integration circular interpolation for contrary circular arc of any quadrant or suitable circular arc is identical with the bulk billing system of Fig. 9; Be that integrand is an absolute value, just the positive negative direction of the distribution of feeding pulse and circular interpolation are made+1 or-1 correction difference to instantaneous value x, the y of moving coordinates.Load mode all is that the integration totalizer initialize of circular arc starting point place direction of principal axis feeding is 2/3rds smallest positive integral more than or equal to this direction maximal increment value, and is 1/2nd maximum integer smaller or equal to this direction maximal increment value at the integration totalizer initialize of an other direction of principal axis feeding.Loading initial value, pulse distribution and the coordinate correction of quadrant are as shown in table 1 arbitrarily.
Table 1 loading initial value, pulse distribution and the coordinate of quadrant is arbitrarily repaiied down
The present invention has carried out repeatedly the embodiment test, and the real data that embodiment obtains proves, compares with traditional integration circular interpolation; Asymmetric loads back interpolation algorithm difficulty and does not improve; But the interpolation number of times obviously reduces, and pulse distribution is more even, and interpolation rate improves; The lathe cost does not improve, and machining precision is enhanced about more than once.Realized the purpose of invention.