Sunteți pe pagina 1din 6

2015 International Conference on Process Control (PC)

June 912, 2015, trbsk Pleso, Slovakia

Interpolation method for robot trajectory planning


Martin Svejda,
Tomas Cechura
Department of Cybernetics
University of West Bohemia
Pilsen, Czech Republic
Email: msvejda@kky.zcu.cz, tomek89@ntis.zcu.cz

AbstractThis paper deals with the problem of interpola- of the pipes of complex geometries. New presented algorithm
tion of generated end-effector trajectories for application in is convenient for interpolation of the position coincident points
robotics. For complex shaped trajectories there are often many from weld trajectory generators because of the following im-
high resolution coincident points generated from CAD/CAM portant properties: natural interpolation through given position
systems or trajectory generators. The preprocessing (refining) coincident points with respect to continuity of velocity and
is necessary for proceeding these points to the manipulator
control system. Two interpolation methods are discussed: Line
acceleration, possibility to interpolate large amount of the
interpolation with polynomial blending and new proposed method coincident points with small mutual distance (precise points of
Cubic spline interpolation with recalculated feed rate. Second given resolution from trajectory generators), required velocity
introduced method describes how to interpolate the coincident and acceleration profile. The paper is divided as follows:
points and compute the feed rate of the interpolation in order to Firstly the standard line interpolation with polynomial blending
reduce undesirable peaks in acceleration and ensure demanded algorithm is used for trajectory planning of the end-effector
position, velocity and acceleration profile along the trajectory. The coordinates in the task space. Secondly considering some
new interpolation algorithm was implemented to the trajectory drawbacks of the algorithm the new cubic spline interpolation
generator for complex pipe weld inspection robot. Experimental algorithm with recalculated feedrate is proposed. Finally new
measurements made on control system of real prototype are algorithm is used for trajectory planning of the NDT manipu-
finally presented for evaluation of proposed method performance.
lator for pipe welds.

I. I NTRODUCTION II. D ISCUSSION ON CONVENIENT TRAJECTORY PLANNING


ALGORITHMS
The main problem in robotics regarding the trajectory
planing of the manipulator end-effector is correct computation Complex overview of the robot trajectory planning can be
of the demanded setpoints (position and orientation) in task found in [1], [2], [3] but mainly for joint space planning.
space and their real-time interpretation in the control system of In addition, there are only the algorithms where the time for
the manipulator. There can be found many methods for dealing given position coincident points have to be known in advance.
with this problem. Note, that many algorithms for trajectory But this approach is not convenient for our purposes because
planning of manipulator are assumed for direct computation the knowledge of the interpolated trajectory properties such
of joint coordinates of manipulator depending on the given velocity and acceleration profile are much more significant.
initial and terminal point along the trajectory. This is typical The exact time stamps of the coincident points are only the
example for the joint trajectory planning of standard industrial consequence of required trajectory properties and it is difficult
manipulator (namely for pick and place applications). In this to determine them directly from generated position data.
case, the trajectory planning algorithm computes initial and
terminal position of the joints from initial and terminal position
of the end-effector given in the task space and the interpolation A. Line interpolation with polynomial blending
is performed in the joint space as time synchronous line
interpolation between these joints position with respect to We consider only algorithms for trajectory planning in the
given constraints (maximal velocity, acceleration, etc. of the task space because the motion of the end-effector is supposed
joint actuators). Unfortunately, this approach is much more to be fully controlled between given task space setpoints. There
suitable for simple pick and place applications because the is possibility to modify algorithm which is originally used for
shape of the trajectory between initial and terminal points in joint space trajectory planning and interpolate individual coor-
the task space is given by nonlinear kinematic transformation dinates in the task space with the line segments and suitable
forming hardly predictable behaviour of the end-effector in the polynomial blending segments in the vicinity of the coincident
task space. points. It is clear that this approach is only approximation
because the coincident points are not intersected exactly. On
The presented paper deals with the problem of the end- the other hand the line segments ensures native shape of the
effector trajectory planning where the precise following of the trajectory (from point to point) and the blending segment
desired trajectory in the task space plays important role con- can be parametrized appropriately. Firstly we suppose one 1-
cerning robots for arc welding and machining, non-destructive dimensional coordinate p and m desired coincident point pk
testing (NDT) and inspecting, etc. The main aim of the and the constraints on maximal velocity p kmax and acceleration
following research is develop the trajectory planning algorithm pkmax in each segment. Line interpolation with polynomial
for NDT manipulator which is supposed to inspect the welds blending is depicted in Fig. 1. The starting and the terminal

c
978-1-4673-6627-4/15/$31.00 2015 IEEE 406
2nd segment
(m-1) st segment coordinates P i the maximal velocities and accelerations have
1st segment
to be recomputed. One of the possibilities is depicted in Fig. 2
where we suppose that time for movement through the segment
will be the same for all coordinates.

Fig. 1. Scheme of line interpolation with polynomial blending

point of each polynomial blending segment is given as:


pkb = pk Tk p kmax
pka = pk Tk p kmax , (1)
Pk1 Fig. 2. Synchronisation of velocity and acceleration constraints in the
where t1 = 0, tk = T1 Tk + i=1 hi , k = 2 . . . m and hi is segment.
time between pk and pk+1 for given constant velocity p kmax .
Interpolation of the k-th line segment is obvious and is Synchronized constraints for velocity and acceleration
given as: sync
, async
vmax max , = {pos, , , } in each segments follow
p(t) = (t tk Tk )p kmax + pk for t htk + 2Tk , tk+1 i (2) from comparison the final time tf and from the condition on
the same acceleration time for coordinates.
= pkmax ,
p(t) p(t) = 0
sync
vmax
= vmax , async
max = vmax (5)
Substituting boundary condition in starting and terminal
points of blending segments on position, pka , pkb , see (1), veloc- where
ity p k1 k
max , p max and zero acceleration to 5-th order polynomial 
vmax max
 
amax max

function (6 conditions for 6 unknown parameters) we get only
the 4-th order polynomial function for k-th blending segment = min 1, , = min 1,
vmax max amax max
as follows: (6)
1 for all = {pos, , , } and max , max is traveled distance
p(t) = pk (t tk )3 (t tk 4Tk )(pkmax p k1
max )+ (3)
16Tk3 of given coordinate between segments.
+ (t tk Tk )pk1
max sync
Synchronous velocity vmax is used for calculating time hi
k1 1
= pmax
p(t) (t tk )2 (t tk 3Tk )(pkmax p k1
max ) between coincident points, see (1), (now it is the same for all
4Tk3 sync
coordinates in the segment). Synchronous velocity vmax and
3 sync

p(t) = 3 (t tk )(t tk 2Tk )(pkmax p k1max ) acceleration amax is used for calculating time difference Tk
4Tk in (4). Note that synchronous acceleration async max is used only
for t htk , tk + 2Tk i. for the first and the last blending segments due to keeping the
same time for accelerating and decelerating in these segments
Furthermore, we take into account the constraints on max- for all coordinates. Otherwise the maximal accelerations amax
imal acceleration pkmax (only in the blending segments, in the is used for remaining internal blending segments. The result
line segments the acceleration is zero). It can be easily shown of the trajectory planning algorithm is shown in Fig. 3 for
from the necessary condition ddt p(t) = 0 that the extreme of position and in Fig. 4 for orientation.
acceleration occurs for time t = tk + Tk . Substituting the
condition to the acceleration p(t) the term for unknown time 10
x,y,z

difference Tk is expressed as: 5


Position

0
3
Tk = |p k p k1
max | (4) 5
0 5 10 15 20 25
pmax max
4k t
Norm of Acceleration (black) Norm of Velocity (black)

1
Velocity x,y,z

0
In order to use 1-dimensional line interpolation with poly-
nomial blending algorithm for trajectory planning of manipula- 1
0 5 10 15 20 25
t
tors the problem have to be extended to multidimensional case. 4

We suppose that position and orientation of the end-effector are


Acceleration x,y,z

generally given with six dimensional coordinate P = [pm ] for 0

2
m = {x, y, z, , , } where x, y, z are position coordinates 4
0 5 10 15 20 25
and , , are orientation coordinates given by the Euler t

angles. The constraints are give together for translation move-


Fig. 3. Position, velocity and acceleration of translation motion (x-red,
ment vmaxpos , amaxpos (norm of velocity and acceleration) and y-green, z-blue) and their norm (black). Constraints are vmaxpos = 1,
for each orientation coordinate vmax , amax , vmax , amax , amaxpos = 4 .
vmax , amax . In order to synchronize the motion of task space

407
10
(i+1)-th segment
,,

5 interp. polynom:
i-th segment
Position

0
interp. polynom:
5
0 5 10 15 20 25
t
2
,,

0
Velocity

2
0 5 10 15 20 25
t
4
,,

2
Acceleration

4
0 5 10 15 20 25
t

Fig. 4. Position, velocity and acceleration of rotation motion (-red, - Fig. 5. Cubic spline interpolation
green, -blue). Constraints are vmax = 1.2, amax = 2.5, vmax = 1.5,
amax = 2, vmax = 2, amax = 1.5
Continuity of velocity (w.r.t. ):
B. Cubic spline interpolation with recalculated feed rate [3 2 1 0] Am m
i = [0 0 1 0] Ai+1 (9)
Unfortunately, it can be seen that line interpolation with where i = N 2 results in N 2 equations.
polynomial blending is not very suitable for interpolation
coincident point which are too close to each other. There Continuity of acceleration (w.r.t. ):
are two main inconveniences. Firstly, the norm of the trans-
[6 2 0 0] Am m
i = [0 2 0 0] Ai+1 (10)
lation velocity (or velocity of Euler angles) is not constant
along the blending segments, see Fig. 3 and there are many where i = 1 . . . N 2 results in N 2 equations.
applications where it can be fundamental problem (e.g. arc
welding, precise NDT testing, etc.). Secondly, there are peaks Zero acceleration (w.r.t. ) in the first and last segments:
in the acceleration when motion is passing through blending
segments, see Fig. 3, 4. This fact is getting much more [0 2 0 0] Am m
1 = 0, [6 2 0 0] AN 1 = 0
important mainly when there are many close coincident points results in 2 equation.
for interpolation because of possibility to excite undesirable
vibrations of the manipulator. Therefore, the line interpolation In total, we get 4N 4 equations (8, 9, 10, 11) for 4(N 1)
with the polynomial blending is much more convenient for pick unknown parameters Am i , i = 1 . . . N 1 for each coordinate
and place applications. Therefore the new algorithm based on m = {x, y, z, , , }. It results in solving linear system of
the spline interpolation with appropriate feed rate computation equation with sparse matrices:
was derived in order to interpolate coincident task space points. 3
0 0 0 m
P1
1) Interpolation coincident points by the cubic spline: We 3
0 0 0 P2m
suppose the interpolation of i-th segment of coordinates pm i , 30 Pm

0 0 3
m = {x, y, z, , , } by the cubic polynomial with parameter 3
1 0 0
Pm
2
, see Fig. 5. Position and directional derivatives are given in 0 13
0 " m# m
P3m

the matrix form as: 3 A 1
0 0 P

1 4
Am = (11)

2 2 2
pm 2 1 Am 0
 3
0

i () = (7) 1 0 Am
i 3
2 2

0 0 0
pmi () 1 11

= 32 2 1 0 Am
 
0

i 1 0 0

11 10 0
0
2 pm
i ()

= [6 2 0 0] Am
1
0 0 0
0
i
2 0 0 1 1
0
m T
where Am i = [ai3 ami2 am
i1 am
i0 ] are polynomial parame- where
ters for each coordinate and segment. It is clear that there are
more possibilities for choosing the polynomial parameters. It 30 = [0 0 0 1] , 31 = [1 1 1 1]
was shown experimentally that the best choice with respect to 20 = [0 0 1 0] , 21 = [3 2 1 0]
natural behaviour of interpolation curve is only the continuity
of position, velocity and acceleration in the coincident points 10 = [0 2 0 0] , 11 = [6 2 0 0]
(it generates minimal variance in the acceleration along the
trajectory). Therefore the boundary condition of each segment
is given for N coincident points Pim as: Note that it is necessary to solve the system of equations with
large sparse matrices for the cubic spline interpolation curve of
Continuity of position: each coordinate (there exist effective methods for solving, e.g.
sparse in Matlab). Interpolation curves for the coordinates
[0 0 0 1] Am m m m
i = Pi , [1 1 1 1] Ai = Pi+1 (8) with the same coincident points as we used above are shown
where i = 1 . . . N 1 results in 2N 2 equations. in Fig. 6.

408
40 5
Px Py
20 dPx/dphi dPy/dphi
0

xaxis

yaxis
ddPx/dphi2 ddPy/dphi2
0
5
20

40 10
0 50 100 150 200 250 300 350 400 0 50 100 150 200 250 300 350 400
phi phi

20 10
Pz Palpha

Palphaaxis
dPz/dphi 5 dPalpha/dphi
10
zaxis

ddPz/dphi2 ddPalpha/dphi2
0
0
5

10 10
0 50 100 150 200 250 300 350 400 0 50 100 150 200 250 300 350 400
phi phi

40 5

Pgammaaxis
Pbeta Pgamma
Pbetaaxis

20 dPbeta/dphi dPgamma/dphi
ddPbeta/dphi2 0 ddPgamma/dphi2
0
5
20

40 10
0 50 100 150 200 250 300 350 400 0 50 100 150 200 250 300 350 400
phi phi

Fig. 6. Cubic interpolation curves pm () and corresponding directional derivatives as a function of parameter .

2) Feed rate computation: The well-known problem for calculated using the following iteration:
parametrization of the curve is computation of the parameter
in such a way the arc-length, velocity and acceleration along

the curve comply desired position, velocity and acceleration i () 1
Z k
i ()
profile (typically trapezoidal velocity profile given by the k+1 = k +k k (s Si1 ) k k d

maximal velocity and acceleration constraints vmax , amax ). |0 {z }
The arc-length s((t)) of the parametrization ((t)) (only Adaptive Simpsons quadrature

the translation) is given as: (14)

Z (t) " x
pi ((t))
# Note that there are only several iterations needed for
((t)) y sufficient accuracy for the coincident point close to each other.
s((t)) = k k d(t), ((t)) = pi ((t))
0 (t) pzi ((t))
(12) For known (t), the equations (13) are used to express the
The transformation between velocity and acceleration of arc-
velocity (t) of the parameter from
and the acceleration (t)
length s(t) and parameter (t) is given by the linear rela- desired velocity v(t) and the acceleration a(t) profile.
tionship (for the given position). It can be derived by time
Finally, the interpolated point pm
i ((t)) in the segment
derivative of (12) as follows: is computed according to (7) and corresponding velocity
1 p m
i ((t)) and the acceleration pm
i ((t)) are given by time

(t) = v(t) (13)
derivative of (7) for known (t), (t), as follows:
(t)
k (t)
(t) k
T pm
i ()
  
(t) 2 (t) 2
p m
(v(t)) i ((t)) =
(t) = 3(t)2 2(t) 1 0 Am
i (t)

1 (t) 2 (t)
=
(t) a(t)

3 (15)
k (t) k (t) k

(t) k
2 pm
i () 2 pm
i ()
pm
i ((t)) = (t) + =
(t)
2
 m 
It can be easily shown that the integral (12) is not solvable = 6(t) 2 0 0 Ai 2 (t)+
 
in closed form for cubic polynomial parametrization ((t)). + 3(t)2 2(t) 1 0 Am i (t)

Therefore the new numerical algorithm was derived:
Using adaptive Simpsons quadrature, see [4], (e.g. quad
in Matlab) the integral (12) is numerically computed with
given accuracy for each segment. It results in the arc-length The interpolated trajectory through given coincident points
sequence S1 . . . SN 1 , where Si represent the arc-length along in time domain is depicted in Fig. 7. Note that peaks in
the trajectory from the beginning of the trajectory to i + 1-th acceleration are caused by the requirements of a constant
coincident point. velocity along the trajectory in spite of the coincident points
significantly change. This effect will be reduced for points to
The actual segment (active cubic polynomial) can be deter- be generated in finer resolution (e.g. for points derived from
mined from desired position profile s(t) and known sequence CAD systems or trajectory generators for welds in Section III).
of arc-length S1 . . . SN 1 . Suppose that the i-th segment is The feed rate function s(t) (t) and its time derivative are
actual. The correct value of the parameter (t) {0, 1} in depicted in Fig. 8 for position, velocity and acceleration profile
the i-th segment corresponding to desired arc-length s(t) is chosen for the constraints vmax = 1, amax = 4.

409
20 10
Px Py
0 dPx dPy

x axis

y axis
ddPx 0 ddPy
20

40 10
0 5 10 15 20 25 0 5 10 15 20 25
t t
5 20
Pz Palpha

alpha axis
0 dPz 10 dPalpha
z axis

ddPz ddPalpha
5 0

10 10
0 5 10 15 20 25 0 5 10 15 20 25
t t
50 5
Pbeta Pgamma

gamma axis
dPbeta dPgamma
beta axis

ddPbeta ddPgamma
0 0

50 5
0 5 10 15 20 25 0 5 10 15 20 25
t t

Fig. 7. Cubic interpolation curves pm () and its time derivative as a function of time.

30
s(t)
phi(t)
We have developed standalone application for generating
20
s(t), phi(t)

10
NDT testing trajectories according to a currently inspected
0
weld. It integrates trajectory generator which produces coin-
0 5 10 15 20 25
t cident points along the inspected weld trajectory with given
1
resolution and the second proposed interpolation method II-B.
ds(t)/dt, dphi(t)/dt

ds(t)/dt
dphi(t)/dt
0.5 Data output of the application is exported to the robot control
0
system as a sequence of task space coordinates with specific
0 5 10 15 20 25
t equal time differences.
10
2
d s(t)/dt , d phi(t)/dt

d2s(t)/dt2
5
d2phi(t)/dt2
2

0
2

10
2

0 5 10 15 20 25
t

Fig. 8. feed rate for cubic interpolation curves. Desired position s(t),
velocity v(t) and acceleration a(t) profile (red), computed position, velocity
and acceleration of parameter (t) (blue).

III. A PPLICATION IN NON - DESTRUCTIVE TESTING


The above stated interpolation methods were developed and
tested on prototype application in ultrasonic NDT of complex
pipe welds. Robotic manipulator SAVA has 5 DOFs [5] and is
capable of testing branch, circumferential, longitudinal welds
and both types of elbow welds. The prototype is controlled by
real-time Control System REX [6]. Fig. 10. Screen-shot of standalone application for generating inspection
trajectories (interior elbow weld with meandering motion)

In order to process the sequence of task space coordinates


by the manipulator we have implemented a new function block
RM Feed. The period of executing the RM Feed block have
to be the same as the period set in the standalone application.
Simple idea of proposed function block is to process one set
of task space coordinates in every execution. Other benefit
of the stated block is a possibility to test any interpolation
method because it does not add any undesirable blending or
interpolation and blindly feeds task space coordinates directly
to manipulator servo controllers. Results of the trajectory
planning according to the new cubic spline interpolation al-
gorithm for interior elbow weld with meandering motion is
Fig. 9. Laboratory set up of robotic manipulator SAVA for NDT of complex shown in Fig. 10. The motion of translation coordinates x,
welds y, z and corresponding velocities and accelerations recorded

410
0.5
that despite of acceleration along line segments are zero the
Position x,y,z

0 acceleration along blending segments forms many undesired


peaks which can lead to crucial problem considering excitation
0.5
6.231 6.232 6.233 6.234
t
6.235 6.236 6.237 6.238
x 10
4
of residual vibrations in mechanical structures. In addition, the
0.02 constant velocity is guaranteed only along line segments but
Norm of tangent acceleration (black) Norm of velocity (black)

not for blending segments (decrease of velocity). Therefore,


Velocity x,y,z

0.01

0.01
the method is much more convenient e.g. for pick and place
0.02
6.231 6.232 6.233 6.234 6.235 6.236 6.237 6.238
applications with only a few coincident points. The second
t 4
x 10
new presented method was developed especially for purposes
Norm of acceleration (magenta)

under consideration. The cubic spline polynomial was used


Acceleration x,y,z

0.02

0 for interpolation of coincide points. The graph of polynomial


0.02 function between the coincident points plays important role
6.231 6.232 6.233 6.234 6.235 6.236 6.237 6.238
t x 10
4 considering the acceleration of the final trajectory with respect
to excitation of vibrations. It was shown experimentally that
Fig. 11. Interpolated curve of translation coordinates (coincident points) by the choice of minimal condition ensuring maximum smooth
the new proposed algorithm acceleration is formed only by the conditions on position,
velocity and acceleration continuity in the initial and the final
2
point of each cubic spline segment. In order to ensure the given
Position ,

0
position, velocity and acceleration profile (trapezoid velocity
1
profile) along the interpolated trajectory the algorithm for
6.231 6.232 6.233 6.234 6.235 6.236 6.237 6.238
t
x 10
4
feed rate computation was introduced. The numerical adaptive
0.1
Simpsons quadrature is used to determine the arc-length
Velocity ,

0
of the interpolated trajectory. It leads to iterative algorithm
0.1
6.231 6.232 6.233 6.234 6.235 6.236 6.237 6.238
for computation of position, velocity and acceleration of the
0.2
t
x 10
4
cubic spline parameter satisfying demanded profile. Finally
Acceleration ,

the second method was integrated to the standalone appli-


0
cation for generating and interpolating task space trajectory
0.2
6.231 6.232 6.233 6.234 6.235 6.236 6.237 6.238
for NDT of complex pipe welds. The resulting interpolated
t 4
x 10
trajectory (generated in given sample times) was directly
used as setpoints for control system of 5 DoF manipulator
Fig. 12. Interpolated curve of orientation coordinates (coincident points) by
the new proposed algorithm
SAVA. Performance of the proposed interpolation method was
demonstrated on the real prototype of the manipulator. It
was verified that the generated trajectory fully complies with
during measurement on the real manipulator prototype are respect to meeting demands such as smooth of motion and the
depicted in Fig. 11. The velocity and (tangent) acceleration given position, velocity and acceleration profile. The extension
profile are depicted in black colour and corresponds with of the interpolation algorithm by the jerk constraint is idea for
demanded constraints vmax = amax = 0.015. The motion further research.
of rotation coordinates , and corresponding velocities and
accelerations are depicted in Fig. 12. It can be seen that ACKNOWLEDGMENT
there are no undesirable peaks in accelerations (it is caused This work was supported by the Technology Agency of
by stopping motion in the sharp corners of the meandering the Czech Republic, Competence Centre CIDAM (Center for
motion). Intelligent Drives and Advanced Machine Control) project
number TE02000103.
IV. C ONCLUSION
Two methods were presented for interpolation of the co- R EFERENCES
incident points which are typically obtained from the data [1] L. Sciavicco and B. Siciliano, Modelling and Control of Robot
generator of complex trajectories in the task space. The first Manipulators, ser. Advanced Textbooks in Control and Signal
method, Line interpolation with polynomial blending, was Processing, Springer, Ed. Springer London, 2000. [Online]. Available:
introduced because the resulting trajectory consist only of http://books.google.fr/books?id=v9PLbcYd9aUC
line segments connecting coincident points and polynomial [2] W. Khalil and E. Dombre, Modeling, Identification and Control
of Robots, ser. Kogan Page Science paper edition, Butterworth-
blending segments which approximate the trajectory in the Heinemann, Ed. Elsevier Science, 2004. [Online]. Available:
vicinity of these points. Therefore, the shape of the trajec- http://books.google.cz/books?id=nyrY0Pu5kl0C
tory can be fully predictable and the trajectory remains in [3] M. V. Mark W. Spong, Seth Hutchinson, Robot Modeling and Control.
convex area bounded by coincident points. The shape of Wiley, 2005.
polynomial blending segments is fully controlled by desired [4] W. Gander and W. Gautschi, Adaptive quadrature-revisited, BIT Nu-
constraint on maximal acceleration. Unfortunately, there are merical Mathematics, vol. 40, no. 1, pp. 84101, 2000.
some disadvantages which make this method poorly applicable
[5] M. Svejda, New robotic architecture for ndt applications, in World
in real applications of trajectory planning of manipulators Congress IFAC, vol. 19, 2014, pp. 11 76111 766.
concerning many mutually close coincident points. Firstly, [6] Rexcontrols.com, Rex controls - advanced automation and control
the method gives only an approximation since it does not solutions, 2015. [Online]. Available: http://www.rexcontrols.com/
intersect the coincide points exactly. Secondly, it was shown

411

S-ar putea să vă placă și