Ur 5
Ur 5
Abstract— UR robotic arms are from a series of lightweight, is no Simmechanics model for the UR5. This shortcoming
fast, easy to program, flexible, and safe robotic arms with motivated us to develop a complete set of MATLAB based
6 degrees of freedom. The fairly open control structure and models for this robot.
low level programming access with high control bandwidth
have made them of interest for many researchers. This paper Within the literature, lots of modelling studies are available
presents a complete set of mathematical kinematic and dynamic, for different robotic manipulators. More specifically, there is
Matlab, and Simmechanics models for the UR5 robot. The accu- a great amount of literature for acclaimed manipulators such
racy of the developed mathematical models are demonstrated as PUMA 560 [24]. Furthermore, lots of studies have been
through kinematic and dynamic analysis. The Simmechanics done under the title of modelling of 6 DoF manipulators.
model is developed based on these models to provide high
quality visualisation of this robot for simulation of it in Matlab The main reason of existence of this much of literature
environment. The models are developed for public access and around this problem are: these models are essential for many
readily usable in Matlab environment. A position control system research activities and the parameters of the models are
has been developed to demonstrate the use of the models and different for different robots, even with similar structure. Fur-
for cross validation purpose. thermore, development of these models are also a challenging
I. I NTRODUCTION problem because such development is time consuming and
involves tedious and lengthy mathematical formulation.
Serial manipulators are used in many robotic systems. In the present paper, a thorough mathematical model for
The serial robots are widely used in manufacturing, handling kinematics and dynamics of the UR5 robot is presented. The
material, and tele-operation. There is an increasing number of kinematic model includes full mathematical development for
these robots worldwide with some big names in that domain the forward and inverse kinematic equations of the robot.
such as ABB and Kuka. While the science of these robots The dynamic model gives the equation of motion of the
are well understood, the main challenge associated with these robot and access to the parameters of that equation including
robots are improving the functionality, flexibility, reliability, the mass inertial matrix, centrifugal and Coriolis matrix
safety and bandwidth of them. In the recent years, Universal and gravity force vector. These models are implemented in
robots have developed a series of robotic manipulators that Matlab environment with the codes of them for public access.
is now widely used by many universities and industries. This Furthermore, a very accurate SimMechanics model of this
robot is claimed to be fast, easy to program, flexible, safe and robot is developed again in Matlab Simulink environment.
offers low level programming access of the robot controller These models could be readily used by any researcher using
with high cycle time [1]. Among the UR products the family the UR5 robot. The main contribution of this paper is the
of UR3, UR5 and UR10 have received a great attention development of a complete MATLAB based models for the
within the robotics community and industries specifically by UR5 robot with evaluating the accuracy of these models.
the robotic research community. According to the authors research, this is the most accurate
For development of a robotic system based on the UR kinematic and dynamic model of the UR5 to date.
arms, researchers require to have access to precise mathemat- The paper is outlined as follows: Section II introduces
ical and simulation models of the UR robots. Such models the UR5 robot and describes the mathematical modelling
are essential for motion planning [2]–[4], position and force for kinematics and dynamics of this robot. In Section III
control system design [5]–[8], and customising the robot for mathematical model used for implementation of the models
novel applications. Currently the UR5 robot comes with a in MATLAB for public access. Following that, development
URSim software that is used for simulation of this robot. of the SimMechanics model is detailed and shown in Section
However, the URSim is fairly limited in terms of access to IV. Then in Section V, a cross validation is performed for
details of the mathematical model of the robot [1]. According evaluating the accuracy of the models. Finally, the conclud-
to the authors’ research, currently there is no complete ing remarks are stated in Section VI.
mathematical and Simmechanics models for the UR5 robot
that could be publicly and readily accessible for Matlab II. M ATHEMATICAL M ODELLING
or any other environment. Researchers developed different A. UR5 robot
models for UR5 robot from scratch. [9]–[23], however these
UR5, Fig. 1, is a well-known 6-degree-of-freedom (DoF)
models are either incomplete (eg. only kinematic model)
robotic manipulator manufactured by Universal Robots Com-
or they are not in Matlab environment. Furthermore there
pany [1]. The most renowned feature of this robot is its
1 Authors are with the Institute for Intelligent Systems Research and agility due to its light weight, speed, easy to program,
Innovation, Deakin University, Australia. [email protected] flexibility, and safety. One of the main characteristic of
TABLE I
DH PARAMETERS OF UR5
i ai αi di θi
0 0 0 - -
π
1 0 2
0.08916 θ1
2 0.425 0 0 θ2
3 0.39225 0 0 θ3
π
4 0 2
0.10915 θ4
5 0 − π2 0.09456 θ5
6 - - 0.0823 θ6
C. Forward Kinematics
Using the definition of the transformation matrix of a
robotic arm from [27], [28], the transformation matrix from
the base to the end effector is in the form of :
nx ox ax px
0
ny oy ay py
Tn =
nz oz az pz
(1)
Fig. 2. Schematic and frames assignment of UR5 [25]. 0 0 0 1
D. Inverse kinematics
For inverse kinematics, we will find the set of joint
configurations Q = qi where qi = [θ1i , . . . , θ6i ]T ∈ [0, 2π)6
such that satisfies 1 which describes the desired position
and orientation of the the last link. Derivation of the inverse
kinematic in this section is adopted from [29].
Fig. 1. The real UR5 manipulator.
First, finding θ1 using the position of the 5th joint.
Analyzing the transformation from frame 1 to frame 5 using
As it was mentioned earlier, currently there is no complete equation 1, which results:
set of Matlab models for this robot. Therefore we tried to fill
this gap. To achieve this goal, we searched and used the most −s1 (px − d6 zx ) + c1 (py − d6 zy ) = −d4
valid parameters and measurements of UR5 parameters that
are used for the development of the models in this paper [25] that is known as a phase-shift equation whose solution
[26]. Obviously, the more precise model, the more valuable considering Fig. 3 can be found as:
and accurate results could be obtained from those models. 0
p5y
tan α1 = 0
B. Characterization of kinematic parameters of UR5 p5x
d4 d4
In the Fig. 2 the schematic of the robotic arm and the tan α2 = = q
R 0 p2 + 0 p2
allocation of each joint’s frame are illustrated. It is mentioned 5x 5y
that the DH parameters and rotation matrices that are used
for kinematic model are based on these frames. The DH Hence
parameters of the UR5 [27], [28] for the specified joint π d4 π
frames in Figure2, are presented in the Table I: θ1 = α1 +α2 + = atan2(0 p5y , 0 p5x )±cos−1 + (3)
2 R 2
SMC_2016 004230
2016 IEEE International Conference on Systems, Man, and Cybernetics • SMC 2016 | October 9-12, 2016 • Budapest, Hungary
where Jvi and Jωi are the linear and angular part of the
Jacobian matrix Ji , respectively.
For deriving the matrix C(q, q̇) it would be useful to
know the passivity property of robotic manipulators which
Fig. 4. Geometry of finding θ5 . is the result of the skew-symmetry property of the matrix
Ṁ (q) − 2C(q, q̇). For reaching this property the elements
To solve for the 6th joint, we look at the 6 y1 coordinate of the matrix cij must be derived from the elements of the
axis: inertia matrix mij via the following formula [27], [28]:
−xx s1 + xy c1 −c6 c5 n
−yx s1 + yy c1 = s6 s5
X 1 ∂mij ∂mik ∂mkj
cij = + − q̇k (9)
−zx s1 + zy c1 −c5 2 ∂qk ∂qj ∂qi
k=1
As Fig. 5 shows, this equality forms a spherical coordinate Finally, the elements of the gravity vector gi (q) [27], [28]:
expression for the vector 6 y1 where θ6 is the azimuthal angle
and θ5 is the polar angle. The x and y coordinates of this ∂P
gi (q) = (10)
vector form a system which can be easily solved as: ∂qi
yy c1 − yx s1 xx c1 − xy s1 Having M (q) , C(q, q̇) and gi (q) completes the dynamical
θ6 = atan2( , ) (5) model development.
s5 s5
SMC_2016 004231
2016 IEEE International Conference on Systems, Man, and Cybernetics • SMC 2016 | October 9-12, 2016 • Budapest, Hungary
SMC_2016 004232
2016 IEEE International Conference on Systems, Man, and Cybernetics • SMC 2016 | October 9-12, 2016 • Budapest, Hungary
one for the torque signal that is applied to the joint refereed
as Tau3 in Fig. 8. There are also two measurement output
signals: q3 and dq3 that are for the joint angle and velocity.
These signals are the system’s states of the joints and they
are useful for control purposes. In the Joint block, the sub-
block Revolute Joint3 is a Simmechanics block of a revolute
joint with its corresponding actuator. The input of this sub- Fig. 10. Graphical result of UR5 modelled in Simmechanics
block is a torque signal that is applied by the control system
(here is controller). The output of the Revolute Joint3 block There are few more parameters, such as links’ radius,
are the joint angle and joint velocity measurement signals selected arbitrarily. These parameters do not have significant
with dimension of radian (rad) and radian per second (rad/s), effect on model’s dynamic performance.We have selected
respectively. Finally, the output of the whole Revolute Joint3 some values by trial and error as there was no reliable source
block is a Simmechanics connection with the name of Link3 for them.
that goes to the Link3 block.
V. VALIDATION S TUDY
In this section the derived mathematical dynamics model
is cross validated by the Simmechanics model of the UR5. To
achieve this goal a controller is designed using the derived
dynamics. Then the output of this controller is applied to
the Simechanics model. By inspecting the response of the
model, the correctness of the derived dynamics is verified.
To achieve this goal, a standard proportional-derivative (PD)
Fig. 8. The robot’s Joint blocks details
controller is used. For this purpose, the inverse dynamic
(feedback linearization) is considered using the outputs of
C. Link block the MATLAB code. Recalling the general form of dynamic
equations of motion of a robot 6 and the inverse dynamic
There are also several Link blocks in Fig. 6 to represent the form 7, and considering the below input:
robot links. The details of the Link3 block is demonstrated in u = M (q)a + C(q, q̇)q̇ + g(q) (11)
Fig. 9. These blocks also have similar structure, hence only
Link3 is explained here. These blocks contain three similar where q is the joint angles, the matrices M (q) and C(q, q̇)
block pairs. Each pair is consisted of a Rigid Transformation and the vector g(q) are elements from the derived dynamics,
block and a Solid block. The middle one is the most and the vector a is a PD controller command defined as a =
important pair especially the Solid block part of it, this q̈ ∗ − KD (q̇ − q̇ ∗ ) − KP (q − q ∗ ). In this control signal, q̈ ∗ ,q̇ ∗
is because it creates a link body that contains the inertia and q ∗ are the desired acceleration, velocity and joint angle
properties of that link. These Link blocks are connected to vectors, respectively, KD and KP are symmetric positive
a joint from its input and a joint from its output, except the definite gain matrices of the derivative and proportional
last Link block. For the Link3, the input of the Link3 is from components of the PD controller. Substituting controller and
the Joint3 and the output of it is applied to the Joint4 see 11 into 7, results to:
Fig. 9. ë + KD ė + KP e = 0 (12)
where ë, ė and e are error signals of acceleration, velocity
and joint angles, respectively.
For the design of the controller parameters, Routh-Hurwitz
criteria was used to obtain the gain matrices. This guarantees
that the errors in 12 will converge to zero from any initial
Fig. 9. The robot’s Link blocks details
condition. Obviously, this convergence is obtainable if the
complete elimination of dynamic nonlinear terms in 7 that
D. Simemchanics model parameters depends on M (q), C(q, q̇)q̇ and g(q) is achieved. In other
words, the derived mathematical dynamics should be the
There are several reports for the parameters of the COMs same as the dynamical properties of Simemechanics model
e.g., [25], [26], one of them is from the manufacturer of of UR5. To show this elimination, we consider a desired
the robot. For the Simmechanics model presented here we position and orientation profile for the UR5 end-effector. We
used the manufacturer parameter. Other specifications, like selected a profile that is singular free and it lies in the robot
DH parameters and inertia properties are from [25]. These workspace. It was observed that the controller Gain matrices
parameters are used for the model and the Simmechanics could be selected as KD = KP = 10I6×6
model is fully obtained. The run of the Simemchanics model The results of the simulation are shown in figures 11.
creates the results shown in Fig. 10. It is observed that the end-effector has tracked the desired
SMC_2016 004233
2016 IEEE International Conference on Systems, Man, and Cybernetics • SMC 2016 | October 9-12, 2016 • Budapest, Hungary
SMC_2016 004234