Mahdi Salman Alshamasin
Mahdi Salman Alshamasin
1, 2012
Florin Ionescu
Steinbeis Transfer Institute Dynamic Systems,
Steinbeis University Berlin, SHB,
Theodor-Heuss-Str. 1, D-78467 Konstanz, Germany
E-mail: [Link]@[Link]
E-mail: ionescu@[Link]
Abstract: A complete mathematical model of SCARA robot was developed and presented in this
paper including servomotor dynamics and dynamics simulation. The equations of motion were
derived by using Lagrangian mechanics. Direct current (DC) servomotor driving each robot joint
was studied and modelled. SCARA robot was constructed to achieve drilling operation using
solid dynamics (SD) software. The performance of the robot-actuator system was examined with
solid dynamic simulation and verified with MATLAB/Simulink. The results of simulations were
discussed. The facilities of the programmes (investigate, design, visualise, and test an object
even if it does not exists) used for kinematic and dynamic simulation of robot systems were
emphasised.
Reference to this paper should be made as follows: Alshamasin, M.S., Ionescu, F. and
Al-Kasasbeh, R.T. (2012) ‘Modelling and simulation of a SCARA robot using solid dynamics
and verification by MATLAB/Simulink’, Int. J. Modelling, Identification and Control, Vol. 15,
No. 1, pp.28–38.
Biographical notes: Mahdi Salman Alshamasin received his MS and PhD in Automatic Control
Engineering. Currently, he is an Assistant Professor at Al-Balqa Applied University. He was a
Research Fellow of DFG Foundation at HTWG. He has published several papers in scientific
journals of applied sciences and technology. His research interests cover: speed control and
performance optimisation of single-phase and three-phase motors, modelling and simulation of
robotic systems, electric drive systems, signal processing, automatic control and biomedical
design instrumentation.
Florin Ionescu received his MS and PhD from TU-Bucharest. He is a Doctor Honoris Causa of
several European universities. In 1987, he became a Research Fellow at RWTH-Aachen and
TU-Darmstadt, and in 1991 became a Professor at HTWG-Konstanz. In 2011, he became a
Professor at Steinbeis University Berlin and in 1987, deployed research activity supported by:
AvH, VDMA, DFG, DAAD, AiF, STW and Technology Transfer for industry with STW. He is
the author of over 500 papers (Springer, Elsevier, CRC, Pergamon, ACTA, Artech, Steinbeis;
conference of: IMEKO, IFAC, IEEE, KES, ISMA, ASME, IASTED). His research fields are
machine dynamics, CAE and control, modelling and simulation (HYPAS), fault diagnosis,
robotics and drives.
Figure 1 General screen of the SD programme with (from the left to the right) menus, tool bars, tree structure, 3D window for the
constructed SCARA robot at zero position
2 Robot kinematics where Si and Ci refer to sine and cosine functions of angle
θi.
Denavit-Hartenberg (D-H) parameters for SCARA robot
specified in Figure 2 are defined in Table 1.
Table 1 D-H parameters of the robot
By using (D-H) convention, the transformation matrix
representing the position and orientation of frame i relative i θi di ai αi
to i – 1 is given by (Saeed, 2001):
1 θ1 0 L1 0
⎡ ci − si cα i si sα i ai ci ⎤
⎢s 2 θ2 0 L2 0
ci cα i −ci sα i ai si ⎥⎥
Ti i −1
= Ai = ⎢ i (1) 3 0 d3 0 0
⎢0 sα i cα i di ⎥
⎢ ⎥ 4 θ4 d4 0 0
⎣0 0 0 1 ⎦
Modelling and simulation of a SCARA robot using solid dynamics and verification by MATLAB/Simulink 31
⎢ 2 2 ⎥
p x = ( L1 + L2 c2 ) c1 − L2 s2 s1 (7) ⎣ ⎦
J m2 2 Jg2 2 J 1
p y = L2 s2 c1 + ( L1 + L2 c2 ) s1 (8) Ke2 = ωm2 + ω m 2 + 2 ω 22 + m2 v22
2 2 2 2
Solving equations (7) and (8) by Kramer’s rule gives
=⎢
2 1 2(
⎡ J + m L2 + r 2 + 2 L r c ⎤
2 1 2 2
⎥ θ 2 )
( L1 + L2 c2 ) p y − L2 s2 px ⎢ 2 ⎥ 1
s1 ⎣⎢ ⎦⎥
θ1 = tan −1 = tan −1 (9) (16)
c1 ( L1 + L2 c2 ) px + L2 s2 p y
+⎢
(
⎡ J +J
m2 g2
g r22 +
)
J 2 + m2 r22 ( ) ⎤
⎥ θ 2
From the (4, 4) elements of the matrices in equations (2) and ⎢ 2 2 ⎥ 2
(3), we would obtain: ⎣⎢ ⎦⎥
d3 = − pz − d 4 (10) ⎣ (
+ ⎢ J 2 + m2 r22 + L1r2 c2 ⎥ θ1θ2 .
⎦ )
To solve for the angle θ4, both sides of equation (3) are J m3 2 J g 3 2 m3 + mm3 2
K e3 = θm3 + θm3 + v3
successively premultiplied with A3−1 A2−1 A1−1 matrices, such 2 2 2
that:
=⎢
( +
)
⎡ 2 J m3 + J g 3 ( m + m ) ⎤
3 m3 ⎥ 2
d1
A3−1 A2−1 A1−1THR = A4 ⎢ D2 2 ⎥
⎣ ⎦
( )
⎡ ( m + m ) L + L + 2L L c ⎤
2 2 (17)
which results in: 3 m3 1 2 1 2 2
+⎢ ⎥ θ2
⎢ 2 ⎥ 1
c4 = nx c12 + n y s12 (11) ⎢⎣ ⎥⎦
⎡ ( m3 + mm3 ) 2 ⎤ 2
s4 = −nx s12 + n y c12 (12) +⎢
2 ⎣ (
⎦ )
L2 ⎥θ2 + ⎢( m3 + mm3 ) L22 + L1L2c2 ⎥ θ1θ2 .
⎣⎢ ⎦⎥
Thus,
P3 = − ( m3 + mm3 ) g × d3 . (18)
32 M.S. Alshamasin et al.
Figure 3 Model of the SCARA robot: joint connections and geometry of segments and joint positions
So, Lagrange function is: where M denotes the inertia, C, B expresses the Coriolis and
centripetal forces respectively, and G is the gravity vector:
L = K e1 + K e 2 + K e3 − ( P1 + P2 + P3 )
(
⎡ J m1 + J g1 ) J + m1r12 1
M 11 = r12 m1 + J1 + g r21 J m1 + J g1 ( )
=⎢
⎢
⎣
2
g r21 + 1
2
+ mm 2 L12
2 ( )
+ L12 + r22 + 2 L1r2 c2 m2 + L12 mm 2 + J 2
+ ( L + L + 2L L c ) ( m + mm3 ) ,
( )
2 2
J 2 + m2 L12 + r22 + 2 L1r2 c2 1 2 1 2 2 3
+
= (r + L r c ) m + j
2 2
M 12
( m3 + mm3 ) ( )
2 1 2 2 2 2
L12 + L22 + 2 L1 L2 c2 ⎤
+ ⎥ θ 2 + ( L + L L c )(m + m
2
)
2 ⎥ 1 2 1 2 2 3 m3
⎥⎦
C1 = 2 L1s2 ⎡⎣ m2 r2 + ( m3 + mm3 ) L2 ⎤⎦ ,
+ ⎢ (
⎡ J +J
m2 g2 2 )
gr 2 +
J 2 + m2 r22 ( ) (19)
⎢ 2 2 B1 = L1s2 ⎡⎣ m2 r2 + ( m3 + mm3 ) L2 ⎤⎦
⎢⎣
+
( m3 + mm3 ) 2 ⎤ 2 ⎡ ⎡
L2 ⎥ θ 2 + J 2 + m2 r22 + L1r2 c2 ⎤ ( ) (
M 21 = m2 r22 + L1r2 c2 + J 2 )
2 ⎥⎦ ⎣⎢ ⎣ ⎦
(
+ L22 + L1 L2 c2 )(m + mm3 )
( )
3
+ ( m3 + mm3 ) L22 + L1 L2 c2 ⎤ θ1θ2
⎦
(
M 22 = r22 m2 + J 2 + g r22 J m 2 + J g 2 + L22 ( m3 + mm3 ) )
+⎢
(
⎡ 2 J m3 + J g 3
+
)
( m3 + mm3 ) ⎥⎤ 2
d3
⎢ D2 2 ⎥ B2 = L1s2 ⎡⎣ m2 r2 + ( m3 + mm3 ) L2 ⎤⎦ ,
⎣ ⎦
+ ( m3 + mm3 ) g × d3 .
(
4 J m3 + J g 3 )+
M3 = 2 ( m3 + mm3 )
Then torques exerted on the robot joints can be derived as: D
⎛ ⎞ G3 = ( m3 + mm3 ) g
∂ ⎜ ∂L ⎟ ∂L
T1 = − = M11θ1 + M12θ2 − C1θ1θ2 − B1θ22 (20)
∂t ⎜ • ⎟ ∂θ1
⎝ ∂θ 1 ⎠
5 Actuator modelling
⎛ ⎞
∂ ∂L ⎟ − ∂L = M 21θ1 + M 22θ2 + B2θ12
T2 = ⎜ • (21) Actuators are the devices used to move robots. Many types
∂t ⎜ ⎟ ∂θ 2 of such devices are used such as pneumatic pistons,
⎝ ∂θ 2 ⎠
hydraulic pistons, DC motors, and stepper motors to satisfy
∂ ⎛ ∂L ⎞ ∂L this function. Most of the present robots employ DC motors.
T3 = ⎜ ⎟− = M 3 d3 − G3 (22)
∂t ⎜⎝ ∂d3 ⎟⎠ ∂d3 The equations which describe the behaviour of permanent
magnet, separately or shunt wound DC motors when the
flux is constant are (Bencsik, 2004):
Modelling and simulation of a SCARA robot using solid dynamics and verification by MATLAB/Simulink 33
# mass parameters
Body Name Mass G centre Ixx, Iyy, Izzz Ixy, Ixz, Iyz
1 Body 1 1.9874 0.11511 0.000481037 0.0
1.1 0.0179453
–0.00048086 0.0176861 –0.000756924
2 Body 2 0.917789 0.102257 0.000472827 0.0
0.0 0.00348701 0.0
0.0 0.0031443 0.0
3 Body 3 0.703604 0.0 0.00215244 0.0
0.0 0.00215244 0.0
–0.0420267 0.000114505 0.0
34 M.S. Alshamasin et al.
Figure 4 Graph of the output variables (final position) and 3D window accompanied by animation for the given inputs in 6(a), 6(b) and
6(c), respectively
(a)
(b)
Modelling and simulation of a SCARA robot using solid dynamics and verification by MATLAB/Simulink 35
Figure 4 Graph of the output variables (final position) and 3D window accompanied by animation for the given inputs in 6(a), 6(b) and
6(c), respectively (continued)
(c)
Figure 5 SCARA robot modelled in MATLAB/Simulink with negative feedback of robot position
24 Voltage
Output v oltag
Supply voltage1 motor angle theta1 motor theta1 theta1 T1
Position
load torque
Saturation1
PD Controller1 DC Motor 1 Gear 1 -C-
24 Voltage initial theta1
T2
Output v oltag
Supply voltage2 motor angle theta2 motor theta2 theta2
Position
load torque
PD Controller2 Saturation2
DC Motor 3 Gear 2 1.475
T3
24 Voltage
initial theta2
Output v oltag
Supply voltage3 motor speed motor speed d3 d3
Position
load torque
initial d3
0 d1
Py
d1
Horizontal trajecto
0 d4 Pz
positions
d4
SCARA Robot1
36 M.S. Alshamasin et al.
Graphs obtained by SD programme in Figure 7 show the Figure 7 Motor toques exerted on the robot joints (1 and 2) to
motor torques exerted on the first and second joints of the satisfy the required angles
robot to satisfy the joint angles and hence the specified
positions of the end effecter.
The facilities of the SD programme used for kinematic
and dynamic simulation of robot systems were emphasised
which means that we can use this powerful and useful tool
confidently in visualisation, predicting, analysing and
improving of robot systems.
(a)
(a)
(b)
(b)
(c)
8 Conclusions
In the paper, a complete mathematical model of SCARA
robot was developed including servo actuator dynamics.
(c) Forward and inverse kinematics was studied using
D-H notation. The equations of motion were derived using
Modelling and simulation of a SCARA robot using solid dynamics and verification by MATLAB/Simulink 37
Lagrangian mechanics. By using SD programme, structure Leon, Z. (2008) ‘Simulation in robotics’, Mathematics and
for the SCARA robot was built and simulation was carried Computers in Simulation, Vol. 79, pp.879–897.
out using both SD and MATLAB/Simulink software. SD Loudini, M., Boukhetala, D. and Tadjine, M. (2007)
programme enables researchers to investigate robot ‘Comprehensive mathematical modelling of a lightweight
flexible link robot manipulator’, International Journal of
parameters and in turn, this will facilitate the process of
Modelling, Identification and Control, Vol. 2, No. 4,
designing, constructing and inspecting the robots in the pp.313–321.
real world. An agreement between the SD and the Mino, J. and White, A. (2002) ‘Modelling an industrial
MATLAB/Simulink results was certainly obtained herein. manipulator: a case study’, Simulation Practice and Theory,
Knowing the torques exerted on the joints and the angles Vol. 9, pp.293–319.
of these joints (by using SD software), designers can select Ogata, K. (1997) Modern Control Engineering, 3rd ed., Prentice
the suitable motors without doing further calculation which Hall.
results in saving time and money. Saeed, B. (2001) Introduction to Robotics, Analysis, Systems,
As a consequence of the presented features and of the Applications, Prentice Hall Inc., New Jersey.
authors experience in modelling and simulation with Tahboub, K. (1993) ‘Modeling and control of constrained robots’,
technologies with the SD programme, one can conclude that Dissertation for PhD, University of Wuppertal, Germany.
this technique is a very powerful and useful tool, useful both Theodor, B. and Ionescu, I. (2002) Robot Modeling and
for visualisation with the improvement of user’s capacity Simulation, Editor AGIR and Editora Academiei Romane,
of representation, as well as for important gain of Bucharest.
technological information in the design and optimisation. Yamacli, S. and Canbolat, H. (2008) ‘Simulation of a SCARA
The presented results underline that robot systems robot with PD and learning controllers’, Simulation Modelling
independently of their complexity and dimensions can be Practice and Theory, Vol. 16, pp.1477–1487.
easily modelled, their behaviour can be simulated, analysed, Yu, J., Fang, Q. and Ke, Y. (2009) ‘Trajectory planning of
and optimised with good results. multi-robot coordination platform for locating large
subassembly’, International Journal of Modelling,
Identification and Control, Vol. 6, No. 4, pp.357–366.
Yu, S., Guo, G., Ma, Z. and Du, J. (2006) ‘Global fast terminal
Acknowledgements sliding mode control for robotic manipulators’, International
The paper presents results of research project performed in Journal of Modelling, Identification and Control, Vol. 1,
No. 1, pp.72–79.
Germany. The project was supported and funded by German
Research Association (DFG), Jordanian Higher Council for
Science and Technology, Al-Balqa’ Applied University and
Konstanz University of Applied Science (HTWG). We Nomenclature
would like to thank and acknowledge all these organisations J1, J2 Moment of inertias of the main and the for arm
for their financial and logistic support. (kg m2)
Jm Motor inertia (kg m2)
Jg1, Jg2 Inertias of the gearbox 1 and 2 (kg m2)
References
Va Armature voltage
Bencsik, A. (2004) ‘Appropriate mathematical model of DC servo
motors applied in SCARA robots’, Acta Polytechnica La1, La2 Armature inductances of motor 1 and 2 (H)
Hungarica, Vol. 1, No. 2, pp.99–111. R Armature circuit resistance (Ω)
Das, M.T. and Dulger, L.C. (2005) ‘Mathematical modelling, φ The flux per pole
simulation and experimental verification of a SCARA
T Electromagnetic torque developed by the motor
robot’, Simulation Modelling Practice and Theory, Vol. 13,
(Nm)
pp.257–271.
B Damping ratio of the mechanical system
Ionescu, F. and Stefanoiu, D. (2002) ‘HYPAS – a modular
structured model design, simulation and control programming ke Electromotive force constant
environment’, Proceed. of the IASTED Intern. Confer. on kT Torque constant (in Nm/amp)
Artificial and Computational Intelligence, pp.324–329,
Tokyo, Japan. kω Speed constant (v\rad\s)
Ionescu, F., Chojnowski, F. and Constantin, G. (2002a) ‘Virtual m1, m2 Masses of the main and the fore arms (kg)
reality in mechanical engineering, modelling and simulation L1, L2 Lengths of the main and the fore arms (m)
with solid dynamics’, ARA-Journal, Vol. 2002, No. 27,
pp.81–88. px, py Horizontal robot coordinates (m)
Ionescu, F., Stefanoiu, D. and Vlad, C. (2002b) ‘Modular θ1 ,θ1 ,θ1 Angular displacement, velocity and acceleration of
structured model design, simulation and control of hydraulic the main arm (rad, rad/s, rad/s2)
and pneumatic drive systems by using HYPAS’, θ 2 ,θ2 ,θ2 Angular displacement, velocity and acceleration of
ARA-Journal, Vols. 2000–2002, Nos. 25–26, pp.168–177, the fore arm (rad, rad/s, rad/s2)
ISBN 3-00-011583-8.
d3 , d3 , d3 Translational displacement velocity and
Ionescu, I. (2007) ‘Modeling and simulation in mechatronics’, acceleration of the quill
IFAS Inter. Confer. MCPL, Sibiu, Romania.
38 M.S. Alshamasin et al.
Nomenclature (continued)
gr Gear-reduction ratio
η Efficiency of the system
θm Angular position of the motor (radian)
D Warm wheel diameter
θL Load angular position