Int J Adv Manuf Technol (2009) 40:769–775
DOI 10.1007/s00170-008-1390-z
ORIGINAL ARTICLE
Variable-period feed interpolation algorithm
for high-speed five-axis machining
Yuyao Li & Jingchun Feng & Yuhan Wang & Jianguo Yang
Received: 7 August 2007 / Accepted: 8 January 2008 / Published online: 4 March 2008
# Springer-Verlag London Limited 2008
Abstract To alleviate the feed fluctuation and to maintain a
smooth feed in conventional five-axis machining, an
optimal feed interpolation algorithm (look-ahead) is proposed. However, the problem arises where the segment
usually cannot be interpolated exactly in an integer period
because of the nonzero joint feed at the junction. To
overcome this problem, and to achieve faster machining
speed and higher quality parts, this paper presents an
optimal feed interpolation algorithm for high-speed, fiveaxis machining having the function of “look-ahead”, i.e.,
variable-period linear interpolation algorithm. In real
applications, the proposed algorithm results in: (1) constant
speed; (2) high machining accuracy. Moreover, in this
paper, an efficient method for acceleration and deceleration
control is presented to achieve the highest-quality feed
profiles and to shorten machining times. The precision and
speed of machining is improved greatly. Experimental
results verify the effectiveness of the proposed method.
Keywords Five-axis machining . Optimal feed .
Look-ahead algorithm . Variable periods . Linear Interpolation
Y. Li (*) : J. Feng : Y. Wang : J. Yang
School of Mechanical Engineering,
Shanghai Jiao tong University,
Shanghai 200240, PR China
e-mail: liyuyao@sjtu.edu.cn
Y. Wang
State Key Laboratory of Mechanical System and Vibration,
Shanghai Jiao tong University,
Shanghai, PR China
1 Introduction
Five-axis tool paths are currently generated as a set of
discrete data points with commercial CAD/CAM systems.
Post processors perform the inverse kinematics algorithm
on the tool path points, and then transform the tool path
into a series of short linear segments [1]. In the conventional interpolation method, the cutting tool must accelerate
and decelerate at each line segment, and the adjacent linear
segments contour features are overlooked. This method
results in velocity discontinuities at the linear segment
junctions which leads to higher accelerations, poor surface
finish, lower surface accuracy, and longer machining times
[2]. When the linear segments are shorter than the
minimum distance required for the acceleration/deceleration, the CNC machining task may never achieve the
desired feed; it will slow down the cutting speed. However,
the five-axis machining programs generated with the CAD/
CAM system are usually composed of such short linear
segments. As a result, these short linear segments not only
reduce the cutting speed, but they also influence the
machining accuracy because of the feed variation. Therefore, these drawbacks suggest that conventional machining
methods fail to meet the requirements of high-speed, highaccuracy machining in modern industry.
Considering the above-described problems, the smooth
feed optimization scheme has been used in many CNC
machines to minimize the start/stop motions and to achieve a
constant feed rate. In Sect. 2, we discuss some existing
interpolation algorithms and the respective effects. In Sect. 3,
we propose an optimal interpolation algorithm, i.e., a
variable-period feed interpolation algorithm that can overcome the demerits in the existing interpolation algorithms. In
this scheme, the proposed interpolation algorithm is executed
in variable-period length instead of the fixed length in the
770
conventional interpolation algorithm. In Sect. 4, the proposed
algorithm is demonstrated by the experimental results. We
can see that the better machining accuracy is obtained in the
proposed interpolation algorithm than in the conventional
one. The optimized speed contour shows the efficiency of
the proposed interpolation algorithm.
2 Previous work
In order to overcome the disadvantages of conventional
CNC machining methods, the look-ahead scheme has been
used in many CNC machines to minimize the start/stop
motions and to maintain a constant feed rate. This scheme
is realized by analyzing the contour of the consecutive short
linear segments. At the same time, the machining dynamics
is taken into account. This means that hundreds of small
line blocks are read and analyzed in advance to obtain the
smooth continuous motion accommodating the capacity of
the machine tool. Instead of accelerating and decelerating
within each program segment, a joint feed is calculated at
each segment junction to generate a smooth feed profile.
Some work has been done about the look-ahead scheme
[3–6]. Hu et al. [7] presented an optimal velocity model, and
based on it, proposed an algorithm to seek the approximate
optimal feedrate by evaluating the tool path ahead.
However, this scheme has the problem of having some short
linear segments that cannot be discretized exactly in an
integer interpolation period because of the nonzero start
velocity of the segment. So the small remnant that is caused
in the end will cause a position error or speed fluctuation.
Han et al. [8] developed a high-speed machining
algorithm based on the look-ahead interpolation technique
for the machining of a 3D surface obtained by CAD/CAM
system. The proposed algorithm improves the machining
speed without any hardware support and develops the lowcost CNC controller having high-speed machining ability.
However, his algorithm alters the machining path to keep
feed at a constant level. Although the algorithm is able to
maintain a constant feed, it is unfavorable for many
applications since it modifies the design of the product.
Guo [9] introduce a high-speed interpolation algorithm
for consecutive minute linear segments. Firstly, this
algorithm optimizes the manufacturing data without losing
accuracy. Then thinking of the segments’ continuity,
geometric relationship between adjacent segments, acceleration and deceleration capability and manufacturing precision are considered to realize the smooth transition between
segments, limiting the maximum transition feed at the
turning points. Thus the machine tool is avoided from
flexible impacts at its startup, stop or velocity changing.
The feed is controlled smoothly and reasonably. However,
the joint velocity limit has to be very low when a tight
Int J Adv Manuf Technol (2009) 40:769–775
contour error is needed. His algorithm is hard to apply in
finish machining, for the joint velocity is nearly constrained
to zero.
According to Wang et al. [10], when the start velocity of
the segment satisfying some conditions, we can adjust the
feed profile of the conventional interpolation method to
overcome the feed fluctuation. So, A new constrain to the
start velocity of the segment is obtained and the
corresponding adjusting method is proposed. The details
are as follows:
As described in Fig. 1, we can drop the velocity higher
than Va to the velocity Va, that is:
Vij ¼ Va ;
when Vij > Va :
ð1Þ
By adjusting these Vij to Va, the length of the segment in the
first (na +nc +nd) interpolation periods will decrease by Sa.
Obviously, we can find a suitable Va, such that:
Sa ð V a Þ ¼ Se
ð2Þ
In which
Se ¼ Viþ1 ð1
f ÞT
ð3Þ
In this method, we know that Sa has a upper bound
denoted by Sam. So we must ensure that:
Sam Se
ð4Þ
To ensure that the method works, the start feed introduce
the new constrain:
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
li þ 12 16 24p þ 25 76 16 24p þ 25 76 þ 1 aT 2
1 pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 7
Vi
6 24p þ 25
6 þ2 T
ð5Þ
In which: p ¼ aimliT 2
Then, we can obtain a suitable feed profile such that the
segment can be interpolated in integer period, namely, t=
(na+nc+nd+1)T, accommodating the machine tool dynamics. However, because the new constrains are introduced,
Fig. 1 The speed adjusting method
Int J Adv Manuf Technol (2009) 40:769–775
771
the speed programming is more complicated and the
adjusting method is very complicated. So the scheme
requires much more computation.
In this paper, a variable-period feed interpolation
algorithm based on the look-ahead interpolation technique
is proposed to solve the above-mentioned disadvantage.
3 Proposed algorithm
In this paper, to overcome this drawback in the smooth feed
optimization scheme and to achieve faster machining speed
and higher-quality parts, it takes the following constraints
into account and proposed an optimal feed interpolation
algorithm, namely, the variable-period linear interpolation
algorithm based on look-ahead interpolation technique for
high-speed, five-axis machining. The proposed algorithm
will not induce any contour error and the joint velocity is
allowed to a considerable value.
3.1 Machining dynamics and tool path contour constrains
To implement smooth motion during the machining process,
it is necessary to read and analyze a number of segments in
advance. The optimal feed for each segment and the joint
feed for every segment junction should be calculated
according to the contour information of the segments and
the machining dynamics. At the same time, the machining
dynamics limit the speed and acceleration for each axis that
can be realized physically during the machining. These
limits obtained from experiments are called the system
performance envelope representing the machining dynamics
of a specified machine tool. The system performance
envelope is usually simplified as a rectangle zone in realtime interpolation for alleviating calculation burden. Also, in
this paper, the machining dynamics is represented by a fixed
acceleration limit aΛm and a fixed velocity limit VΛm available
to each axis. In the following, the joint feed is calculated
according to the machining dynamics and the analysis of the
segments contour.
the velocity of each axis should be constrained in the
acceleration limits of each axis.
1
Ni
V
ViΛ
ð8Þ
aΛm T
iþ1Λ
4. Two adjacent joint feeds Vi, Vi+1 are constrained by the
linear length li, the upper bound of the translational
composite acceleration aim, the upper bound of the joint
feed at the junction constrained by li and ai is written as
follows:
1 Viþ1
1
þ
Vi Viþ1 þ
2 aim T 2aim T
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ð2Viþ1 aim T Þ2 þ 8aim li 1 aim T
ð9Þ
the lower bound of the joint feed at the junction
constrained by li and aim is written as follows
1 Viþ1
1
þ
Vi Viþ1
2 aim T 2aim T
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ð2Vi þaim T Þ2 8aim li 1 aim T
ð10Þ
3.2 Variable-period interpolation algorithm
3.2.1 The principle of proposed algorithm
Figure 2 shows the Variable-period interpolation algorithm.
In Fig. 2, Vi is the start velocity of the segment (the feed in
the first interpolation period); Vi+1 is the end velocity (the
feed in the last interpolation period); Vc is the command
feed. Parameter t shows the total interpolation time, The
duration of interpolation is t=(na+nc+nd+f )*T, where the
f *T means the none integer interpolation period (last
portion less than one period), 0 ≤ f ≤1. Parameter f ranges
from 0 and 1. So, there will make a small remnant in the
1. The velocity of each axis VijΛ during the machining
should be lower than the velocity limits VΛm:
j
ViΛ
VΛm
ð6Þ
ajiΛ
2. The acceleration of each axis
during the machining
should be lower than the acceleration limits aΛm:
ajiΛ aΛm
ð7Þ
3. Although the feed stays constant at the junction of the
segments, the velocity of each axis changes according
to the contour of the linear segments. The changes of
Fig. 2 The proposed algorithm
772
last interpolation period. Parameter Sf expresses this
remainder length. Sf =Vi+1 *f *T. If we want to obtain an
expected velocity, namely, Vi+1, it is less than one period
(f *T); However, in the previous interpolation scheme, the
amount of the periods must be an integer, then the velocity
of the last interpolation is V ¶i+1 =f *Vi+1, which would cause
big fluctuation, when f is very small.
In the proposed algorithm, we adjust the length of the last
interpolation period to solve the problems. Here, we called it a
Variable-period interpolation algorithm. It means the length of
the interpolation period is variable. The length of the last
interpolation period is f *T instead of T. The detail is as follows:
First: When f *T<0.5T, add the none integer interpolation period f *T to the previous interpolation. So the last
interpolation period T′ range between T with 1.5*T.
Secondly: When 0.5T ≤ f *T<T, regard the f *T as a
signal interpolation. So the last interpolation T ′ range
between 0.5*T with T.
Fig. 3 The flowchart of the
speed programming scheme for
the proposed algorithm
Int J Adv Manuf Technol (2009) 40:769–775
In conclusion, the new interpolation period T′ range
between 0.5*T with 1.5*T.
3.2.2 Deciding the deceleration zone of the proposed
algorithm
To achieve faster machining speed and higher-quality parts,
a smooth feed should be maintained throughout the motion.
An efficient method for acceleration and deceleration
control of servomotors always bring out the maximum
operating capability of a machine equipped with servomotors, such as a robot, NC machine tool, etc. As we know,
the allowable maximum acceleration (am) can generate a
more efficient velocity profile if only the deceleration stage
wound not be performed.
For the long segment, it has the process: acceleration–
constant–deceleration, but for the other ones, only acceleration–deceleration. So, it’s a pivotal factor for acceleration and
Int J Adv Manuf Technol (2009) 40:769–775
773
The present project is made in consideration of the
disadvantages mentioned above. Compared with the conventional algorithm, the approach is more feasible. On all accounts, we have a clear understanding of the proposed
algorithm. Figure 3 shows the flowchart of the speed programming scheme for the Variable-period interpolation algorithm and describes the proposed algorithm in detail.
Fig. 4 The tool path for a blade generated with UGNX3.0
4 Simulation result
deceleration control to how to forecast the deceleration point
for the varied distance movement. The conventional speed
layout is to calculate the acceleration time, constant time, and
the deceleration time in advance. Here we adopt a more
flexible scheme. In this scheme we decide whether to perform
the deceleration stage by comparing the Sd with Sr in every
interpolation period. Here, Sd expresses the needful length
decelerating from current velocity to the end velocity, and Sr
expresses the remainder length of the machining segment.
The characteristics equation is as follows.
p ¼ SR
ð11Þ
Sd
The interpolation performs the deceleration stage, when
parameter p is negative. Sd is an important parameter in the
whole speed programming. How to derrive Sd is a key point
in the whole speed programming. The conventional method
[11] shows as follows:
Vf2
Sdown ¼
Ve2
2a
þ ΔS
ð12Þ
Here, Vf is the allowable maximal velocity, Ve is the end
velocity (or joint federate) and ΔS is the length setting
aside beforehand. This scheme requires some computation.
However, the method has an obvious drawback. Not every
segment can perform the maximal velocity because of the
length of a segment. So, we proposed an optimal scheme.
In the scheme, we discussed two instances to compute Sd:
In this section, we show the experimental results of the
presented optimal feed interpolation algorithm for the fiveaxis path of a blade in finish machining. In the simulation
experiment, the part is made of aluminum and the cutting
tool is a 10-mm carbide ball-end cutter. The five-axis path
of the blade generated by the UG NX3 was run through the
simulation software Cimatron as described in Fig. 4. In the
simulation experiment, the maximum velocity is 6,000 mm/
min, the maximum acceleration is 1,800,000 mm/min*min,
and the sampling period T is 4 ms. Figures 5 and 6 show
the feed profile of the same example parts simulated by the
two different methods.
Figure 5 shows the feed profile obtained with conventional
interpolation algorithm. It performed acceleration/deceleration
in each unit segment. The command feedrate is 6,000 mm/
min. From Fig. 5, we can see that the feed fluctuates severely
and cannot even reach the command feedrate in some short
segments.
Figure 6 shows the feed profile obtained with the proposed algorithm when the command feed is 6,000 mm/min
for the same path. When the command feed increases to
6,000 mm/min, the fluctuation of the feed ranges from 3 to
5% (Fig. 6). Compared with the feed profiles obtained with
conventional interpolation algorithm, this feed profile is
much smoother and closer to the command feed. Thus, the
1. when Vi >Vi+1:
ni ¼
Vinþ1 Viþ1
aT
Sdown ¼ Vinþ1 ni T
ð13Þ
1
ni ð ni
2
1Þ aT
ð14Þ
2 when Vi >Vi+1
a: if Vin+1>Vi+1
Sdown ¼ 0
ð15Þ
b: if Vin+1>Vi+1, the calculation is same with instance 1.
Fig. 5 Feed profile with the conventional algorithm
774
Int J Adv Manuf Technol (2009) 40:769–775
Fig. 6 Feed profile with the proposed algorithm
proposed algorithm can generate the more efficient velocity
profile for the varied distance movement and cut down
the machining time greatly than the traditional five-axis
methods can.
Figure 7 shows the propeller being machined on a fiveaxis CNC machine at Shanghai Jiao Tong University. The
test is performed to validate the efficiency of the proposed
algorithm. In the machining test, the five-axis machine tool,
which consists of three axes of motion and two rotational
axes, is used as a test bed for the CNC system with the
proposed algorithm and the roughcast is aluminum. The
manufacturing process includes rough machining, semifinish machining, and finish machining. The corresponding
cutting tools are the 10-mm carbide flat-bottomed cutter,
the 10-mm carbide ball-end cutter, and the 6-mm carbide
ball-end cutter. The command feedrate changes in the range
of 4,000–6,000 mm/min and the sampling period T is also
4 ms. Figure 8 represents the surface parts after finish
machining based on the proposed algorithms. Compared
Fig. 7 Machining of a propeller on five-axis machining tool
Fig. 8 A propeller after finish machining
with the conventional interpolation algorithm, the proposed
algorithm reduces the machining time by one-third. The test
results show that the proposed algorithm not only achieves
constant speed and shortens machining time but also
obtains high machining accuracy.
5 Conclusions
Currently, a Look-Ahead scheme is normally used in many
advanced CNC machines to overcome the disadvantage of
the conventional interpolation method. It can generate a
smoother feed profile on one side, but, on the other hand, it
is likely to make some short linear segment not be discretized exactly in an integer interpolation period because
of the nonzero start velocity of the segment.
A Variable-period interpolation algorithm is proposed to
solve this disadvantage of the look-ahead scheme. First, this
paper analyzed two aspects of constrains in five-axis
machining to generate an effective speed profile. Then, to
solve the problem of the non-integral interpolation periods
when the joint feed is nonzero, new constraints to the joint
feed are deduced and the corresponding adjusted interpolation algorithm is presented. In this scheme, the interpolation period is not fixed. The length of the last period in
each segment ranges between 0.5T and 1.5T. These
constraints and algorithm ensure that each linear segment
can be interpolated exactly in an integer period without any
contour error. Last, we validate the scheme with a five-axis
bed. The simulation and experiment results show that the
proposed algorithm can generate an efficient feed profile
and greatly shorten the machining time on the basis of the
high machining accuracy.
Int J Adv Manuf Technol (2009) 40:769–775
Acknowledgements The authors would like to acknowledge the
National Natural Science Foundation of China for the support of this
research (No.50575138)
References
1. Fleisig RV, Spence AD (2001) CAD Comput Aided Des 33(1):
1–15 (Jan)
2. Koren Y, Lo C-C, Shpitalni M (1993) CNC interpolators:
algorithms and analysis. In: Proc of the ASME Prod Engng Div
Manuf Sci and Engng, vol. 64, pp 83–92
3. Xu HF, Wang YH (2005) Research on feedrate model of lookahead and solution algorithm for high-speed machining of small
line segments. Mech Eng 9:9–13
4. Luo FY, Zhou YF, Yin J (2007) A universal velocity profile
generation approach for high-speed machining of small line
segments with look-ahead. Int J Adv Manuf Technol 35(5–6):
505–518
775
5. Jeon JW, Ha YY (2000) A generalized approach for the
acceleration and deceleration of industrial robots and CNC
machine tools. IEEE Trans Ind Electron 47(1):133–139
6. Luo FY, Zhou YF, Yin J (2006) A generalized acceleration and
deceleration approach for continuous small line blocks with lookahead. J Wuhan Univ Technol 28(Suppl 1):1052–1058
7. Hu J, Xiao LJ, Wang YH, Wu ZY (2006) An optimal feedrate model
and solution algorithm for a high-speed machine of small line blocks
with look-ahead. Int J Adv Manuf Technol 28(9):930–935
8. Han GC, Kim DI, Kim HG, Nam K, Choi BK, Kim SK (1999) A
high-speed machining algorithm for CNC machine tools[C]. In:
IECON’99 Proc of the 25th Annual Conference of the IEEE,
pp 1493–1497
9. Guo XG (2002) Research on high accuracy interpolation strategy
for high-speed-cutting. PhD Thesis, China
10. Wang YH, Feng JC, Li YH, Chen M (2006) An optimal feed
interpolation algorithm for high-speed five-axis machining. Mat
Sci Forum 532–533:873–876
11. Pan M, Wu YJ, Leng HB (2005) Research on accelerating and
decelerating control of NC system. Manuf Autom 27(9):30–33