Summary of the invention
At above shortcomings in the prior art, the technical problem to be solved in the present invention provides a kind of speed connection method that is used for digital control system, corner angle, the desired machining precision of user, each peak acceleration and the speed connection method that is used for digital control system of regulating the intersegmental corner of work procedure process velocity along the intersegmental rate conversion length of the work procedure of each automatically between its work procedure that produces according to CAD/CAM.
For solving the problems of the technologies described above, the technical solution used in the present invention is:
A kind of speed connection method that is used for digital control system of the present invention has following steps:
The digital control system work procedure is carried out dynamic pre-read processing, and the rate conversion length that obtains between the adjacent workpieces program segment is connected error with the turning;
According to the initial connect-speed between the desired machining precision calculating of programming speed of feed, the user adjacent workpieces program segment of turning connection sum of errors work procedure;
Automatically regulate connection speed between the adjacent workpieces program segment according to the rate conversion length between the peak acceleration that sets in advance each axis servomotor of digital control system, adjacent workpieces program segment and the initial connect-speed between the adjacent workpieces program segment.
Described dynamic pre-read processing may further comprise the steps:
If total line number of work procedure is n, the approximate all long l that is
Ave, it is p that the reading in advance of work procedure handled line number
n, read to handle line number in advance by what following formula calculated work procedure:
(12)
Wherein v is the programming speed of feed of work procedure, and Δ t is the digital control system interpolation cycle.
Described rate conversion length is under the condition of each axis servomotor peak acceleration of known digital control system, and digital control system is from a movement velocity v
1Be transformed into another movement velocity v
2The shortest required length of motion route by the peak acceleration of each axis servomotor, starting velocity, termination speed and the realization deceleration planning method that rate conversion adopted of rate conversion, is asked for corresponding rate conversion length.
It is the processing work surface configuration deviation e that the user can allow in digital control system speed connection procedure that described turning connects error, calculates by following formula:
(8)
Wherein v is the programming speed of feed of work procedure, and Δ t is the digital control system interpolation cycle, and θ is the intersegmental corner angle of adjacent programs.
Described calculating initial connect-speed v
LinkCalculate by following formula:
(16)
Wherein v is the programming speed of feed of work procedure, and θ is the corner angle between the adjacent workpieces program segment, and Δ t is the digital control system interpolation cycle, e
MaxThe maximum turning connection error of setting for the user is the desired minimum machining precision of user.
Connection speed between described automatic adjusting adjacent workpieces program segment may further comprise the steps:
If the first motion speed V of first program segment of work procedure
InitBe zero, establish the termination movement velocity V of last program segment in the dynamic preprocessing process
EndBe zero;
If motion is from first motion speed V
InitBe transformed into and stop movement velocity V
EndBetween required rate conversion length l
cIf the length l of>work procedure section is and first motion speed V
Init<termination movement velocity V
End, utilize known work procedure section operation initial velocity V
InitWith work procedure segment length l, with reference to asking for the rate conversion length l
cMethod, obtain under the situation of given length l the highest termination speed V that motion can reach from initial velocity
End', and make V
End=V
End', connection speed is regulated termination automatically.
If first motion speed V
Init>termination movement velocity V
End, by asking for the rate conversion length l
cMethod, obtain at given length l and stop movement velocity V
EndSituation under, the motion the highest first motion speed V that can reach
Init', and make V
Init=V
Init', change the termination movement velocity V of adjacent previous work procedure section
End=V
Init', and under new termination movement velocity condition, regulate the first motion speed of adjacent previous work procedure section by the automatic regulating step of motion connection speed;
Above-mentioned steps is carried out repeatedly, regulates end condition automatically up to satisfying connection speed.
The described execution repeatedly is meant in the speed adjustment process of current work procedure section, automatically regulate end condition if can't satisfy connection speed, then trace back to its adjacent previous or preceding several work procedure sections, till satisfying connection speed and regulating end condition automatically.
If motion is from first motion speed V
InitBe transformed into and stop movement velocity V
EndBetween required rate conversion length l
cThe length l of≤work procedure section regulates stopping automatically.
The present invention has following beneficial effect and advantage:
1. carry out the efficient height.The inventive method on the basis of avoiding the data famine, has greatly improved the execution efficient of numerically-controlled machine by " dynamic pre-read processing " function.
2. machining precision height.The inventive method is introduced the notion of " turning connection error ", guarantees that the connection error of any place, the intersegmental turning of work procedure generation in the numerically-controlled machine motion process satisfies user's requirement on machining accuracy, has improved the control accuracy of system.
3. smoothness height.The inventive method adopts the method for " the intersegmental speed of work procedure is regulated automatically ", avoids the problem of the lifting speed path deficiency that may cause in handling small work procedure section process, and the method that makes can realize speed smooth transition in that work procedure is intersegmental.
4. highly versatile.The inventive method is introduced the notion of " rate conversion length ", at the different acceleration and deceleration method, obtains different speed and regulates parameter automatically, makes the inventive method to match with various acceleration and deceleration algorithm.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail.
Present embodiment is applied to the inventive method in the digital control system in open type motion control speed connection processing partly of blue sky hardware platform, and the acceleration and deceleration mode is selected linear acceleration and deceleration for use, and its operation result has obtained checking on the three-axis numerical control milling machine.
Hardware platform adopts standard industry level IPC integrated circuit board, and 5X86-133MHz CPU constitutes the 4+1 axis controller as system controller by one ten thousand FPGA devices able to programme, and the FPGA device provides other auxiliary circuits such as digital control system I/O simultaneously.
The important technological parameters of test environment is as follows:
Drive: peace river motor ∑ II Series AC servo;
Digital control system: CPU 5X86-133MHz, RAM-32M, FLASH-32M, I/O-32/24, scrambler input-4, D/A output-4, demonstration-10.4 " Color Liquid Crystal Display;
The speed of mainshaft=24000r/min;
Feed rate F=10000mm/min;
Acceleration time=800ms;
Maximum turning connects error=0.1mm;
Interpolation cycle=2ms;
Present embodiment is with the example that is processed as of representative workpiece program " pentagram " type curve.Should mainly be generated by small straight-line segment by " pentagram " type curve, the average length of small straight-line segment is about 0.8mm.
As shown in Figure 1, the present invention's speed connection method of being used for digital control system has following steps:
The digital control system work procedure is carried out dynamic pre-read processing, and the rate conversion length that obtains between the adjacent workpieces program segment is connected error with the turning; According to the initial connect-speed between the desired machining precision calculating of programming speed of feed, the user adjacent workpieces program segment of turning connection sum of errors work procedure; Automatically regulate connection speed between the adjacent workpieces program segment according to the rate conversion length between the peak acceleration that sets in advance each axis servomotor of digital control system, adjacent workpieces program segment and the initial connect-speed between the adjacent workpieces program segment.
Described dynamic pre-read processing may further comprise the steps:
If total line number of work procedure is n, the approximate all long l that is
Ave, it is p that the reading in advance of work procedure handled line number
n, calculate the dynamic pre-read processing line number of work procedure by following formula:
(12)
Wherein v is the programming speed of feed of work procedure, and Δ t is the digital control system interpolation cycle.
Described rate conversion length is under the condition of each axis servomotor peak acceleration of known digital control system, and digital control system is from a movement velocity v
1Be transformed into another movement velocity v
2The shortest required length of motion route is asked for corresponding rate conversion length by the peak acceleration of each axis servomotor, starting velocity, termination speed and the realization deceleration planning method that rate conversion adopted of rate conversion.
It is the processing work surface configuration deviation e that the user can allow in digital control system speed connection procedure that described turning connects error, calculates by following formula:
(8)
Wherein v is the programming speed of feed of work procedure, and Δ t is the digital control system interpolation cycle, and θ is the corner angle between the adjacent workpieces program segment.
The inventive method is at the behavioral characteristics of controlled device, introduces the notion of " dynamic pre-read processing ", and according to total line number of work procedure and all long, the pretreated work procedure hop count of dynamic calculation is read processing in advance to work procedure before motion is carried out; Introduce the notion of " rate conversion length " and " turning is connected error ", the connection speed of corner between control adjacent workpieces program segment; The interpolation cycle that the maximum turning that utilizes the corner angle, user of adjacent workpieces program segment in the work procedure to set connects error, programming speed of feed and digital control system obtains the initial connect-speed between the adjacent workpieces program segment; Different acceleration and deceleration mode by initial connect-speed and user adopt can obtain the rate conversion length between the adjacent workpieces program segment; Adopt the intersegmental connection speed Automatic adjustment method of work procedure,, regulate the connection speed between the adjacent workpieces program segment, realize the intersegmental speed smooth transition of work procedure according to the length of work procedure section and the rate conversion length of asking.Concrete speed connection method is as follows:
1) dynamic pre-read processing method:
The connection of digital control system speed can be guaranteed satisfying under the situation of error requirements in the inventive method, and lathe is with the fastest speed operation.Before motion is carried out, must determine the connection speed between the adjacent workpieces program segment, therefore need read in advance to handle to the work procedure section.Especially, in the processing of complex curve and curved surface, come the match complex curve with small straight-line segment or circular arc usually, the work procedure quantity that CAD/CAM generates is many, all long little, if read the work procedure hop count deficiency handled in advance, be easy to cause data famine in the motion process.Otherwise, if it is too much to read the work procedure hop count handled in advance, then prolonged reading the processing time in advance of work procedure, reduced the execution efficient of digital control system.So propose the dynamic pre-read processing method among the present invention,, dynamically arrange pre-treated workpiece program hop count according to the feature of different workpieces program.
The programming speed of feed of known work procedure is v, and the digital control system interpolation cycle is Δ t.If total line number of work procedure is n, the approximate all long l that is
Ave, the work procedure section read to handle line number p in advance
nExpression.For fear of the data famine, needs guarantee the work procedure segment length that the pre-service length of work procedure section has been processed or carried out greater than reality, i.e. any time T that moves at work procedure:
(9)
Abbreviation can get:
(10)
Because in the work procedure operational process, to carry out the process of acceleration and deceleration at least, again so the total execution time T of work procedure
TopSatisfy:
(11)
Obtain in order to guarantee the data famine in the work procedure operational process, not occur, can be similar to:
(12)
By formula (12) as can be seen, the reading in advance of work procedure handled hop count and is directly proportional with total line number of work procedure, is inversely proportional to the average length of work procedure.
2) introduce " rate conversion length ":
Described rate conversion length refers to that under the condition of each axis servomotor peak acceleration of known digital control system digital control system is from a movement velocity v
1Be transformed into another movement velocity v
2The shortest required length of motion route is used l in the present invention
cExpression.Rate conversion length is transformed by the termination speed of the starting velocity of the peak acceleration of each axis servomotor, conversion, conversion and realization speed mainly that the acceleration and deceleration mode that adopted determines.At different acceleration and deceleration modes, different rate conversion length solution formulas is arranged.Present embodiment is an example with the linear acceleration and deceleration, and the method for solving of rate conversion length is described.
As shown in Figure 2, wherein the area of dash area by being asked linear acceleration and deceleration rate conversion length.Known linear acceleration and deceleration is at t
1Speed is v constantly
1, at t
2Speed is v constantly
2, the synthetic peak acceleration of each axis servomotor is a, then the rate conversion length l
cFor from speed v
1With peak acceleration a (establish linear acceleration and deceleration the boost phase acceleration on the occasion of, be negative value at the decelerating phase acceleration) be transformed into speed v
2The shortest required motion path.Computing formula is as follows:
(1)
v
2=v
1+a*(t
2-t
1)
Can obtain according to formula (1):
(2)
Following formula is a method of asking for rate conversion length in the linear deceleration planning.The medium velocity transition length value of being considered as known variables of the present invention.In actual applications, according to the deceleration planning method that is used with the inventive method, ask for corresponding rate conversion length.
3) introduce " turning connection error ":
It is the processing work surface configuration deviation that the user can allow in digital control system speed connection procedure that described turning connects error.At different work procedures and processing request, the maximum turning connection error that the user sets digital control system is the desired minimum machining precision of user.Obtain digital control system with the motion of programming speed of feed in the speed connection processing stage, the turning that produces by place, work procedure turning connects error.If this error connects error smaller or equal to the maximum turning that the user sets, then explanation can not influence the machining precision of system with the programming speed of feed by this turning; Otherwise, then illustrate with the programming speed of feed excessively by the error that this turning produces, needing around the corner, reduction of speed passes through.
The programming speed of feed of known work procedure is v, and the corner angle between the adjacent workpieces program segment is θ, and the digital control system interpolation cycle is Δ t, and it is e that the maximum turning that the user sets connects error
MaxThe length of work procedure section is not the integral multiple of processing step-length usually in the process, so corner certainly leads to the connection error at the adjacent workpieces program segment, if is e with maximal rate by the shape error that the adjacent workpieces program segment produces, as shown in Figure 3, the starting point of work procedure section AB and terminal point are respectively an A and some B among the figure, and the starting point of work procedure section BC and terminal point are respectively a B and put C.Cutter is B by the actual motion path at two work procedure section tie point B places
0B
1, then the maximum turning that this moment, system produced connects error for to draw perpendicular to B from the B point
0B
1Vertical line BD, its length is e.If straight-line segment B
0The length of B is l
1, straight-line segment BB
1Length be l
2, straight-line segment B
0B
1Length be l
3, then according to according to sine, Δ B
0BB
1Area can be expressed as:
(3)
Again because BD perpendicular to B
0B
1So,, Δ B
0BB
1Area can be expressed as:
(4)
Can obtain according to the cosine law:
(5)
Can obtain connecting error according to formula (3), (4), (5) and be with the turning that maximal rate produces by the adjacent programs section:
(6)
Again because when digital control system was passed through adjacent programs section turning with maximal rate, the turning that is produced connected the error maximum, so can get:
l
1+l
2≤v*Δt (7)
And if only if
The time, error e obtains maximal value, that is:
(8)
4) computing method of initial connect-speed:
Described calculating initial connect-speed v
LinkCalculate by following formula:
(16)
Wherein v is the programming speed of feed of work procedure, and θ is the corner angle between the adjacent workpieces program segment, and Δ t is the digital control system interpolation cycle, e
MaxThe maximum turning connection error of setting for the user is the desired minimum machining precision of user.
Initial connect-speed depends on that the maximum turning of programming speed of feed, the corner angle between the adjacent workpieces program segment and the customer requirements of work procedure is connected error between the adjacent workpieces program segment.Be specially: the programming speed of feed of work procedure is the maximal value of the intersegmental initial connect-speed of work procedure; Corner angle between the adjacent workpieces program segment is more little, and the intersegmental initial connect-speed of work procedure is big more; It is big more that the maximum turning that the user allowed connects error, and the initial connect-speed between the adjacent workpieces program segment is big more.
According to formula (8), can obtain the intersegmental turning of work procedure and connect error and be:
(13)
Obviously, connection error in turning is connected with the desired maximum turning of user following relation between the error:
e≤e
max (14)
Can get turning connection speed v between the adjacent workpieces program segment by formula (19), (20)
LinkSatisfy following relation:
(15)
Again because the turning connection speed between program segment less than the program speed of work procedure, so:
(16)
5) regulate connection speed between the adjacent workpieces program segment automatically:
As shown in Figure 4, the connection speed of regulating between the adjacent workpieces program segment automatically in the inventive method may further comprise the steps:
If the first motion speed V of work procedure unit one program segment
InitBe zero, establish the termination movement velocity V of last work procedure section in the dynamic preprocessing process
EndBe zero;
If motion is from the first motion speed V of work procedure section
InitBe transformed into and stop movement velocity V
EndBetween required rate conversion length l
cIf the length l of>work procedure section is and first motion speed V
Init<termination movement velocity V
End, utilize known work procedure section operation initial velocity V
InitWith work procedure segment length l, with reference to asking for the rate conversion length l
cMethod, obtain under the situation of given length l, the motion from first motion speed V
InitThe highest termination speed V that can reach
End', and make V
End=V
End', connection speed is regulated termination automatically;
If motion is from the first motion speed V of work procedure section
InitBe transformed into and stop movement velocity V
EndBetween required rate conversion length l
cIf the length l of>work procedure section is and first motion speed V
Init>termination movement velocity V
End, by asking for the rate conversion length l
cMethod, obtain at given length l and stop movement velocity V
EndSituation under, the motion the highest first motion speed V that can reach
Init', and make V
Init=V
Init', the termination movement velocity of changing adjacent previous work procedure section is V
Init', and under new termination movement velocity condition, regulate the first motion speed of adjacent previous work procedure section by the automatic regulating step of motion connection speed;
If motion is from the first motion speed V of work procedure section
InitBe transformed into and stop movement velocity V
EndBetween required rate conversion length l
cThe length l of>work procedure section, according to the definition of rate conversion length as can be known, this moment first motion speed V
InitWith termination movement velocity V
EndInevitable unequal;
Above-mentioned steps is carried out repeatedly, regulates end condition automatically up to satisfying connection speed.
The described execution repeatedly is meant in the speed adjustment process of current work procedure section, automatically regulate end condition if can't satisfy connection speed, then trace back to its adjacent previous or preceding several work procedure sections, till satisfying connection speed and regulating end condition automatically.
If motion is from first motion speed V
InitBe transformed into and stop movement velocity V
EndBetween required rate conversion length l
cThe length l of≤work procedure section regulates stopping automatically.
(horizontal ordinate is unit with the interpolation cycle to the speed planning curve that the existing method of employing obtains as shown in Figure 5, ordinate is represented pairing process velocity, unit is mm/min), and adopt the inventive method speed planning curve as shown in Figure 6, actual processing exemplar is as shown in Figure 7.Can obtain as drawing a conclusion from the contrast of rate curve:
1. our bright speed connection method acceleration and deceleration number of times is few, and rate curve is level and smooth.During processing " pentagram " type curve, the present invention only handles through tens acceleration and deceleration, and classic method needs more than 200 acceleration and deceleration to handle;
2. our bright speed connection method has realized that the intersegmental speed of work procedure connects, and classic method does not realize that the intersegmental speed of work procedure is connected, and speed is zero after every section process finishing;
3. our bright speed connection method process velocity height.Because for identical initialization controlled variable, process velocity on average is approximately about 7000mm/min during the inventive method processing " pentagram " type curve, with the time of about 4000 interpolation cycles, and the classic method process velocity on average is approximately 2600mm/min, has used the time of about more than 10000 interpolation cycles;
4. our bright speed connection method processing shows the smoothness height.In the bright method process of we, speed continuity height, speed is few zero point, has reduced because system start-up, stop the machine vibration to be caused; And the employing classic method, stops frequent caused vibration effect work procedure finished surface smoothness at system start-up.