Shembulli 2
Shembulli 2
Abstract
This paper presents a general purpose of modeling and simulating multibody dynamics
in Maple and Maplesim. The method is exemplified by modeling 2DOF Robot arm in
Maple using Newton-Euler formulation algorithm. Drag-and-drop Physical modeling tool
in Maplesim is used to simulate the dynamics of the same robotic system. Results from
both Maple and Maplesim model are compared. The paper shows in tutorial form how
Maple and Maplesim are very excellent environment for modeling and simulating
multibody systems.
1. Introduction
Dynamic modeling means deriving equations that clearly describes the relationship
between force and motion. These equations are important to consider in robot simulation,
and robot control design algorithms. There are several methods to formulate the robot
motion dynamic, such as the Euler-Lagrange formulation [1-4], and Newton-Euler
formulation [5-8] which are the most familiar methods. Euler-Lagrange formulation is
energy based approach which describe the evolution of a mechanical system subject to
holonomic constraints, while The Newton-Euler formulation is quite different because
each link of the manipulator is studied in turn. To derive the dynamic model of a
manipulator robot with n-link using Newton-Euler formulation; first we need to do a
forward recursion which represent the linear and angular motion of the robot, then we do
the backward recursion to compute the forces and torques.
In this work we show how to develop and implement the Newton-Euler recursive
technique in Maple software and how to generate the differential equations of motion in
state-space form and solve them. This paper shows how we can create and simulate the
same robotic system by Drag-and-Drop physical modeling tools in Maplesim and get
faster results equivalent to Maple results.
2. Newton-Euler Algorithm
The dynamics equations of the robot can be generated iteratively by Newton-Euler
formalism. For m equal the mass, I the inertia tensor, v the velocity, the angular
velocity, and F and N are the external forces and moments acting in each link of the robot,
the Newton equation is:
d
m v F (1)
dt ext
And the Euler equation is:
I I N (2)
t ext
These two equations can be solved iteratively in two loop circle. First the velocities and
accelerations are determined by calculating in an outward direction from the base of the
robot to its end-effector. Then, the forces and moments are gained by inward calculations
in the opposite direction.
The resulting equations can be combined as matrix-vector differential equations, the so
called state-space form:
M q q V q,q G q (3)
Where M is (nхn) positive definite mass matrix, V is (nх1) vector of centripetal and
Coriolis terms, and G is (nх1) vector of the gravity components.
In Newton-Euler algorithm we define R as the transformation matrix for neighboring
link coordinate frame, (theta) and d are free Denavit-Hartenberg parameters for rotational
and prismatic joints, respectively. P is coordinating system origins of neighboring frames,
f and n are external forces and moment, and k is the unit vector of a link coordinates
system pointing along the joint axis.
i i R i 1 Z
Revolute : i i 1 i 1 i i
(4)
i i R i 1
Prismatic : i i 1 i 1
• • • ••
Revolute :
i
i 1i R ii 11 ii i ki i ki (5)
i
• •
Prismatic : i
i
i 1i R ii 11
3. Linear acceleration can be calculated by the next equation system:
Rev : ai i1i R ai 1 ii1 i 1 p i 1 i 1 i 1 p
1 i i 1 i 1
i
(6)
Pri : ai i 1i R ai 1 ii 1 i 1 p i 1 i 1 i 1 p 2 i d Z d Z
1 i 1 i i i i
i i 1 i i
Ni Ii ii ii Ii ii (9)
2.2. Inward Iterations
Forces and Moments Calculation for each joint prismatic or revolute can be calculated
from base to end-effector in inward direction by the next equations:
1. Forces and moments for revolute and prismatic joint:
Force : i 1 f i 1R i f i 1F
i 1 i i i 1
(10)
Torque : i 1n i 1R i n i 1 p i 1R i f i 1 p i 1F i 1N
i 1 i i i i i i 1 c i 1 i 1
2. Controlling forces and moments for revolute and prismatic joint:
Rev : i 1nT Z
i 1 i 1 i 1
(11)
Pri : i 1 f T Z
i 1 i 1 i 1
If the base is not rotating the initial value is:
0 0
0 0 0,
Else (12)
0
0
0 0 , 0 0
Outward iterations and inward iterations in the previous section can be implemented in
Maple programing as follows:
> restart :
> with(LinearAlgebra):
> outward := proc (m ::scalar, I_C:: matrix, P :: Vector, P_C:: Vector,
R :: matrix, o :: Vector, odot :: Vector, tdot ::scalar, tddot ::scalar,
vdot :: Vector, o_p ::name, odot_p ::name, vdot_p ::name, F_p ::name,
N_p ::name)
local vdot_C, Z ;
Z := Vector([0, 0, 1]) ;
o_p := R.o + tdot *Z ;
odot_p := (R.odot) + (R.o) & x (tdot *Z)+ tddot *Z ;
vdot_p := R.(odot & x P) + R.(o & x (o & x P)) + R.vdot ;
vdot_C := (odot_p & x P_C) + o_p & x (o_p & x P_C) + vdot_p;
F_p := m * vdot_C ;
N_p := I_C.odot_p + Z & x (I_C.o_p) ;
end
> with(MTM):
> tau[2] := inward(F2, N2, transpose(R3), P3, PC2, f3, n3, f2, n2) :
> with(MTM):
> tau[1] := inward(F1,N1,transpose(R2),P2,PC1,f2,n2,f1,n1):
3.9. Add rotational Spring Damper to joint1
L L m cos( T2 )+ 14 L m + 14 L m + L m
1 2 2 2
2
2
2
1 1
2
1 2
1 2
L m
4 2 2
+ 12 L1L2m2cos( T2 )
M
1
4
L m + 12 L L m cos( T2 )
2
2 2 1 2 2
1 2
L m
4 2 2
> Mv := MatrixInverse(M):
GravityVector:
(12 sin(T1 + T2)L2m2 + 12 L1m1sin(T1)+ L1m2sin(T1))g
G
1 sin(T1 + T2)gL m
2 2 2
3.14. Set the Differential Equations
> L1 := 1: L2 := 1: m1 := 1: m2 := 1: c := 1: d := 1: g := 9.8
> st := time( )
Solution
F:=[t = proc (t)...end proc,1(t) = proc (t)...end proc, d 1(t) = proc (t)...end proc,
dt
(t) d
= proc (t)...end proc, (t) = proc (t)...end proc]
2
dt 2
> X := eval(theta[1](t),F):
Z := eval(diff(theta[1](t),t),F):
> plot(X, 0 .. 10,title = "shoulder angle")# fig.2a
> plot(Z, 0 .. 10,title = "shoulder speed")# fig.2b
> plot(D(Z), 0 .. 10,title = "shoulder acceleration")# fig.2c
> plot(-(d.Z+ c.X), 0 .. 10,title = "shoulder torque")# fig.2d
5. Conclusion
It has been shown that Maple and Maplesim are an excellent environment for modeling
and simulating multibody systems. These kind of symbolic programming gives a much
deeper understanding of multibody dynamics than pure numeric equations, also the use of
drag-and-drop tool in maplesim is bringing your model to live and make it easy for you to
change the parameters and update your model.
Acknowledgment
The authors gratefully acknowledge the financial support of the International Exchange
Program of Harbin Engineering University for innovation and talents cultivation.
References
[1] V. Falkenhahn, “Dynamic modeling of constant curvature continuum robots using the Euler-Lagrange
formalism”, in Intelligent Robots and Systems, 2014 IEEE/RSJ International Conference on, (2014).
[2] H. Li, “Dynamics and optimization of a 2-DOF parallel robot with flexible links”, In Intelligent Control
and Automation, 7th World Congress on, IEEE, (2008).
[3] D. Li, “Dynamic Model of a 3 DOF Direct Drive Robot and Its Control Mode”, In Control and
Automation, IEEE International Conference on, IEEE, (2007).
[4] B. Dasgupta and T. S. Mruthyunjaya, “A Newton-Euler formulation for the inverse dynamics of the
Stewart platform manipulator”, Mechanism and Machine Theory, vol. 33.8, (1998), pp. 1135-1152.
[5] W. Khalil, “Dynamic Modeling of Robots Using Newton-Euler Formulation”, Informatics in Control,
Automation and Robotics. Springer Berlin Heidelberg, (2011), pp. 3-20.
[6] E. Stoneking, “Newton-euler dynamic equations of motion for a multi-body spacecraft”, AIAA
Guidance, Navigation, and Control Conference, (2007).
[7] A. De Luca and L. Ferrajoli, “A modified newton-euler method for dynamic computations in robot fault
detection and control”, Robotics and Automation, ICRA'09, IEEE International Conference on, (2009).
[8] V. Aslanov, G. Kruglov and V. Yudintsev, “Newton–Euler equations of multibody systems with
changing structures for space applications”, Acta Astronautica, vol. 68.11, (2011), pp. 2080-2087.
[9] F. L. Lewis, D. M. Dawson and C. T. Abdallah, “Robot manipulator control: theory and practice”, CRC
Press, (2003).
[10] M. W. Spong, S. Hutchinson and M. Vidyasagar, “Robot modeling and control”, New York: Wiley, vol.
3, (2006).
[11] J. J. Craig, “Introduction to robotics: mechanics and control”, Upper Saddle River, NJ, USA:
Pearson/Prentice Hall, (2005),.
[12] Available from: http://www.maplesoft.com/. 15, Sep, (2015).
[13] A. Heck and W. Koepf, “Introduction to MAPLE”, New York: Springer-Verlag, (1993).
Authors
Liu Shaogang, he is Professor, doctoral tutor. Harbin Engineering
University, mechanical design and theory research on design and
theory of mechanical discipline leaders, director of the Institute and
the government of Heilongjiang province science and Technology
Economic Advisory Committee of experts. Currently engaged in
mechanical and electronic engineering, mechanical design and theory,
computer control system, pneumatic emission (ejection) research
technology, fire protection technology, ecological protection
technology and equipment. He has many publication in a scholar
journal in the above research areas.