Reference Trajectory Tracking For A multi-DOF Robot Arm: 10.1515/acsc-2015-0033
Reference Trajectory Tracking For A multi-DOF Robot Arm: 10.1515/acsc-2015-0033
1515/acsc-2015-0033
Archives of Control Sciences
Volume 25(LXI), 2015
No. 4, pages 513–527
This paper presents the problem of tracking the generated reference trajectory by the
simulation model of a multi-DOF robot arm. The kinematic transformation between task
space and joint configuration coordinates is nonlinear and configuration dependent. To
obtain the solution of the forward kinematics problem, the homogeneous transformation
matrix is used. A solution to the inverse kinematics is a vector of joint configuration coordi-
nates calculated using of pseudoinverse Jacobian technique. These coordinates correspond
to a set of task space coordinates. The algorithm is presented which uses iterative solution
and is simplified by considering stepper motors in robot arm joints. The reference trajec-
tory in Cartesian coordinate system is generated on-line by the signal generator previously
developed in MS Excel. Dynamic Data Exchange communication protocol allows sharing
data with Matlab-Simulink. These data represent the reference tracking trajectory of the end
effector. Matlab-Simulink software is used to calculate the representative joint rotations.
The proposed algorithm is demonstrated experimentally on the model of 7-DOF robot arm
system.
Key words: inverse kinematics, real-time reference tracking, signal generator, multi-DOF,
dynamic data exchange.
1. Introduction
Robotics represents one of the main disciplines in the industry. The synergy of ro-
botics with other applications like car assembly operations, vision systems or artificial
intelligence allows not only for innovations but also reduces the manufacture costs. In
the kinematic analysis of a robot arm position, two separate problems have to be solved:
forward kinematics and inverse kinematics. Forward kinematics includes solving the
forward transformation equation to find the location of the hand in terms of the angles
and displacements between the links of the robot arm.
R. Krasňanský, P. Valach and D. Soós are with Faculty of Electrical Engineering and IT, Slovak Uni-
versity of Technology in Bratislava, Ilkovicova 3, 81219 Bratislava, Slovak Republic. E-mails:(robert.kras-
nansky, peter.valach, david.soos)@stuba.sk. J. Zarbakhsh is with Carinthia University of Applied Science,
Europastrasse 4, 9524 Villach, Austria. E-mail: [email protected].
Received 16.07.2015.
This work has been supported by Grant N. 1/1241/12 of the Slovak Scientific Grant Agency.
514 R. KRASŇANSKÝ, P. VALACH, D. SOÓS, J. ZARBAKHSH
In order to find the corresponding sets of joint angle given the desired position and
orientation of the end effector it is necessary to solve the inverse kinematics problem.
Inverse kinematics, on the other hand, includes solving the inverse transformation equa-
tions in order to find the relationships between the links of the robot arm from its loca-
tion in space. There has been an increasing amount of work in recent years to derive the
inverse kinematics of the robot arm [1], [9], [6].
Many schemes as well as profound comparative analysis for the inverse kinematic
problem of redundant robot arm are proposed in previous robotics works.
Some schemes provide essential approach for manipulator geometries with unknown
inverse kinematic functions. However, for a continuous path motion control problem,
the inverse of the Jacobian matrix is required. A generalized inverse of Jacobian matrix,
so-called pseudoinverse is widely applied for a redundant robot.
The present work is concerned with the inverse kinematics solution for a seven-
DOF redundant manipulator. The trajectory planning of robot arms is a very active area
since many tasks require special characteristics to be satisfied. Using of MS Excel and
MS VBA (Visual Basic for Applications) software, the application for reference signal
generation has been developed. It allows to determine arbitrary reference trajectory and
to change it during runtime. By using of the Dynamic Data Exchange (DDE), the com-
munication between the application and Matlab-Simulink is secured in real-time.
The paper is organized as follows. In section 2, the general robot kinematics as well
as the inverse kinematics analysis is presented. In section 3, the kinematics model of
the seven-DOF robot arm is presented and the inverse kinematics solution is proposed.
Section 4 describes a real-time signal generator developed in MS Excel to generate an
arbitrary reference signal for the end effector. Subsequently, computer simulation and
experimental results of the proposed methodology are presented. Finally, the conclu-
sions are drawn in Section 5.
r1 r2 r3 ∆x
3x 3 3x1 r r r ∆y
rotation matrix translation 4 5 6 .
Q = (2)
r7 r8 r9 ∆z
1x3 perspective global scale
0 0 0 1
Figure 1. Rotation of frame (x’, y’, z’) respect to the (x,y,z) reference frame
Since the both frames have the common origin, the relationship between them fol-
lows only from the rotation. Rotation is then represented by the following matrix:
cos(θ ) - sin(θ ) 0
Rz (θ ) = sin(θ ) cos(θ ) 0 .
(3)
0 0 1
In the same way, we can define other rotations with respect to the axis y and x as
follows:
516 R. KRASŇANSKÝ, P. VALACH, D. SOÓS, J. ZARBAKHSH
cos(θ ) 0 sin(θ )
Ry (θ ) = 0 1 0 , (4)
- sin(θ ) 0 cos(θ )
1 0 0
=Rx (θ ) 0 cos(θ ) - sin(θ ) .
(5)
0 sin(θ ) cos(θ )
The translation about x, y, and z axes of l is then in the form:
l 0 0
Tx = 0, Ty = l , Tz = 0 .
(6)
l
0 0
Consider the 2-DOF robot arm as depicted in Fig. 2.
Equation representing the dependence of the end effector (EE) coordinates on joint
coordinates and vice versa can be obtained according to the basic trigonometry in the
following way:
x 0
y 0
= =
EE Rz (θ1 ) R y (θ 2 )Tz (l1 ) R y (θ 3 ) (7)
z l2
1 1
REFERENCE TRAJECTORY TRACKING FOR A MULTI-DOF ROBOT ARM 517
where
cos(θ1 ) - sin(θ1 ) 0 0
sin(θ1 ) cos(θ1 ) 0 0
Rz (θ1 ) = (8)
0 0 1 0
0 0 0 1
cos(θ 2 ) 0 sin(θ 2 ) 0
0 1 0 0
R y (θ 2 ) =
(9)
- sin(θ 2 ) 0 cos(θ 2 ) 0
0 0 0 1
1 0 0 0
0 1 0 0
Tz (l1 ) =
0 0 1 l1 (10)
0 0 0 1
cos(θ3 ) 0 sin(θ3 ) 0
0 1 0 0
Ry (θ3 ) = . (11)
- sin(θ3 ) 0 cos(θ3 ) 0
0 0 0 1
Resulting position of the end effector is described by the following equations
∂x ∂x
∂θ1 ∂θ n
∂y
∂y
J = . (15)
∂θ1 ∂θ n1
∂z ∂z
∂θ1 ∂θ n
Calculation the inverse Jacobian allows the inverse kinematics to be directly calcu-
lated for a small time step as follows:
∆
=θ J -1 (θ )∆x. (16)
According to (16), the real function can be linearly approximated for sufficiently
small steps. For kinematically redundant robots with n > 6 DOF, the Jacobian matrix is
non-square and its inverse can be obtained using a pseudoinverse J+ [4], [10]
J + = ( J T J ) -1 J T . (17)
where
1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0
Tz (l1 ) = , Tz (l2 ) = (19)
0 0 1 l1 0 0 1 l2
0 0 0 1 0 0 0 1
1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0
Tz (l3 ) = , Tz (l4 ) =
0 0 1 l3 0 0 1 l4 (20)
0 0 0 1 0 0 0 1
Since the rotation of the end link of the robot arm is determined by the reference
trajectory, it stays in determined position until the reference values of angles θ6, θ7 will
change. The calculation of joint parameters is realized according to Algorithm 3.1. Re-
sulting Jacobian matrix has a size of 3 x 5.
form these updates in the shortest time interval. The macro can be run by using the start/
stop button, as can be seen in Fig. 4 (only a part of the main window of the application
is shown in Fig. 4).
The task of the macro is to run the procedure containing infinite update cycles in
MS Excel data sheets. In Fig. 4 it can be also seen how the cells are generated in the
real-time. In order to create required trajectory of the motion of the end effector, differ-
ent kinds of mathematical functions and operations for the coordinates and angles were
used and stored in other cells of the data sheet.
In this way, we obtained the vector of desired reference values in the following
form:
r = ( x, y , z , θ 6 , θ 7 ) (25)
The vector r is updated continuously in MS Excel (Fig. 4). The values of the vector
r are consequently sent via DDE to Simulink software, where the inverse kinematics
problem is solved according to (15)–(17) and the resulting joint parameters are ob-
tained. From these parameters the position of each robot link are calculated according
to (18) for simulation purposes. The calculated position of the end effector is sent for
plotting as depicted in Fig. 5.
Obtained data can be used to control of the real robotic system by simple intercon-
nection of Arduino platform and Matlab-Simulink software. In the next section, the
simulation results of the motion of individual robot links are shown.
REFERENCE TRAJECTORY TRACKING FOR A MULTI-DOF ROBOT ARM 523
X joint 4 [B]
1.301 XYZ_4
0.9808 MATLAB
DDE
Function
0.4568
Y XY_ref
joint 3
DDE
0.8178 XYZ_3
x
0.864 MATLAB
Z Function
0.4042
joint 1
joint 2
0 XYZ_1 0.3608 XYZ_2
XY_EE
0 0.3812 MATLAB
[0;0;l1]
Function y
0.3 1.151
0.5
End_Efector_Z
The simulations were carried out in the Matlab-Simulink software. The link length
parameters of the 7-DOF robot arm are as follows: l1 = 0.3 m, l2 = 1 m, l3 = 1 m,
l4 = 0.5 m, l5 = 0.2 m. The rotational range of motion of individual joints is as follows:
θ1Î<0, 270°>, θ2Î<-60°, 120°>, θ3Î<-120°, 150°>, θ4Î<-180°, 180°>,
θ5Î<-90°, 90°>, θ6Î<-90°, 90°>, θ7Î<-90°, 90°>, where the values of the angles θ6
and θ7 are determined by the user via signal generator. According to these parameters
we were able to evaluate and plot the workspace of the end effector in 3D space as de-
picted in Fig. 6.
The simulation results of the robot arm tracking the desired circle-shape trajectory
generated in real-time via signal generator in MS Excel are presented in Figs 6–8. Each
link is represented by a unique color.
524 R. KRASŇANSKÝ, P. VALACH, D. SOÓS, J. ZARBAKHSH
The circle with the radius of 0.5 m is situated in the workspace of the end effector
considering the midpoint coordinates: (x, y, z) = (1, 1, 1). Simulated trajectories pro-
jected on the XY and XZ planes are shown in Fig. 7.
Figure 7. Trajectory of the end effector‘s motion (blue dots) and reference trajectory (red dots) in A) XY
plane B) XZ plane
The robot arm′s configuration during the simulation is depicted in Fig. 8. For better
illustration of the motion of each link, every sixth step of motion is considered.
REFERENCE TRAJECTORY TRACKING FOR A MULTI-DOF ROBOT ARM 525
x z
y
Figure 8. Robot arm configuration
The time responses of the end effector′s position in X and Y axis are shown in Fig. 9.
These results verify the sufficient tracking of the reference trajectory by the end effector.
2
reference (y-axis)
1.5 end effector (y-axis)
1 end effector (x-axis)
position
reference (x-axis)
0.5
-0.5
-1
0 50 100 150 200 250 300
time [s]
As can be seen from the figures, the simulation experiments have shown desired
results.
5. Conclusions
This paper presents a complete solution to the inverse kinematics of a 7-DOF ro-
bot arm. In order to obtain the solution, the iterative procedure based on calculating
of pseudoinverse Jacobian was proposed. The procedure requires that the Jacobian is
computed numerically. The main contribution of this work has been the development of
the signal generator in order to generate the reference trajectory in real-time. This tool
has been developed using macros in MS Excel and it enables modulation of the shape of
the reference trajectory continuously during runtime. The simulation results prove the
526 R. KRASŇANSKÝ, P. VALACH, D. SOÓS, J. ZARBAKHSH
efficiency of the proposed solution with the developed tool for the real-time reference
trajectory tracking by the robot arm.
References
[1] J. Angeles, F. Ranjbaran and R.V. Patel: On the design of the kinematic struc-
ture of seven-axes redundant manipulators for maximum conditioning. Proc. of the
IEEE Int. Conf. Robotics and Automation, Nice, France,(1992), 494-499.
[2] J.G.P. Barnes: An algorithm for solving non-linear equations based on the secont
method. Computer J., 8, (1965), 66-72.
[3] J. Denavit and R.S. Hartenberg: A kinematic notation for lower-pair mecha-
nisms based on matrices. Journal of Applied Mechanics, (1955), 215-221.
[4] R.G. Fenton, B. Benhabib and A.A. Goldenbereg: Optimal point-to-point mo-
tion control of robots with redundant degrees of freedom. J. of Manufacturing
Science and Engineering, 108(2), 1986, 120-126.
[5] R. Fletcher: Generalized inverse methods for the best least squares solution of
systems of non-linear equations: Computer J., 10 (1968), 392-399.
REFERENCE TRAJECTORY TRACKING FOR A MULTI-DOF ROBOT ARM 527
[6] C.A. Klein and C.H. Hung: Review of pseudoinverse control for use with kin-
ematically redundant manipulators. IEEE Trans. on Systems, Man, and Cybernet-
ics, 13, 245-250.
[7] Y. Nakamura and H. Hanafusa: Inverse kinematics solutions with singularity
robustness for robot manipulator control. J. of Dynamic Systems, Measurement,
and Control, 108 (1986), 163-171.
[8] P. Rabinowitz: Numerical Methods for Non-linear Algebraic Equations. New
York: Gordon and Breach, 1970, 87-114.
[9] J. De Schutter, T. De Laet and J. Rutgeerts: Constraint-based task specifica-
tion and estimation for sensor-based robot systems in the presence of geometric
uncertainty. The Int. J. Robotics Research, 26(5), (2007), 433-455.
[10] B. Siciliano: Kinematic control of redundant robot manipulators: A tutorial. J. of
Intelligent and Robotic Systems, 3(3), (1990), 201-212.
[11] C.W. Wampler: Manipulator inverse kinematic solutions based on vector formu-
lations and damped least squares methods. IEEE Trans. on Systems, Man and Cy-
bernetics, 16 (1986), 93-101.
[12] L.C.T. Wang and C.C. Chen: A combined optimization method for solving the
inverse kinematics problem of mechanical manipulators. IEEE Trans. on Robotics
and Automation, 7 (1991), 489-499.
[13] W. A. Wolovichand and H. Elliot: A computational technique for inverse kin-
ematics. 23rd IEEE Conf. on Decision and Control, (1984).
[14] J. Zhao and N. I. Badler: Inverse kinematics positioning using nonlinear pro-
gramming for highly articulated figures. ACM Trans. on Graphics, 13 (1994),
313-336.