Feedrate Scheduling for Interpolation of Parametric Tool Path Using the Sine Series Representation of Jerk Profile Jie Huang, Li-Min Zhu *
State Key Laboratory of Mechanical System and Vibration, School of Mechanical Engineering, Shanghai Jiao Tong University, Shanghai 200240, P.R. China
Abstract: This paper proposes the sine series representation of jerk profile for Acceleration/Deceleration (AD) feedrate scheduling of parametric interpolator used in CNC machine tools. By selecting the geometric sequence as the coefficients of the sine series, the closed-form expressions of the feedrate, acceleration and jerk profiles are obtained. The resulting feedrate profile is more concise compared with the polynomial profile and more efficient compared with the trigonometric profile. It can be well accepted by the conventional AD feedrate scheduling algorithms. Also, an approach is proposed to determine the optimal geometric sequence that makes the tracking time as small as possible. Simulations and experiments of tracking complex contours expressed as free-form Non-Uniform Rational B-Spline (NURBS) curves are conducted. The results demonstrate the effectiveness of the proposed feedrate profile and the resulting feedrate scheduling strategy. Keywords: feedrate scheduling, acceleration/deceleration, velocity profile, sine series, NURBS
*
Corresponding author, Email:
[email protected] 1
1. Introduction The feedrate scheduling, which determines the smoothness, accuracy and stability of the machining process, is one of the most important factors in the interpolation of parametric curves. In order to achieve high-speed and high-accuracy machining, various techniques for feedrate scheduling of industrial robots and CNC machine tools have been proposed for both the linear and parametric tool paths. The existing feedrate scheduling algorithm for parametric tool paths can be roughly divided into two broad families of classes: the AD approach and the time-optimal (TO) approach. The TO approach was firstly applied to solve the minimal-time control problem for robotic actuators and the shape of a feedrate profile is not known in advance but determined by some differential equations 1. This approach can be further classified into two categories: the numerical methods
2-7
and the analytic methods
8, 9.
Dong et al.
2, 3
and Beudaert et al.
4
proposed two
similarly practicable methods to handle the feedrate scheduling problem numerically by solving a series of constrained optimization sub-problems. Zhang et al.
8, 9
proposed an analytic way
towards this problem by searching the intersections of the so-called velocity limiting curves/surfaces deduced from the acceleration, jerk and chord error constraints. Though optimal, these methods cannot guarantee a feasible solution even after an intensive computation
1, 10.
Moreover, the numerical off-line optimization method generally needs a re-interpolation process to obtain the feedrate values at each interpolation period, which may cause undesirable errors. The analytic methods can only be applied to simple parametric curves due to the requirement of solving differential equations. Recently, Sun et al.
11-13
proposed a novel adaptive feedrate
scheduling method that considers drive constraints. A B-spline curve was adopted to represent the 2
feedrate profile and its control points were adjusted iteratively, leading to a near-optimal feedrate profile under the prescribed constraints. The re-interpolation was still involved in this method. The AD approach was firstly applied to line segments
14, 15
which are the most widespread
representation for tool path in CNC machining. Detailed and nice work on how to generate a universal AD velocity profile for line segments was given in 16, 17. Later, this method was extended to deal with parametric tool path 18-24. As mentioned in 10, 17, the most widely-used profiles in AD approach are polynomial (e.g., linear-velocity, trapezoidal-velocity and trapezoidal-acceleration) and trigonometric profiles. With the polynomial profile, the process of the feedrate scheduling becomes complicated and the expression of the profile becomes cumbersome for a smoother profile. A piecewise velocity function with seven sub-functions
27
was needed to describe an
acceleration phase with trapezoidal jerk as illustrated in Fig. 1(a). Moreover, four kinds of acceleration profiles were developed for different conditions
14, 23, 26.
With the trigonometric
profile, the machining becomes less efficient because only one point can reach the given maximum value of the acceleration or jerk profile 22, as illustrated in Fig. 1(b).
3
seven stages for an acceleration phase
Jmax
k re J
Jmax
only one maximum for jerk
k re J
τ1 τ2 τ3
τ4
τ5 τ6
T
T
n iot a -Jmaxr lee c only one maximum Amaxc A for acceleration
n o ar el ec c Amax A
-Jmaxit
τ1 τ2 τ3
T
τ4 τ5 τ6 T
yt ic ol e Ve V
yt ic ol e VVe
Vs
Vs
τ1
τ2 τ3
τ4 τ5
T
τ6 T
(a) Polynomial feedrate profile
(b) Single sine feedrate profile
Fig. 1. Two conventional AD feedrate profiles. In summary, the AD feedrate scheduling method is now most widely-used in CNC systems due to its stability and low computational burden 15, though there are some pitfalls especially when the dynamic characteristics of each axis are dramatically unmatched feedrate scheduling focuses on polynomial
14, 21, 23
10, 17.
and trigonometric
The study towards AD 16, 17, 22
profiles, which
usually concerns the constraints of tangential velocity, tangential/normal acceleration, tangential/normal jerk and chord error (only for parametric curves). Comparatively, the polynomial profile is more efficient than the trigonometric one because it can make full advantage of the axial capabilities, but the trigonometric representation is more succinct than the polynomial one and is more convenient to generate smoother profiles. 4
To obtain a jerk-continuous feedrate profile with both simplicity and efficiency, this paper proposes an approach to represent the jerk profile by using the sine series. By selecting the geometric sequence as the coefficients of the sine series, the closed-form expressions of the feedrate, acceleration and jerk profiles are obtained. By selecting the optimal geometric sequence, a short AD time duration is obtained. The remainder of this paper is organized as follows. The feedrate profile based on the sine series representation of jerk profile is presented in Section 2. The procedure for AD feedrate scheduling using this kind of feedrate profile is detailed in Section 3. Simulation and experimental results are given in section 4, and conclusions are summarized in section 5.
2. Feedrate profile based on the sine series representation of jerk profile 2.1 Principles of AD feedrate profile An AD feedrate scheduling is to use a certain feedrate profile to connect the feedrate from one value to another one under given constraints. Following the idea of Luo 17, a profile with only an acceleration phase is adopted to illustrate the techniques of AD feedrate scheduling. Let the start velocity, the end velocity and the length of the path be
vs , ve ,
and s respectively, then the
feedrate function f ( t ) should satisfy the following constraints
′ = 0,= f ′′(T ) 0 f (0) v= s , f (0) f (T ) = 0, f ′′(T ) = 0 ve ≤ vmax , f ′(T ) = vs ≤ f (t ) ≤ ve , f ′(t ) ≤ amax , f ′′(t ) ≤ jmax , t ∈ [0, T ] T f (t )dt = s ∫ 0 where t denotes time,
T
is the time required to finish the path, 5
vmax , amax
(1)
and
jmax
are the
maximum allowable velocity, acceleration and jerk, respectively, which are defined as the minimal limits
of
all
axes,
jmax = min { jx , j y , jz }
i.e.,
vmax = min {vx , v y , vz }
amax = min {ax , a y , az }
and
10, 17.
For a general AD feedrate profile, three principles are normally accepted to guarantee the machining efficiency according to 21-26. Principle 1: There are three basic phases of an AD feedrate profile, i.e., ACC (ACCeleration), CF (Constant Feed) and DEC (DECeleration), as illustrated in Fig. 2. And there are seven practicable types of feedrate profiles, i.e., ACC+CF+DEC, ACC+DEC, ACC+CF, CF+DEC, ACC, DEC and CF, as illustrated in Fig. 3. If the symmetrical acceleration and deceleration characteristics are applied, which is normally accepted 17, 21, 22, 26 and will be accepted in this paper, it is adequate to only study the ACC phase to determine a proper feedrate profile.
6
Jmax
k re J
ta
tn
te
ta
tn
te
n
-Jmaxio t
ar el ec c Amax A
-Amax
et ar Vdf ee s F
CF ACC
DEC
Vs
Ve ta
e ta r d e e F
e ta r d e e F Vfs
e ta r d e e F
tn
Fig. 2. An ACC+CF+DEC profile e ta r d e Vfs e F Vfs ACC
CF
te
DEC Ve
Vmax
ACC
ACC Ve
ta r d V e fs e F
Vmax
CF
DEC
Vs e CF
e ta r d e e F
Vs
e ta r d e e F
CF Vmax
DEC
ACC Ve
Vs
DEC
Vs
Ve
Fig. 3. Seven practicable profiles of AD method. Principle 2: The main aim of the feedrate scheduling is to make the feedrate as large as possible, 7
rather than maximize the jerk or acceleration. Principle 3: If the feedrate profile consists of more than a CF phase, e.g., an ACC+CF profile, the velocity at the CF phase must be the maximum velocity according to Principle 2. Thus, the CF+DEC and ACC+CF profiles are rare in practice because the start or end velocity of the segment is usual not the maximum velocity.
2.2 Representation of AD feedrate profiles Following the works of
17, 22,
the two conventional profiles, i.e., the polynomial and the single
sine feedrate profiles, are briefly revisited. Then, a novel feedrate profile derived from the sine series representation of jerk profile is presented with the aim of combining the advantages of the two conventional ones.
2.2.1 Polynomial feedrate profile
The simplest polynomial profile is the linear-velocity profile, of which the acceleration is
confined. By selecting the order of the polynomial functions, one can get different feedrate profiles with desired order of continuity
12, 19, 23, 26.
A polynomial feedrate profile with a
trapezoidal jerk and confined jounce is depicted in Fig. 1 (a). The ACC profile given in Fig. 1 (a) should be divided into seven regions, and an ACC+CF+DEC profile should be divided into up to fifteen regions. The expression of the limited-jounce feedrate profile and procedure of the scheduling are presented in 23, which are very cumbersome and will become more complicated as the profile gets smoother.
8
2.2.2 Single sine feedrate profile
Lee et al. 22 proposed a feedrate scheduling method with a velocity profile expressed as a single
sine function, and got the acceleration and jerk by the time derivatives of velocity. Unlike the piecewise function for a polynomial profile, the single sine feedrate for an ACC profile can be expressed with only one formula. The concision of expression, however, cannot cover its inefficiency. As shown in Fig. 1(b), a single sine function results in only one point can reach the maximum acceleration or jerk for the acceleration or jerk profile, respectively, which surely cannot make full advantage of the dynamic characteristics of the servo system.
2.2.3 Sine series feedrate profile
To combine the advantages of the polynomial and the single sine feedrate profile, a novel
feedrate profile is derived here from the sine series representation of jerk profile. Contrary to Lee’s work, the jerk profile is determined firstly, and then the acceleration and velocity profiles are obtained by the time integrations, which results in a feedrate profile with a continuous jerk rather than a confined jerk. Note that the jerk profile in an ACC phase usually has the shape of an odd function with translation along the x-axis as shown in Fig. 1, thus the jerk profile in an ACC phase can be expressed as a sine series according to the theory of Fourier series. The involved sine functions have the following forms
2nπ jn (t ) J= = t , n 1, 2,3, t sin T where
Jt
(2)
is a coefficient to normalize the maximum velocity for the concise expression of the
velocity function, and n is the order of the sine functions. 9
Considering the boundary condition
an (T ) = 0 , we get the acceleration and velocity through
integration.
JT 2nπ J tT an (t ) = t+ − t cos ∫0 jn (u )du = 2nπ T 2nπ t
T 2nπ J tT vn (t ) = t+ t − Jt sin ∫0 an (u )du = 2nπ T 2nπ 2
t
(3)
Normalizing the velocity yields,
J T2 2nπ vn (T ) = t =1 ⇒ J t = 2 . T 2nπ
(4)
Substituting Eq. (4) into Eq. (3), we get the normalized jerk, acceleration and velocity as shown in Eq. (5).
2nπ 2nπ jn (t ) = T 2 sin T t 1 2nπ 1 t+ − cos , t ∈ [ 0, T ] an (t ) = T T T 1 2nπ t t+ − sin vn (t ) = 2nπ T T
(5)
and end velocity
ve , the feedrate profile can be
jn= (t ) jn (t )∆v , t ∈ [ 0, T ] an (t ) =an (t )∆v v (= n t ) vn (t )∆v + vs
(6)
In a general situation with start velocity
vs
expressed as
where
∆v = ve − vs . Obviously, we have vn ( 0 ) = vs
and vn (T ) = ve .
For the sine feedrate function with order n , we obtain the tracking length in the ACC phase by integrating the velocity w.r.t. time.
s= n
T
T
0
0
∫ vn (t )dt= vsT + ∆v ∫ vn (t )dt=
( vs + ve ) T 2
(7)
It can be deduced from Eq. (7) that the tracking length is independent of the order of the sine 10
function, and determined only by the start velocity, the end velocity and the time duration. Therefore, we get the general feedrate profile as follows n ∆v n wi ∆vt 2iπ v t = w v t = − t) + + vs ( ) ( ) sin( ∑ ∑ i i T T 2π i 1 i =i 1 = n ∆v n ∆v 2iπ = ∆ = − a t v w a t wi cos( t) + ( ) ( ) ∑ ∑ i i T i1 T T = i 1= , t ∈ [ 0, T ] n n v π i π ∆ 2 2 j (t ) = ∆v ∑ wi ji (t ) = ∑ iwi sin( T t ) T2 i 1 =i 1 = n = wi 1, wi > 0 ∑ i =1
(8)
where wi , i = 1, 2, , n denote the coefficients of the sine series. It is seen that the tracking length is always
sn .
According to Eq. (5) and wi > 0 , it is obvious that a (t ) ≥ 0 and v ( t ) is monotonically increasing w.r.t. t . Thus the velocity constraint
vs < v(t ) < ve , t ∈ [0, T ]
expressed in Eq. (1) is
always satisfied. Only the acceleration and jerk constraints required by Eq. (1) need to be considered. They are re-formulated as
a (t ) ≤ amax ,
j (t ) ≤ jmax
(9)
In order to reduce the total time for the contour tracking, the time for the acceleration phase should be minimized, i.e., the time duration From Eqs. (8) and (9), the time duration
T
T
for the ACC phase should be as small as possible. can be determined by the following equation,
∆v ⋅ max f1 ( w1 , , wn , θ ) 2π∆v ⋅ max f 2 ( w1 , , wn , θ ) θ , wi θ , wi T = max , amax jmax where f1 ( w1 , , wn , θ ) = 1 −
n
( w1 , , wn , θ ) ∑ wi cos iθ , f 2= i =1
n
∑ iw sin iθ , i =1
i
(10)
θ ∈ [ 0, 2π ] . If
T is determined by the maximum value of function f1 , at least one point on the acceleration 11
profile reaches the maximum allowable acceleration. In this sense, the acceleration constraint is active. Otherwise, at least one point on the jerk profile reaches the maximum allowable jerk, and the jerk constraint is active.
2.3 Coefficients of the sine series To make sure that the series in Eq. (8) have closed-form expressions and the maximum acceleration and jerk can be efficiently determined, we use the geometric sequence as the coefficients of the sine series. Other coefficients are feasible, but the geometric sequence is one of the most intuitive and convenient choices. Given the coefficients as geometric sequence defined in Eq. (11),
m −1 ,m >1 = wi mi ∞ ∑ wi = 1 i =1
(11)
we obtain
m +1 ∆v ∆vt tan ( 0.5θ ) − 0.5θ + − + vs ( m − 1) atan v(t ) = 2 1 m T π − ∆v ( m − 1)( m cos θ − 1) ∆v − + a (t ) = T m 2 − 2m cos θ + 1 T , t ∈ [ 0, T ] 2 1 1 sin m m m θ − − ( ) ( ) 2 v π ∆ j (t ) = T 2 ( m 2 − 2m cos θ + 1)2 2π t θ = T
(12)
and
f1 = f2 =
(1 − cos θ )(m 2 + m) m 2 − 2m cos θ + 1 m(m − 1)(m 2 − 1) sin θ
(m
2
− 2m cos θ + 1) 12
2
(13)
The derivations of Eqs. (12) and (13) are given in Appendix A.
2.4 Optimal coefficients of the sine series In order to obtain the optimal coefficients of the sine series which minimize
T , we need to
minimize the maximum value of the functions f1 (θ , m ) and f 2 (θ , m ) . For a given m , the maximum value of f1 (θ , m ) is determined by the following equation.
f1max = 2−
2 1
(15)
The detailed derivations of Eqs. (14) and (15) is given in Appendix B. The maximum values of
f1 ( m ) and f 2 ( m ) w.r.t. m are shown in Fig. 4.
Fig. 4. Maximum values of f1 and f 2 w.r.t. m . For the conventional single sine function, we have n = 1 , w1 = 1 , 13
f1max = 2 and f 2max = 1 .
For the sine series function, as shown in Fig. 4, if m approaches 1, we have
f1max ≈ 1 , which
means that the resulting feedrate profile can reduce the time duration by up to 50% as compared to max
the trigonometric profile if the acceleration constraint is active; on the other hand, f 2
quickly
declines below 1 as m increases, which means that resulting feedrate profile can slightly reduce the time duration if the jerk constraint is active. Therefore, the proposed feedrate profile is more efficient than the single sine profile and can improve the efficiency significantly in the case that the acceleration constraint is active. Let
∆v ⋅ f1max (m) = Tam = , T jm amax
2π∆v ⋅ f 2max (m) jmax
(16)
Obviously, ∆v has great influence on Tam than T jm . If ∆v is large enough, the acceleration constraint will be active. For any segment with start velocity
vs , end velocity ve
and length s , m should be determined by Eq. (16) to minimize the larger one of Tam and T jm . If an ACC+DEC or ACC+CF+DEC profile is considered, we should determine the optimal values of m for the ACC and DEC phases, respectively. As shown in Fig. 4,
f1max is a monotonically increasing function w.r.t. m , while f 2max is a
monotonically decreasing function when m < 8 and almost a constant when m ≥ 8 . As a result, the optimal m is found within the interval (1, 8] . Let h be the search step, then a numerical search algorithm is proposed to determine the optimal m , which goes as follows: Initialize m = 1 + h while m ≤ 8 do 14
Calculate Tam and T jm if Tam < T jm
m= m + h else break end while Terminate Choose the current value m* as the optimal one. This search algorithm has three resulting cases as shown in Fig. 5. In case I, T jm > Tam for
1 < m ≤ 8 and m* = 8 ; In case II, T jm > Tam for 1 < m < m* , while T jm < Tam for m* < m ≤ 8 and 1 < m* < 8 ; In case III, T jm < Tam for 1 < m ≤ 8 and m* = 1 + h . e m i T
e m i T
e m i T Tjm
Case I Tjm
Tam m*
m*
m* Tam 1
Case III
Case II
Tjm
Tam 8
m
8
1
m
1
8
m
Fig. 5 Three cases of the search algorithm.
3. AD feedrate scheduling for parametric curves 3.1 Procedure for AD feedrate scheduling The AD feedrate scheduling method was firstly developed for linear toolpaths, and then applied to parametric toolpaths. For a linear toolpath, the nominal velocity at each corner point can be determined by the angle between two adjacent lines 17, 22. For a parametric tool path, the procedure
15
for AD feedrate scheduling normally consists of the pre-processing, the feedrate profile generation and the interpolating stages. It has been well studied in 21-23. Here our work focuses on the feedrate profile generation stage. In the stage of pre-processing, the critical points of the tool path, where the curvature reaches local maximum values and exceeds the threshold curvature
κ cr determined by Eq. (17), are
picked out into a set which also contains the start and end points of the tool path 21, 22.
κ cr = min
8δ
( v T )2 + 4δ max s
, 2
amax j , max 2 3 vmax vmax
(17)
With these critical points, the whole tool path is splitted into several segments, of which the length can be calculated with adaptive Simpson quadrature formula
28.
After that, the nominal
velocity at each critical point is calculated by the following equation 21, 22.
2 1 a j 1 = − ( − δ ) 2 , max , 3 max2 , vmax vi min 2 κi κi κi Ts κ i where
(18)
δ is the allowable chord error, κ i is the curvature of the critical point, and Ts is the
interpolation period. It should be noted that the velocities at the start and end points must be zero. Unlike the linear toolpath, the chord error, normal acceleration and normal jerk constraints are used to determine the critical points and the velocities at the critical points for a parametric toolpath. However, it is difficult to consider these constraints in the feedrate profile generation stage if the curvature of the toolpath is variable. Normally, a simple way which ignores these constraints, is adopted to generate the feedrate profile between two adjacent critical points 20-26. In the stage of feedrate profile generation, the proposed AD feedrate profile is applied to connect the nominal velocities at the critical points for each segment. The flowchart to determine the whole feedrate profile for the complete curved tool path is illustrated in Fig. 6, which is similar 16
to that in 22. The only difference between them is that with our method the optimal m employed in the ACC and DEC phases should be determined using the method presented in Section 2.4. So, the efficiency of the conventional AD feedrate scheduling algorithms is completely preserved. input: start velocity vs, end velocity ve and length s
N
the maximum tracking length S1 for a simple ACC or DEC
ACC or DEC Modification of velocity ve or vs
Y
s>S1
Backward velocity modification for short blocks
N
the maximum tracking length S2 for ACC+DEC
ACC+DEC Modification of the actually maximum velocity
Y
s>S2
ACC+CF+DEC
Fig. 6. Flowchart of the proposed feedrate scheduling method. The details to determine the complete feedrate profile for each segments with start velocity vs , end velocity ve and length s are described schematically as follows: Step I. In the first step, the maximum tracking length S1 for the segment which could be planned as a simple ACC or DEC profile with the velocity changing from vs to ve is calculated using Eqs. (7) and (10). If s ≤ S1 , this segment is planned as a simple ACC or DEC profile and a dichotomy technique discussed in Section 3.2 is employed to modify the larger velocity of the two nominal velocities, i.e., to ensure the tracking length is exactly the segment length. If s > S1 , this segment 17
is planned as an ACC+DEC or an ACC+CF+DEC profile and the process goes to Step II. Step II. In the second step, the maximum tracking length S 2 for the segment which could be planned as an ACC+DEC profile is calculated by adding the tracking lengths of an ACC profile with the velocity increasing from vs to vmax and a DEC profile with the velocity decreasing from vmax to ve . If s ≤ S 2 , this segment is planned as an ACC+DEC profile and again the dichotomy technique is employed to modify the actually maximum velocity v fs . If s > S 2 , this segment is planned as an ACC+CF+DEC profile and the process goes to Step III. Step III. In this step, an ACC+CF+DEC profile is assigned to the segment, which means that the velocity firstly accelerates from vs to vmax , then maintains the maximum velocity vmax , and finally decelerates from vmax to ve . The tracking length for the CF phase is s − S 2 . In the stage of interpolating, the parametric interpolator based on the second-order Taylor expansion 29 is adopted to generate the reference position commands.
3.2 Dichotomy technique for velocity modification As mentioned in Section 2.1, there are seven practical types of an AD feedrate profile depending on the start velocity, the end velocity and the length of the segment. And in three cases, i.e., ACC+DEC, ACC and DEC, a dichotomy technique is adopted to modify the actually maximum velocity, to ensure that the tracking length matches the segment length. An ACC+DEC profile is taken as an example to illustrate the dichotomy technique. The tracking length of this profile is a monotonically increasing function of the actual maximum
18
velocity v fs . Denoting the larger velocity of vs and ve as vm = max ( vs , ve ) , then the initial dichotomy search interval for the actually maximum velocity v fs is
[vm , vmax ] ,
and the
termination condition is as
se − s ≤ eps where
se
(19)
is the tracking length and eps is threshold specifying the desired accuracy of the
search algorithm. This method can be analogously applied to modify the end velocity ve of an ACC profile and the start velocity vs of a DEC profile.
3.3 Backward velocity modification for short blocks According to Fig. 6, if s < S1 , the boundary conditions will be changed after feedrate scheduling and this kind of block is termed as “short” block. Other kinds of blocks are termed as “long” block. If not carefully handled, the short blocks may cause discontinuity at the junction of two adjacent feedrate profiles. Following the idea of Lee
22,
a backward adjusting method is
adopted to deal with the short blocks. To avoid the discontinuity at the junction of two feedrate profiles, it is necessary to check whether the (i+1)th block is “short” or not before scheduling the feedrate profile for the ith block. If so, firstly, all of the successive short blocks, e.g., (i+1)th, (i+2)th, ... , (i+k)th blocks, are found. Then, federate scheduling is applied to these short blocks and the ith long block backward, e.g., from the (i+k)th block to the ith block. Finally, the feedrate scheduling goes to the (i+k+1)th long block. The procedure to handle short blocks is illustrated in Fig. 7.
19
Continuous Short Blocks C(ui+1)
C(ui) ith Long Block
C(ui+k)
C(ui+2)
(i+1)th Short Block
C(ui+k+1)
(i+k)th Short Block
. . .
C(ui+k+2)
(i+k+1)th Long Block
Feedback and Check Feedrate Rescheduling
C(ui)
ith Long Block and (i+1)th to (i+k)th Short Blocks
C(ui+k+1)
C(ui+k+2)
(i+k+1)th Long Block
Fig. 7. Procedure to handle short blocks.
4. Simulation and experimental results 4.1 Experimental Setup To illustrate the effectiveness of the proposed method, simulations and experiments of tracking complex contour expressed as NURBS are conducted on a triaxial table driven by the YASKAWA SGDV series servo drivers and SGMJV motors, as shown in Fig. 8. The lead of the ball screws used is 10mm/rev, and the incremental encoder for each motor has a resolution of 10000 pulses/rev. The off-line feedrate scheduling algorithm and the on-line control task are implemented on Matlab environment and a dSPACE DS1103 system, respectively.
20
Z-axis
-10V ~10V
Actual positions
X-axis
Y-axis
dSPACE DS1103, Position controller (PI)
Intel Core i5-3470 @3.2GHz×2
Windows 7 +Matlab/Simulink Reference position: x(kTs ), y (kTs ), z (kTs )
Fig. 8. Layout of the triaxial experimental system. The parameters used in the feedrate scheduling and interpolation are listed in Table 1. The reference position commands generated by the interpolator are sent to the dSPACE system for motion control. The effectiveness of the sine series feedrate profile is demonstrated via the machining times in simulations and the contour errors in experiments. Table 1 Parameters of kinematics constraints and feedrate scheduling method. Parameters
Symbols
Values
Interpolation period
Ts
0.002s
Chord error
δ
0.01mm
Maximum velocity
vmax
200 mm s
Maximum acceleration
amax
1000 mm s 2
Maximum jerk
jmax
50000 mm s
21
3
4.2 Tracking of trident NURBS curve The first NURBS curve is a trident curve shown in Fig. 9 (a), and the associated control points, weight vectors and knot vectors are listed in Table 1 of Appendix C. The seven critical points determined by the given constraints are marked with star as shown in Fig. 9, with which the curve is splitted into six segments. In Fig. 9 (a), the solid blue, the solid red, and the dashed blue curves represent the shape, the control polygon and the lines connecting the critical points of the trident curve, respectively. The simulation results shown in Fig. 9 indicate that the machining time reduces from 3.126s obtained with the single sine method to 2.577s obtained with the sine series method, decreasing by 17.6%. The experimental results are given in Fig. 11. The maximum and mean contouring errors resulting from the sine series method are 15.7 and 3.6 µ m , respectively, while those resulting from the single sine method are 13.8 and 2.2 µ m , respectively. The performances of the two methods in terms of accuracy are very similar.
(a) Trident curve
(b) Curvature of trident curve
Fig. 9. Trident curve and the selected critical points.
22
Fig. 10. Simulation results of tracking trident curve.
Fig. 11.
Experimental results of tracking trident curve. 23
4.3 Tracking of butterfly NURBS curve The second NURBS curve is a butterfly curve shown in Fig. 12 (a), and the associated control points, weight vectors and knot vectors are listed in Table 2 of Appendix C. A total of thirty-seven critical points are determined and marked with star in Fig. 12(a). As a result, the butterfly curve is splitted into thirty-six segments. The simulation results shown in Fig. 12 indicate that the machining time decreases from 5.427s obtained with the single sine method to 4.802s obtained with the sine series method, decreasing by 11.52%. The experiment results are illustrated in Fig. 14. The maximum and mean contouring errors resulting from the sine series method are 20.9 and 3.9 µ m , respectively, which are also very close to the results 19.9 and 3.6 µ m obtained with the single sine method. As mentioned before, with the single sine method only one point on the acceleration profile can reach the given maximum acceleration amax during the ACC/DEC phase, while with the sine series method the acceleration can maintain the maximum acceleration amax for a while, which can be observed from the acceleration profiles in Figs 10, 11, 13 and 14. The contour errors of the two experiments are very small due to the continuous jerk of the feedrate profiles. As for the significantly larger mean contouring error in the first experiment for the sine series method, we attribute it to the longer time duration in contouring with the maximum velocity. For a given tool path, the higher the velocity is, the larger the contouring error is 3 21. As shown in Figs. 11 and 14, the contouring error is quite large when the feed reaches the given maximum value. The time durations with the maximum contouring velocity for the single sine and sine series methods are both nearly zero in the second experiment as shown in Fig 14. However, the time duration with the maximum contouring velocity for the single sine method is much shorter than that for the sine 24
series method in the first experiment as shown in Fig. 11. Hence the mean contouring error for the proposed sine series method is notably large in the first experiment. In fact, the maximum contouring error usually plays a more important role than the mean contouring error in evaluating the contour following performance
19-23
. The proposed sine series method can generate a more
efficient feedrate profile while keep a similar maximum contouring error as compared with the conventional single sine method, which can be observed from Figs. 11 and 14. The proposed method is more effective for the trident curve due to the larger difference between the velocities at the adjacent critical points, which can be seen from the velocity profiles in Figs 10 and 13. In this case,
the
acceleration
constraint
is
the
dominant
factor
that
determines
the
acceleration/deceleration time duration, which leads to a more significant improvement in efficiency for the proposed method.
(a) Butterfly curve
(b) Curvature of butterfly curve
Fig. 12. Butterfly curve and the selected critical points.
25
Fig. 13. Simulation results of tracking butterfly curve.
Fig. 14. Experimental results of tracking butterfly curve.
26
5. Conclusions This paper presents the sine series representation of jerk profile for AD feedrate scheduling of parametric interpolator used in CNC machine tools. To the best knowledge of the authors, this work is the first attempt at introducing the sine series representation in AD feedrate scheduling under the velocity, acceleration, jerk and chord error constraints. The distinctive characteristics of the proposed method are summarized as follows: (1) It can generate a jerk-continuous feedrate profile and thus provide smooth feed motions for the machine tools, which benefits greatly to the contour following performance. (2) It is both efficient and concise. By using the sine series representation of jerk profile, various flexible and efficient jerk profiles can be obtained. By selecting the optimally geometric sequence as the coefficients of the sine series, the closed-form expressions of the feedrate profile that leads to a short acceleration/deceleration time duration is obtained. The resulting feedrate scheduling method can generate a more efficient feedrate profile while keep a similar maximum contouring error as compared with the conventional feedrate scheduling method that employs the trigonometric profile.
Acknowledgements This work was partially supported by the National Natural Science Foundation of China under grant No. 51325502, and the Science & Technology Commission of Shanghai Municipality under grant Nos. 13JC1408400 and 14111104801.
27
Appendix A Closed-form expression of federate profile
cos kθ , mk k =1 ∞
In order to calculate the three infinite series
∑
k sin kθ and mk k =1 ∞
∑
sin kθ , we k k =1 km ∞
∑
firstly study the following series. n eiθ eiθ 1 − m ikθ iθ k ∞ ∞ m e e eiθ = = ∑ ∑= lim eiθ m k k 1 m n→∞ m − eiθ = k 1= 1− m
(A1)
The first series is then calculated as ∞ ∞ eikθ m cos θ − 1 cos kθ . = = real ∑ ∑ k k 2 m = k 1= k 1 m m − 2m cos θ + 1
(A2)
By taking derivative and integral, the closed-form expressions of the second and third series are obtained as follows.
m ( m 2 − 1) sin θ k sin kθ ∞ cos kθ ′ = −∑ , ∑ = 2 k mk = k 1= k 1 m ( m 2 − 2m cos θ + 1)
(A3)
∞ ∞ sin kθ cos kθ m +1 tan ( 0.5θ ) − 0.5θ . dθ atan = = ∑ ∑ k k ∫ km m m −1 k 1= k 1 =
(A4)
∞
Then, it is straightforward to get Eqs. (12) and (13).
B Maximum values of f1 (θ , m ) and f 2 (θ , m ) For f1 (θ , m ) ,
∂f1 m(m − 1)(m 2 − 1) sin θ , = f= 2 2 2 ∂θ ( m − 2m cos θ + 1)
28
(B1)
2 2 ∂f1 ( cos θ − 1) ( m + 2m cos θ − 2m − 1) = , 2 ∂m ( m2 − 2m cos θ + 1)
∂f ∂θ
1 we have =
(B2)
∂f ∂f1 = 0 at the extreme points. From 1 = 0 , we obtain θ = π . Substituting ∂m ∂θ
θ = π into function f1 (θ , m ) and Eq. (B2) yields f1max ( m ) = 2− ∂f1max = ∂m It is seen from Eq. (B4) that
2
( m + 1)
2
2 < 2. m +1
(B3)
> 0, (m > 1) .
(B4)
f1max ( m ) is monotonically increasing w.r.t. m .
For f 2 (θ , m ) , 2 2 2 ∂f 2 m(m − 1) (m + 1) ( 2m cos θ + m cos θ + cos θ − 4m ) = 3 ∂θ ( m2 − 2m cosθ + 1)
From
(B5)
∂f 2 = 0 , we have a feasible solution for θ . ∂θ 32m 2 + (1 + m 2 ) − (1 + m 2 ) 2
cos θ =
4m
Since f 2 (θ , m ) is an odd function w.r.t. is obtained at the positive solution of of
< 1, m > 1 .
(B6)
θ , for a fixed m the maximum value of f 2 (θ , m )
θ . It is quiet complicated to get the analytically expression
f 2max ( m ) . However, it is easy to determine its value by substituting the positive solution θ
of Eq. (B6) into function f 2 (θ , m ) .
29
C Parameters of the two NURBS curves Table 1 Parameters of a trident curve Parameters
Items
Control points
(50, 0, 0); (100, 100, 0); (60, 40, 0); (50, 100, 0); (40, 40, 0); (0, 100, 0); (50, 0, 0)
Knot vectors
0, 0, 0, 0.2, 0.4, 0.6, 0.8, 1, 1, 1
Weight vectors
1, 1, 1, 1, 1, 1, 1
Degree
2
Table 2 Parameters of a butterfly curve Parameters
Items
Control
(54.493,52.139,0); (55.507,52.139,0); (56.082,49.615,0); (56.780, 44.971,0);
points
(69.575, 51.358,0); (77.786, 58.573,0); (90.526, 67.081,0); (105.973, 63.801,0); (100.400, 47.326,0); (94.567, 39.913,0); (92.369, 30.485,0); (83.440, 33.757,0); (91.892, 28.509,0); (89.444, 20.393,0); (83.218, 15.446,0); (87.621, 4.830,0); (80.945, 9.267,0); (79.834, 14.535,0); (76.074, 8.522,0); (70.183, 12.550,0); (64.171, 16.865,0); (59.993, 22.122,0); (55.680, 36.359,0); (56.925, 24.995,0); (59.765, 19.828,0); (54.493, 14.940,0); (49.220, 19.828,0); (52.060, 24.994,0); (53.305, 36.359,0); (48.992, 22.122,0); (44.814, 16.865,0); (38.802, 12.551,0); (32.911, 8.521,0); (29.152, 14.535,0); (28.040, 9.267,0); (21.364, 4.830,0); (25.768, 15.447,0); (19.539, 20.391,0); (17.097, 28.512,0); (25.537, 33.750,0);
30
(16.602, 30.496,0); (14.199, 39.803,0); (8.668, 47.408,0); (3.000, 63.794,0); (18.465, 67.084,0); (31.197, 58.572,0); (39.411, 51.358,0); (52.204, 44.971,0); (52.904, 49.614,0); (53.478, 52.139,0); (54.492, 52.139,0); Knot vectors
0,0,0,0,0.0083,0.015,0.0361,0.0855,0.1293,0.1509,0.1931,0.2273,0.2435,0.2561, 0.2692,0.2889,0.317,0.3316,0.3482,0.3553,0.3649,0.3837,0.4005,0.4269,0.451, 0.466,0.4891,0.50.5109,0.534,0.5489,0.5731,0.5994,0.6163,0.6351,0.6447, 0.6518,0.6683,0.683,0.7111,0.7307,0.7439,0.7565,0.7729,0.8069,0.8491,0.8707, 0.9145,0.9639,0.985,0.9917,1,1,1,1
Weight
1,1,1,1.2,1,1,1,1,1,1,1,2,1,1,5,3,1,1.1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.1,1,3,5,1,1,2,1,
vectors
1,1,1,1,1,1,1.2,1,1,1
Degree
3
References 1 Dong, J., Stori, J.. A generalized time-optimal bidirectional scan algorithm for constrained feed-rate optimization. Journal of dynamic systems, measurement, and control. 2006; 128(2): 379-390. 2 Dong, J., Stori, J.. Optimal feed-rate scheduling for high-speed contouring. Journal of manufacturing science and engineering. 2007; 129(1): 63-76. 3 Bharathi, A., Dong, J.. Feedrate optimization and trajectory control for micro/nanopositioning systems with confined contouring accuracy. Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture 2015; 229(7): 1193-1205. 4 Beudaert, X., Lavernhe, S., Tournier, C.. Feedrate interpolation with axis jerk constraints on 31
5-axis NURBS and G1 tool path. International Journal of Machine Tools and Manufacture. 2012; 57(0): 73-82. 5 Fan, W., Fang, C., Ye, P., Shi, S., Zhang, X.. Convex optimisation method for time-optimal feedrate planning with complex constraints.Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture 2015; 229(1): 111-20. 6 Sencer, B., Altintas, Y., Croft, E.. Feed optimization for five-axis CNC machine tools with drive constraints. International Journal of Machine Tools and Manufacture. 2008; 48: 733-745. 7 Zhou, J., Sun, Y., and Guo, D.. Adaptive feedrate interpolation with multiconstraints for five-axis parametric toolpath. The International Journal of Advanced Manufacturing Technology. 2014; 71: 1873-1882. 8 Zhang, K., Yuan, C.-M., Gao, X.-S., Li, H.. A greedy algorithm for feedrate planning of CNC machines along curved tool paths with confined jerk. Robotics and Computer-Integrated Manufacturing. 2012; 28(4): 472-483. 9 Zhang, K., Yuan, C.-M., Gao, X.-S.. Efficient algorithm for time-optimal feedrate planning and smoothing with confined chord error and acceleration. The International Journal of Advanced Manufacturing Technology. 2013; 66(9-12): 1685-1697. 10 Fan, W., Gao, X.-S., Lee, C.-H., Zhang, K., Zhang, Q.. Time-optimal interpolation for five-axis CNC machining along parametric tool path based on linear programming. International Journal of Advanced Manufacturing Technology. 2013; 69(5-8): 1373-1388. 11 Sun, Y. W., Zhao, Y., Bao, Y. R., Guo, D. M.. A novel adaptive-feedrate interpolation method for NURBS tool path with drive constraints. International Journal of Machine Tools and Manufacture. 2014; 77: 74-81. 32
12 Sun, Y., Zhou, J., Guo, D.. Variable feedrate interpolation of NURBS Toolpath with geometric and kinematical constraints for five-axis CNC machining. Journal of Systems Science and Complexity. 2013; 26(5): 757-776. 13 Sun, Y., Zhao, Y., Xu, J., Guo, D.. The feedrate scheduling of parametric interpolator with geometry, process and drive constraints for multi-axis CNC machine Tools. International Journal of Machine Tools and Manufacture. 2014; 85: 49-57. 14 Erkorkmaz, K., Altintas, Y.. High speed CNC system design. Part I: jerk limited trajectory generation and quintic spline interpolation. International Journal of Machine Tools and Manufacture. 2001; 41(9): 1323-1345. 15 Suh, S.-H., Kang, S. K., Chung, D.-H., Stroud, I.. Theory and design of CNC systems: Springer, 2008. 16 Jeon, J. W., Ha, Y. Y.. A generalized approach for the acceleration and deceleration of industrial robots and CNC machine tools. IEEE Transactions on Industrial Electronics. 2000; 47(1): 133-139. 17 Luo, F.-Y., Zhou, Y.-F., Yin, J.. A universal velocity profile generation approach for high-speed machining of small line segments with look-ahead. The International Journal of Advanced Manufacturing Technology. 2007; 35(5-6): 505-518. 18 Zhiming, X., Jincheng, C., Zhengjin, F.. Performance evaluation of a real-time interpolation algorithm for NURBS curves. The International Journal of Advanced Manufacturing Technology. 2002; 20(4): 270-276. 19 Yeh, S.-S., Hsu, P.-L.. Adaptive-feedrate interpolation for parametric curves with a confined chord error. Computer-Aided Design. 2002; 34(3): 229-237. 33
20 Yong, T., Narayanaswami, R.. A parametric interpolator with confined chord errors, acceleration and deceleration for NC machining. Computer-Aided Design. 2003; 35(13): 1249-1259. 21 Lin, M.-T., Tsai, M.-S., Yau, H.-T.. Development of a dynamics-based NURBS interpolator with real-time look-ahead algorithm. International Journal of Machine Tools and Manufacture. 2007; 47(15): 2246-2262. 22 Lee, A.-C., Lin, M.-T., Pan, Y.-R., Lin, W.-Y.. The feedrate scheduling of NURBS interpolator for CNC machine tools. Computer-Aided Design. 2011; 43(6): 612-628. 23 Fan, W., Gao, X.-S., Yan, W., Yuan, C.-M.. Interpolation of parametric CNC machining path under confined jounce. The International Journal of Advanced Manufacturing Technology. 2012; 62(5-8): 719-739. 24 Zhao, H., Zhu, L., Ding, H.. A real-time look-ahead interpolation methodology with curvature-continuous B-spline transition scheme for CNC machining of short line segments. International Journal of Machine Tools and Manufacture. 2013; 65: 88-98. 25 Zhao, H., Lu, Y., Zhu, L., Ding, H.. Look-ahead interpolation of short line segments using B-spline curve fitting of dominant points. Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture 2015; 229(7): 1131-1143. 26 Liu, M., Huang, Y., Yin, L., Guo, J., Shao, X., Zhang, G.. Development and implementation of a NURBS interpolator with smooth feedrate scheduling for CNC machine tools. International Journal of Machine Tools and Manufacture. 2014; 87: 1-15. 27 Qiao, Z., Wang, H., Liu, Z., Wang, T., Hu, M.. Nanoscale trajectory planning with flexible Acc/Dec and look-ahead method. The International Journal of Advanced Manufacturing 34
Technology. 2015: 1-11. 28 Heng, M., Erkorkmaz, K.. Design of a NURBS interpolator with minimal feed fluctuation and continuous feed modulation capability. International Journal of Machine Tools and Manufacture. 2010; 50(3): 281-293. 29 Farouki, R. T., Tsai, Y.-F.. Exact Taylor series coefficients for variable-feedrate CNC curve interpolators. Computer-Aided Design. 2001; 33(2): 155-165.
35