An adaptive parametric interpolator for trajectory planning

An adaptive parametric interpolator for trajectory planning

Advances in Engineering Software 41 (2010) 180–187 Contents lists available at ScienceDirect Advances in Engineering Software journal homepage: www...

895KB Sizes 0 Downloads 39 Views

Advances in Engineering Software 41 (2010) 180–187

Contents lists available at ScienceDirect

Advances in Engineering Software journal homepage: www.elsevier.com/locate/advengsoft

An adaptive parametric interpolator for trajectory planning Xin Wang *, Junwei Wang, Zhi Rao HIT Campus of ShenZhen University Town, XiLi, ShenZhen 518055, China

a r t i c l e

i n f o

Article history: Received 30 November 2007 Received in revised form 23 January 2009 Accepted 28 August 2009 Available online 22 October 2009 Keywords: Digital convolution Velocity planning NURBS Acceleration/deceleration limited Jerk limited

a b s t r a c t A real-time interpolation algorithm for trajectory planning is studied in this paper. The NURBS interpolation algorithm is proposed to confine contour errors and feedrate fluctuations. The feedrate is adjusted adaptively according to the specified acceleration/deceleration values and jerk value. A direct digital convolution method is also introduced into velocity planning for NURBS interpolator, and it is more efficient than the traditional method of polynomial functions. The feedrate at the sharp corner is smoothed by imposing limitations on the acceleration and jerk values generated in the machining process. Since the computation of the total length of NURBS curve is required for the digital convolution method, a numerical adaptive quadrature algorithm is used to approximate the integrand. Simulation results demonstrate the effectiveness of the proposed interpolator for machining curved paths. Ó 2009 Elsevier Ltd. All rights reserved.

1. Introduction In modern CNC system the machining of complex shape parts is a very important problem. However, conventional CNC machines only provide line and circular interpolators, so most of complex geometric-shape parts designed with CAD/CAM systems have to be approximated with too much small line and circular segments. Such methods suffer from the following problems: (1) For accurate machining, larger NC data files need to be transmitted. It is always a heavy burden for the high-speed machining system. (2) At the junctions of line segments the acceleration discontinuity and excessive jerk would occur at high speed. So the system vibration is easily arising and the machining quality would be reduced. Thus the conventional interpolating methods are not available in highspeed and high-accuracy machining of modern manufacturing systems. All kinds of methods of parametric curves and surfaces have been studied to solve the above problems, such as Bezie curve, B-spline curve and NURBS curve. A large variety of shapes are generated by methods of modification or manipulation operations in geometric modeling [1,2]. Also in modern manufacturing NURBS interpolators have been developed since NURBS curve can express both standard analytical shapes and free-form curves and surfaces. Because it is not required to segment curves or surfaces into linear and circular segments for NURBS interpo-

* Corresponding author. Fax: +86 75526033774. E-mail address: [email protected] (X. Wang). 0965-9978/$ - see front matter Ó 2009 Elsevier Ltd. All rights reserved. doi:10.1016/j.advengsoft.2009.09.010

lators, the transmitted data is decreased substantially and machining speed and quality are greatly improved. So researchers have proposed various interpolation algorithms based on NURBS in CNC and robotics fields. Zhang and Greenway [3] presented a real-time NURBS interpolator for a six-axis robot by using an open-architecture controller system as a testbed. Shpitalni et al. [4] developed first-order approximation interpolation algorithms using Euler and Taylor’s expansions. Furthermore, Yang and Kong [5] proposed an interpolator based on second-order Taylor expansion, which obtained more precise results. Yeh and Hsu [6] proposed two kinds of interpolators, speed-controlled and adaptive-feedrate interpolators for machining parametric curves. Nevertheless, most of the algorithms attempted to maintain a constant feedrate without considering the machine’s dynamic capabilities. The feedrate fluctuations may be caused by huge accelerations and jerks of servomechanisms, which might result in deteriorated machining accuracy for exceeding the machine’s dynamic capabilities. Therefore Erkorkmaz and Altintas [7] introduced a new quintic spline interpolation technique for more improvement. Yong and Narayanswami [8] improved their work by imposing limitations on the acceleration/deceleration in adaptive areas. However, the jerk limit was not considered in these algorithms. To obtain a smooth acceleration/deceleration feedrate profile, jerk-limited feedrate planning was explicitly included in [9], and Nam and Yang [10] proposed a look-ahead interpolation scheme which considered chord errors, feedrate fluctuations and jerk limitation in the design. In this paper an adaptive NURBS interpolation realization method is proposed to improve machining precision for

181

X. Wang et al. / Advances in Engineering Software 41 (2010) 180–187

considering feedrate fluctuations, chord errors, and jerk limitation in the design. The algorithm consists of four different modules to perform the real-time interpolation, such as the predictor, velocity adaptive, chord corrector adaptive, ACC/DEC and Jerk adaptive modules. Digital convolution method [11] is introduced to generate a feedrate profile with limited jerk and ACC/DEC. Simpson adaptive quadrature method is also utilized to obtain the length of the NURBS curve. Newton–Raphson iteration method is used to find the parameter value of deceleration starting point. Simulation results with MATLAB demonstrate the effectiveness of the proposed interpolator for machining curved paths defined by NURBS.

2.1. Definition and properties of NURBS curve A pth-degree NURBS curve is defined by [12]

a6u6b

ð1Þ

where



1 ui 6 u 6 uiþ1 0

ð2Þ

otherwise

ð3Þ

{Pi} are the control points, {wi} are the corresponding weights, {Ni,p(u)} are the pth-degree B-spline basis functions defined on the non-periodic knot vector.

U ¼ fa; . . . a; upþ1 ; . . . ; ump1 ; b; . . . bg |fflfflffl{zfflfflffl} |fflfflffl{zfflfflffl} pþ1

pþ1

wðuÞ ¼

The homogeneous coordinates offer an efficient method of representing NURBS curves. For a given set of control points {Pi} and weights {wi}, the weighted control points P w i ¼ ðwi xi ; wi yi ; wi zi ; wi Þ are constructed. Then the non-rational B-spline curve in fourdimensional space is defined as

C w ðuÞ ¼

n X

N i;p ðuÞPw i

ð4Þ

i¼0

By applying the perspective map H, the corresponding rational B-spline curve is obtained. And Cw(u) is mapped into C(u). Thus C(u) is a NURBS curve. The NURBS curve interpolators is required to compute the first and second derivatives, but the derivatives of rational functions are too complicated. According to the Eq. (2), formulas are developed that express the derivatives of C(u) in terms of the derivatives of Cw(u). Let

wðuÞCðuÞ AðuÞ CðuÞ ¼ ¼ wðuÞ wðuÞ

ð5Þ

where A(u) is the vector-valued function. The coordinates are the first three coordinates of Cw(u). Then the first derivative of C(u) is given by 0

0

wðuÞA ðuÞ  w ðuÞAðuÞ wðuÞ2

0

n X

0! ¼ 1;

AðuÞ ¼

n X

Ni;p ðuÞwi pi ;

i¼0

Ni;p ðuÞwi :

ð8Þ

i¼0

Trajectory will be generated before interpolating the path defined by NURBS, so the total length of the curve must be calculated in advance. The NURBS curve is designated to be R(u), and the length along the curve is denoted by S. Then the length from R(u1) to R(u2) is derived by

Z

u2

where

  dR  du du

dR du

¼



ð9Þ

dxðuÞ dyðuÞ dzðuÞ du du du

 ;

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi  r  2  2  2ffi dRðuÞ dxðuÞ dyðuÞ dzðuÞ þ þ .  du  ¼ du du du

In general, the solution of the Eq. (9) is quite difficult to be obtained. A numerical method, called Adaptive Simpson Quadrature, is widely used to provide a numerical approximation to S. The criterion for determining when to stop subdividing an interval is |S(u1, um) + S(um, u2)  S(u1, u2)|/15 < e, where [u1, u2] is an interval with midpoint um. S(u1, u2) ,S(u1, um) and S(um, u2) are the estimated values given by Simposn’s rule on the corresponding intervals. e is the desired tolerance for the interval. 2.3. Motion planning

.

C ðuÞ ¼

  k k! ¼ C ik ¼ ; ðk  iÞ!i! i

u1

u  ui uiþpþ1  u Ni;p1 ðuÞ þ Niþ1;p1 ðuÞ N i;p ðuÞ ¼ uiþpþ1  uiþ1 uiþp  ui

0

where



Ni;0 ðuÞ ¼

ð7Þ

2.2. Computing the length of the NURBS curve

2. Realization of NURBS interpolation algorithm

Pn Ni;p ðuÞwi Pi CðuÞ ¼ Pi¼0 n i¼0 N i;p ðuÞwi

  P k AðkÞ ðuÞ  ki¼1 wðiÞ ðuÞC ðkiÞ ðuÞ i ðkÞ C ðuÞ ¼ wðuÞ

0

A ðuÞ  w ðuÞCðuÞ ¼ wðuÞ

The conventional polynomial types of planning motion trajectory can provide most of existing ACC/DEC motion planning approaches for CNC such as trapezoidal curve, cubic spline, S-curve. However, heavy computation load is caused so that they are difficult to be implemented by high-speed and high-accuracy CNC systems. So a digital convolution method in motion planning is introduced. It is more effective than conventional polynomial methods. A brief deduction is given in the following. Ts is denoted as the sampling time. Ta = nTs is the acceleration time. Let digital convolution be

HðkT s Þ ¼

1 m

16k6m

ð10Þ

X(kTs) is denoted as the input. After performing a digital convolution H(kTs), the output is obtained as follows

YðkT s Þ ¼

XðkT s Þ  Xððk  mÞT s Þ þ Yððk  1ÞT s Þ m

ð11Þ

The shape of S-curve velocity profile can be obtained by twice of digital convolution. The process is shown in Fig. 1. The formulas of digital convolution are given as follows



Smax ¼ nT s V max

ð12Þ

ð6Þ w

Since A(u) and w(u) represent the coordinates of C (u), their first derivatives are obtained according to the algorithms which computing the derivatives of the B-spline curve. The higher order derivatives of the NURBS are computed by

T1 ¼

V max ¼ n1 T s Amax 

T 2 ¼ V max

1

Aa v g



ð13Þ 1 Amax

 ¼ n2 T s

ð14Þ

182

X. Wang et al. / Advances in Engineering Software 41 (2010) 180–187

X (kTs )

1 n1Ts

1 n2Ts

*

*

0

n2Ts

n2Ts

n1Ts

nTs

Vmax

(n + n1 + n2 )Ts

(n1 + n2 )Ts

Fig. 1. The S-curve velocity profile obtained by convolution.

Aav g ¼

V max V max Am J m V max ¼ ¼ Ta T 1 þ T 2 þ T 3 A2m þ J m V max

ð15Þ

H1 ðkT s Þ ¼ 1=T 1

0 < kT s < T 1

ð16Þ

H2 ðkT s Þ ¼ 1=T 2

0 < kT s < T 2

ð17Þ

XðkT s Þ ¼ V max

0 < kT s < T

ð18Þ

where Smax is the total length, Vmax is the maximal velocity, Amax is the maximal acceleration, and Aavg is the average acceleration. Smax can be derived by the method introduced by Section 2.2. Then the output Y(kTs) = X(kTs)  H1(kTs)  H2(kTs) is the S -curve velocity profile. 2.4. Real-time interpolator with predictor and correctors modules A predictor–corrector interpolation method is introduced to implement the interpolator for NURBS curve. The interpolator includes four modules, predictor module, velocity adaptive module, chord error adaptive module, ACC/DEC and jerk adaptive module. The whole program structure for the NURBS interpolator is shown in Fig. 2. The flowchart of the proposed real-time interpolator is shown in Fig. 3. The first one is the predictor module, which estimates the next interpolation point. The velocity adaptive module is utilized to control the feedrate command accuracy. The chord error module confines the chord error caused by the interpolation process. The adaptive module of ACC/DEC and jerk is to limit the maximums of ACC/DEC and jerk at the velocity profile sharp corners.

Compute the first derivatives and the second derivatives of the interpolation point.

Pk ′ (u )

Compute the length of the curve

L

Motion planning by digital convolution method

Vmax Ta

Amax Aavg

Velocity, maximum acceleration, average acceleration and sample time

Pk ′ (u )

Fig. 3. The data process flow.

2.4.1. The predictor module In the predictor stage, the next interpolation point is estimated by using well-known Taylor’s expansion, the second-order Taylor’s expansion interpolator for generating uk+1 is described by

Pk ′′ (u )

Pi (uk +1 )

Vk

NURBS interpolation, compute interpolation point Pi (uk ) and uk +1

uk( m+1+1)

Servo control system

Pi (uk +1 )

uk( m+1)

According to the predictor module, velocity adaptive corrector module, chord corrector adaptive module, ACC/DEC and Jerk

Fig. 2. The schematic diagram of the adaptive interpolation algorithm.

CNC

183

X. Wang et al. / Advances in Engineering Software 41 (2010) 180–187

0

dv ðtÞ

v 2k

dt B T B t¼t k  þ @  dCðuÞ 2   dt  2

vk

uk¼1  uk þ T  dCðuÞ  du 

u¼uk

u¼uk



1

2

 d duCðuÞ 2

u¼ui C C   A dCðuÞ4  dt 

dCðuÞ du

C (ui +1 ) Circle

NURBS curve

u¼ui

ð19Þ

Li where CðuÞ ¼ xðuÞ~i þ yðuÞ~ j þ zðuÞ~ k. T denotes the sampling time of the system. uk is the value of u at time tk. vk is the velocity at time tk. To reduce the computing time, the backward difference approx€ are simimation is adopted to estimate these values, where u_ and u ply given by:

3uk  4uk1 þ uk2 u_ k ¼ 2T

ERi

ρi

C (ui ) = R (ui )

ð20Þ

Fig. 4. Near-arc approximation method.

€k ¼ u

uk  2uk1 þ uk2

ð21Þ

T2

At parameter u = uk, the curvature of the interpolation point is:

Substituting (20) and (21) into (19) yields:

ukþ1 ¼ 3uk  3uk1 þ uk2

8k P 2

ð22Þ

Usually u0 = 0, u1 and u2 are derived by Eq. (19), the other values of uk are given by Eq. (22). The velocity obtained by the predictor module is supposed as Vpre(k), Vpre(k) may have a large deviation from the specific velocity, so the corrector is needed to correct Vpre(k). 2.4.2. Velocity corrector module In this module, the velocity Vpre(k) is modified until the prescribed feedrate is generated by the velocity profile planning. The processing is shown as follows: ðnÞ ukþ1



¼ aðuk 

ðnþ1Þ ukþ1 Þ

þ uk

8n P 1

V k ðn1Þ

bðV k  V k

Þ þ V k

ð23Þ ð24Þ

where uk is the value of parameter at time tk, b is the value of parameter u after n iteration step at time tk, V k is the desired feeis the current feedrate command, drate command at tk, and V n1 k which is computed at uk after (n  1) times iterations and given by ðn1Þ Vk

¼

      ðn1Þ P ukþ1  Pðuk Þ T

ð25Þ

jP0  P00 j 0 3

jP j

¼



z0

2

z0 þ

z00 z00 ½ðx0 Þ2

þ



x0

2

x0 þ

x00 x00 ðy0 Þ2

þ

#1=2 y0

2 y00

ð26Þ

where e is a specified tolerance of the feedrate command errors. The iterative algorithm is demonstrated to be convergent in [14]. In the velocity corrector module, it generates a new interpolation velocity Vcorr(k). 2.4.3. Adaptive module of chord error In order to achieve the high machining quality, it is usually desirable that the machining feedrate is kept as constant. But in the region where the curvature of the interpolating curve is large, the chord error generated by the interpolation process may exceed the prescribed tolerance. Therefore, the adaptive module of chord error can adaptively adjust the velocity in terms of the curvature radius of the interpolation points when the chord error exceeds the specified tolerance. A near-arc approximation is adopted to calculate the chord error, as shown in Fig. 4.

ð27Þ

ðz0 Þ2 

where {xi, yi, zi} is the interpolation point. The curvature radius will be:

r ¼ 1=k

ð28Þ

and the chord error can be derived by Eq. (29).

ER ¼ r 

qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi r2  ðL=2Þ2

ð29Þ

To bound the chord error, the feedrate should be adjusted adaptively based on the curvature radius. And the algorithm of determining the feedrate Vcorr(k) is given as:

V chor ðui Þ ¼

8 > < F; > :

2 TS

if qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi q2i  ðqi  ERi Þ2 else

2 TS

qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi q2i  ðqi  ERi Þ2 > F

ð30Þ where Ts is the sampling time. The new feedrate is given as V(ui) = min {Vcorr(ui), Vchor(ui)}. After the chord error adaptive module, some feedrate sharp corners would arise. From the feedrate profile, the velocity sharp corners can be obtained as

fV min ðkÞ; uðkÞg k ¼ 1; 2; 3 . . .

The terminated condition for the corrector is chosen as



V   V ðn1Þ



k k

6e



V k



"

y0

y00

ð31Þ

where Vmin(k) is the minimum velocity of the kth velocity sharp corner and u(k) is the parameter value of the velocity sharp corner point. 2.4.4. Adaptive module of ACC/DEC and Jerk Usually the velocity sharp corners are harmful for the high feedrate and high quality machining, because the Deceleration/Acceleration and jerk at these regions may easily change beyond machine driver’s capability. In this paper, the adaptive module of ACC/DEC and Jerk with the S-shape ACC/DEC profile is adopted to smooth the velocity sharp corner. It is developed to adjust the acceleration/deceleration and jerk values to slow down the feedrate. For each sharp corner, the deceleration distance Sdec and the parameter value udec of the deceleration point will be calculated. (A) Calculation of the deceleration distance Sdec. The deceleration velocity profile is shown as in Fig. 5. The deceleration distance is derived from the Eq. (32)

184

X. Wang et al. / Advances in Engineering Software 41 (2010) 180–187

V (udec ) = F

f0

S curve start point

Feedrate

f1

Chord error adaptive

f2 Velocity

f3 Time Time

a0

Accelertion

a3 Vmin

a1

Am

a2

t0

S Dec

udec

Jm T2

T1 Jerk

Acc/Dec and Jerk adaptive

t1

t2

T3

t3

ud Parametric value

Time

Fig. 6. The process on sharp corner.

−Jm XðkT s Þ ¼ F  V min

ð37Þ

Fig. 5. Deceleration profile for S-curve.

2

Sdec ¼

F þ 2Am

A3m 3J 2m

þ

V 2min

Am F Am V min þ  2J m 2J m 2Am

ð32Þ

where F is the planning velocity, Vmin is the velocity of the turning point in the sharp corner. Am and Jm correspond to the maximum acceleration and jerk. The acceleration distance satisfies SAcc = SDec. (B) Determination of parameter value uDec of the deceleration starting point. After calculating the deceleration distance SDec, the parameter value uDec of the deceleration starting point P(uDec) should be found. It is the solution of the following equation

Z

udec

ud

  dP  du ¼ SDec du

ð33Þ

The left term of Eq. (33) is expressed as the length from P(ud) to P(udec). It equals to deceleration distance. So the solution gives the parameter udec. Assume that

f ðuÞ ¼

Z

udec

ud

  dR  du  SDec ¼ 0 du

ð34Þ

The parameter value ud is supposed as the initial root of the Eq. (34), then the Newton–Raphson iteration method is utilized to find the root of the equation. After several time iterations, ud is derived by

LengthðPðud Þ; Pðudec ÞÞ ¼ SDec

ð35Þ

(C) The slowing-down process for the velocity sharp corner based on digital convolution method. In order to limit the ACC/DEC and jerk values generated in the interpolation process, the S-shape curve is adopted to slow down the velocity at the sharp corner based on the digital convolution method. The process is shown as Fig. 6. Firstly, the sharp corner of velocity profile is obtained from Eq. (31). The planning velocity is supposed to be F. The maximum acceleration is to be Am, and the maximum jerk is to be Jm. For the jth velocity sharp corner, Vmin is denoted as the minimum velocity, then

Smax ¼ 2SDec

ð36Þ

By applying the introduced digital convolution method, an S-shape velocity profile can be obtained {Y(kTs), 0 < k < N} for the decelerate process. According to Newton–Raphson iteration algorithm, the parameter value uDec of the deceleration point P(uDec) in the kth sharp corner of the velocity profile can be obtained. In the interpolation points, it is assumed that uk < uDec < uk+1. Then the decelerate process for the velocity sharp corner is shown as:

Vðk þ nÞ ¼ Fðk þ nÞ  Y n

0
ð38Þ

3. Performance analysis and simulation results In this section, simulations are performed to evaluate the proposed interpolation algorithm by software MATLAB. As an example, a testing NURBS curve is chosen and the configuration parameters are given in the Table 1. The simulation result of the testing curve is shown in Fig. 7. The Adaptive Simpson quadrature method provides a numerical approximation to the total of the testing length. It is obtained that Smax = 4.1250 cm. The specified maximum velocity value is supposed as Vmax = 2 cm/s. The maximum value of acceleration is amax = 2 cm/ s2, and the maximum value of jerk Jmax = 8 cm/s3. Then the average value of acceleration is given as Aavg = Vmax/(Amax/Jm + Vmax/ Amax) = 1.6 cm/s2. Let the sample time of the system Ts = 1 ms. According to the digital convolution method, the S-curve velocity profile can be obtained, which is shown in Fig. 8. The corresponding acceleration and jerk profiles are shown as in Figs. 9 and 10. With the proposed predictor–corrector algorithm in this paper, the test NURBS curve is interpolated. Figs. 11 and 12 are the velocity profile and velocity error profile after only velocity corrector module interpolation, respectively. In this example the error rate of the maximum velocity is supposed as e = 0.002. Fig. 12 shows that the velocity corrector module can confine the interpolation feedrate within the specified values. The specified maximum chord error is e0 = 0.8 lm. But from Fig. 13, the maximum chord error reaches e0 = 1.4 lm. Fig. 14 shows the resulting of chord error profile in parameter domain after velocity corrector and chord error corrector interpolation. It can be seen that the maximum chord error is limited in the specified range e 6 0.8 lm. And the resulting velocity profile is shown as in Fig. 15.

185

X. Wang et al. / Advances in Engineering Software 41 (2010) 180–187 Table 1 The configuration of the testing NURBS curve. From

NURBS

Number of control points Order Knot vector The coordinates of control points

11 3 [0 0 0 0.1110 0.2220 0.3330 0.4440 0.5550 0.6660 0.7770 0.8880 1 1 1] (0.8, 1.2, 0), (0.5, 0.8, 0), (0, 0.8, 0), (0.4, 0.4, 0), (0.3, 0, 0), (0.8, 0.3, 0), (1.3, 0.8, 0), (1.3, 0, 0), (1.2, 0.4, 0), (1.6, 0.8, 0), (1.1, 0.8, 0), (0.8, 1.2) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

Weights

Acceleration profile for S curve

Test 2D Starvshape Curve. control points control polygon test curve

10 8 6

2.5 2 Acceleration /(cm-s-2)

12

1 0 -1 -2 -2.5

4

0

500

2

1000 1500 Time /ms

2000

Fig. 9. Acceleration profile.

0 0

5

10

15

5 Jerk /(cm-s-3)

The velocity profile after velocity planning

Velocity /(cm-s-1)

2 1.5

Jerk profile

10

Fig. 7. The simulation result of the NURBS curve.

0

-5 1

-10 0.5 0

0

500

1000 1500 Time /ms

2000

Fig. 10. Jerk profile.

0

500

1000 1500 Time /ms

2000

The velocity profile after velocity adaptive

Fig. 8. The S-shape velocity planning.

From Fig. 15, it can be seen that there are four velocity sharp corners, where the Acc/Dec and Jerk are usually very large. Feedrate automatically decreases at large curvature areas to confine the chord errors shown as Fig. 15. Figs. 16 and 17 show the Acc/ Dec and Jerk profiles generated after interpolation with velocity corrector and chord error corrector. The maximum acceleration reaches about 5.8 cm/s2, the maximum jerk about 580 cm/s3. In practice, it is easy to exceed the machine capability of motor driver, so the Acc/Dec and Jerk corrector module is used to reduce the maximum Acc/Dec and jerk value generated in the interpolation process. Information about the four velocity sharp corners is shown in Table 2. From Eq. (32), deceleration distances of each sharp corner are: S1 = 0.0940 cm, S2 = 0.1339 cm, S3 = 0.1535 cm, S4 = 0.1323 cm.

Velocity /(cm-s-1)

2

1.5

1

0.5

0

0

500

1000 1500 Time /ms

Fig. 11. The velocity profile.

2000

186

X. Wang et al. / Advances in Engineering Software 41 (2010) 180–187

4

x 10

The velocity error

-3

The velocity profile after chord error adaptive 2

2

Velocity /(cm-s-1)

Velocity error /(cm-s-1)

e=0.002

0

-2

-4

1.5 1 0.5

0

500

1000 1500 Time /ms

0

2000

0

500

Fig. 12. The velocity error profile.

-4

1.4

x 10

1000 1500 Time /ms

2000

Fig. 15. The velocity profile.

Chord error profile after velocity adaptive

The acceleration profile after velocity and chord error adaptive 3 Acceleration /(cm-s-2 )

chord error /cm

1.2 1 0.8 0.6 0.4 0.2 0

0

500

1000 1500 Time /ms

2000

2 1 0 -1 -2 -3

0

500

1000 1500 Time /ms

Fig. 13. The chord error profile.

2000

2500

Fig. 16. The acceleration profile.

1

x 10

The chord error

-4

0

0.6

Jerk /(cm-s-3 )

chord error /cm

0.8

0.4 0.2 0

The jerk profile after chord error adaptive

100

-100 -200 -300 -400 -500

0

0.2

0.4 0.6 Parameter u

0.8

1

-600

Fig. 14. The chord error profile after corrector.

0

500

1000 1500 Time /ms

2000

Fig. 17. The jerk profile.

By using the Newton–Rapson iteration method, the parameter values of each deceleration starting point are computed as follows: u1 = 0.1584, u2 = 0.3701, u3 = 0.6130, u4 = 0.8331. The maximum acceleration and jerk provided by the machine system are supposed to be Am = 4 cm/s2 and Jm = 20 cm/s3. Then the Acc/Dec and Jerk adaptive module can readjust the velocity in the sharp corner. The final velocity profiles after ACC/DEC and jerk corrector interpolation are shown as in Figs. 18 and 19. The acceleration and jerk profile after velocity corrector, chord error corrector and Acc/Dec

Table 2 Information about the four velocity sharp corner. Position

Velocity

u1 = 0.1635 u2 = 0.378 u3 = 0.6220 u4 = 0.8407

v1 = 1.6550 cm/s v2 = 1.5730 cm/s v3 = 1.5370 cm/s v4 = 1.5760 cm/s

187

X. Wang et al. / Advances in Engineering Software 41 (2010) 180–187

The velocity profile after jerk and acceleration adaptive

Jerk profile after jerk and acceleration adaptive 30

2 Velocity /(cm-s-1)

20 Jerk /(cm-s-3)

1.5

1

0.5

10 0 -10 -20 -30

0

0

500

1000 1500 Time /ms

2000

0

Velocity /(cm-s-1)

The velocity profile after jerk and acceleration adaptive 2.05 2

1.65

800

900 1000 Time /ms

1100

Acceleration /(cm-s-2 )

The acceleration profile after jerk and acceleration adaptive 3 2 1 0 -1 -2 0

500

1000 1500 Time /ms

2000

4. Conclusion In this paper, an adaptive NURBS interpolator for trajectory planning is proposed. The proposed algorithm can confine the velocity errors and the chord errors to meet the requirements of machining accuracy. And the acceleration/deceleration and jerk values generated in the interpolation process are limited to match the dynamics capabilities of the machines. Digital convolution method is introduced into the interpolation algorithm for eliminating the computation load extremely. In the feedrate sharp corner, the digital convolution method is also used for smoothing the feedrate to ensure the acceleration and jerk within the specified tolerances. Simulations results by software of MATLAB demonstrate that the proposed interpolation algorithm can achieve the best machining accuracy and machining speed. References

Fig. 19. The local amplificatory velocity profile.

-3

1000 1500 Time /ms

Fig. 21. The jerk profile.

Fig. 18. The resulting velocity profile.

700

500

2000

Fig. 20. The acceleration profile.

corrector are shown as in Figs. 20 and 21, showing that high acceleration and jerk values are eliminated into the specified range.

[1] Dimas E, Briassoulis D. 3D geometric modelling based on NURBS: a review. Adv Eng Softw 1999;30(9):741–51. [2] Pourazady M, Xu X. Direct manipulations of B-spline and NURBS curves. Adv Eng Softw 2000;31(2):107–18. [3] Zhang QG, Greenway RB. Development and implantation of a NURBS curve motion interpolator. Robot Com-Int Manuf 1998;14(1):27–36. [4] Shpitalni M, Koren Y, Lo CC. Realtime curve interpolators. Comput Aided Des 1994;26(11):832–8. [5] Yang DCH, Kong T. Parametric interpolator versus linear interpolator for precision CNC machining. Comput Aided Des 1994;26(3):225–34. [6] Yeh SS, Hsu PL. Adaptive-feedrate interpolation for parametric curves with a confined chord error. Comput Aided Des 2002;34(3):229–37. [7] Erkorkmaz K, Altintas Y. High speed CNC system design. Part I. Jerk limited trajectory generation and quintic spline interpolation. Int J Match Tools Manuf 2001;41:1325–45. [8] Yong T, Narayanaswami R. A parametric interpolator with confined chord errors, acceleration, deceleration for NC machining. Comput Aided Des 2003;35:1249–59. [9] Park J, Nam S, Yang M. Development of a real-time trajectory generator for NURBS interpolation based on the two-stage interpolation method. Int J Adv Manuf Technol 2005;26(4):359–65. [10] Nam SH, Yang MY. A study on a generalized parametric interpolator with realtime jerk-limited acceleration. Computer-Aided Design Peking University 2004;36(1):27–36. [11] Jeon JW. A generalized approach for the acceleration and deceleration of CNC machine tools. In: IEEE IECON 22nd international conference 1996;2: 1283–8. [12] Piegl L, Tiller W. The NURBS book. 2nd ed. New York: Springer; 1997. [14] Tsai Mi-Ching, Cheng Chung-Wei. A real-time predictor corrector interpolator for CNC machining. J Manuf Sci Eng 2003;125:449–60.