Multibody simulationDynamics of a multibody system (Newton-Euler formulation)
Dimitar Dimitrov
Orebro University
June 8, 2012
Main points covered
Newton-Euler formulation
forward dynamics
inverse dynamics
1 / 17
Euler-Lagrange formulation
We derived the equations of motion for a multibody system by treatingthe multibody system as a whole and performing analysis using theLagrangian (the difference between the kinetic and potential energy) ofthe system.
Newton-Euler formulation
In this lecture, we describe an alternative formulation which treats eachlink in turn by forming the equations that govern its linear and angularmotion. The forces f and torques t acting on a particular link arecomputed by analyzing its interaction with its neighboring links.
Our starting point are the Newton-Euler equations for a single rigid body
f = mvc
t = ICω + ω × ICω
2 / 17
Let us express the equations of motion for link i as
[f i
ti
]
=
[miI 0
0 Ii
] [vi
ωi
]
+
[0
ωi × Iiωi
]
vi denotes the linear velocity of the center of mass (CoM) of link i
ωi denotes the angular velocity of link i
Ii denotes the 3× 3 inertia matrix of link i, calculated about itsCoM and expressed in the world frame.
all vectors are expressed with respect to the world frame
We can write the above equations as
uei = M iξi + un
i ,
where
uei =
[f i
ti
]
, M i =
[miI 0
0 Ii
]
, ξi =
[vi
ωi
]
, uni =
[0
ωi × Iiωi
]
3 / 17
For a system of n bodies (without constraints) we have
ue1
ue2
...uen
︸ ︷︷ ︸
ue
=
M1 0 . . . 0
0 M2 . . . 0
......
. . ....
0 0 . . . Mn
︸ ︷︷ ︸
M
ξ1ξ2...
ξn
︸ ︷︷ ︸
˙ξ
+
un1
un2
...unn
︸ ︷︷ ︸
un
or in short
ue = Mξ + un (1)
The fact that M is a block-diagonal matrix implies that there is nocoupling between the rigid bodies in the system. Or in other words, themotion of body i is independent of all other bodies.
4 / 17
Constraints due to joints
When the bodies are interconnected using joints, we have to introduceconstraints on their motion. There are alternative ways to do so
form the constraint equations of each pair of bodies, and imposethem explicitly
since we are dealing only with open-loop systems, we could use thejoint variables q as generalized coordinates, and impose theconstraints implicitly by expressing ξ in (1) as a function of thegeneralized coordinates and their derivatives
We adopt the second approach
Recall that when using the Euler-Lagrange formulation, we expressed theLagrangian of the system as a function of the generalized coordinates,and then substituted it in the Euler-Lagrange equations. Because of that,no constraints appeared explicitly in the equations of motion.
5 / 17
Implicit constraints
The relation between the velocityof link i and q can be expressed as
ξi =
[Jvi
Jωi
]
q = Jci q.
By using
Jc =
Jc1
Jc2
...Jcn
∈ R
6n×n
the velocities of all links can beexpressed as
ξ = Jcq
ξ = Jcq + Jcq (2)
Substitute (2) in ue = Mξ + un
ue = M(Jcq + Jcq) + un
= MJcq + uc, (3)
where uc = MJcq+un is the sum of allvelocity dependent inertial forces (andtorques) acting on the CoM of the links.
Multiply (3) by JTc from the left
JTc MJc
︸ ︷︷ ︸
H
q + JTc u
c
︸ ︷︷ ︸
c
= JTc u
e
︸ ︷︷ ︸
τ e
.
τ e are the generalized forces/torquesacting on the generalized coordinates as aresult of ue. Recall that τ e = JT
c ue is
the static relation.
6 / 17
Computing c
c = JTc MJcq + JT
c un
The only term of the above equation that we have not computed yet isJc. Forming it explicitly is not usually done because we can computedirectly the product Jcq as follows.
If we set q = 0 in ξ = Jcq + Jcq, we obtain
Jcq = ξ0.
We use ξ0to denote the Cartesian accelerations of the links computed
with zero joint accelerations q. Hence, c can be computed using
c = JTc (Mξ
0+ un)
︸ ︷︷ ︸
uc
. (4)
Computing the vector ξ0∈ R
6n can be done in a recursive fashion (as weshow next).
7 / 17
Link velocity ξ
ξ can be computed using ξ = Jcq, which corresponds to the followingrecursion for i = 1, . . . , n (we will assume fixed base v0 = 0, ω0 = 0).All vectors are expressed in the world frame.
Revolute joint
ωi = ωi−1 + kiqi
vi = vi−1 + ωi−1 × hi + ωi × di
= vi−1 + ωi−1 × (ri − ri−1) + ki × diqi
Prismatic joint
ωi = ωi−1
vi = vi−1 + ωi−1 × hi + ωi × di + kiqi
= vi−1 + ωi−1 × (hi + di) + kiqi
= vi−1 + ωi−1 × (ri − ri−1) + kiqi
where di = di + kiqi
ri
ri−1
hi
diqi
ki
vi
vi−1
ωi
ωi−1
8 / 17
Link acceleration ξ
The following computation for i = 1, . . . , n is called forward recursion. Afixed base is assumed, i.e., v0 = 0, v0 = 0, ω0 = 0, ω0 = 0.
revolute joint
ωi = ωi−1 + kiqi
ωi = ωi−1 + ωi−1 × kiqi + kiqi
vi = vi−1 + ωi−1 × (ri − ri−1) + ki × diqi
vi = vi−1 + ωi−1 × (ri − ri−1) + ωi−1 × (vi − vi−1) + ωi × (ki × di)qi
+ ki × diqi
prismatic joint
ωi = ωi−1
ωi = ωi−1
vi = vi−1 + ωi−1 × (ri − ri−1) + kiqi
vi = vi−1 + ωi−1 × (ri − ri−1) + ωi−1 × (vi − vi−1 + kiqi) + kiqi
9 / 17
Some notes
d
dtki = ωi × ki = (ωi−1 + kiqi)× ki = ωi−1 × ki.
d
dt(ki × di) = (ωi−1 × ki)× di + ki × (ωi × di)
= (ωi−1 × ki)× di + ki × [(ωi−1 + kiqi)× di]
= (ωi−1 × ki)× di + ki × (ωi−1 × di) + ki × (ki × di)qi
= ωi × (ki × di).
The last equality is obtained by adding the following term to the equation
ωi−1 × (ki × di) + ki × (di × ωi−1) + di × (ωi−1 × ki) = 0.
Note that any three vectors a, b, c ∈ R3 satisfy the Jacobi identity
a× (b× c) + b× (c× a) + c× (a× b) = 0.
10 / 17
Summary (Newton-Euler formulation - batch version)
Given
(q, q) - state of the system at time t
ue - external forces acting on the system (including gravity)
τ - torque delivered by joint motors
Do
form M , Jc, un
form the manipulator inertia matrix H = JTc MJc
compute link accelerations ξ0(forward recursion using q = 0)
form uc = Mξ0+ un
compute c = JTc u
c (backward recursion)
compute τ e = JTc u
e (backward recursion)
The above steps lead to the following equation of motion
Hq + c = τ e + τ
11 / 17
Recursive computation of JTc (u
e − uc)
Define[
f eci
teci
]
= ueci = ue
i − uci
f eci ∈ R
3 is a force acting at the CoM of link i
teci ∈ R3 is a torque acting on link i.
see figure on next slide
The following computation for i = n, . . . , 1 is called backward recursion.It is computationally more efficient compared to using JT
c (ue − uc).
fJi= fec
i + fJi+1
tJi= teci + tJi+1
+ di × f eci + (di + hi+1)× fJi+1
fJi+1, tJi+1
- forces and torques acting on link i through joint i+ 1
fJi, tJi
- forces and torques acting on link i− 1 through joint i
fJn+1= 0, tJn+1
= 0 is assumed
12 / 17
Figure (backward recursion)
fJi
tJi
fJi+1
tJi+1
feci
teci
di
hi+1
joint i
joint i+ 1
link i
backward recursion (i = n . . . , 1)
fJi= fec
i + fJi+1
tJi= teci + tJi+1
+ di × f eci + (di + hi+1)× fJi+1
13 / 17
Project (fJi, tJi) on the ith axis of rotation/translation
Define
τ ec = τ e − c = JTc (u
e − uc).
τ ec is the generalized force/torque acting on the generalized coordinatesq as a result of uc and ue.
The final step of the backward recursion is to determine
the torque τeci around the axis of rotation ki, if joint i is revolute
the force τeci along the axis of translation ki, if joint i is prismatic
τeci =
{ki · tJi
if joint i is revoluteki · fJi
if joint i is prismatic
14 / 17
Newton-Euler formulation (the big picture)
velo
citie
sand
accelerations (forward recursion)
forc
es
an
dto
rques (backward recursion)
the two recursions
forward recursion (1, . . . , n) for computing Cartesian velocities andaccelerations of the links
backward recursion (n, . . . , 1) for computing the generalized forcesτ ec as a result of the external and inertial forces acting on the links
15 / 17
Forward dynamics ⇔ inverse dynamics
Forward dynamics
Solve the equations of motion for the accelerations q resulting from givengeneralized forces/torques
q = H−1(τ e + τ − c).
After solving for q, one can obtain q and q by using numericalintegration. Forward dynamics is useful for the purpose of simulation.
Inverse dynamics
Find joint forces/torques τ that should be applied by the joint motors, inorder to generate system motion specified by q, q, q, (possibly in thepresence of external forces). Solving the inverse dynamics problem isequivalent to performing forward and backward recursions. It is useful for
forming the equations of motion
manipulator trajectory planning
control algorithm implementation
16 / 17
Recursive computation of the manipulator inertia matrix
We already know how to compute the manipulator inertia matrix H ,however, here we discuss an alternative (and more efficient) approach.
Step 0
set all external forces (including gravity) equal to zero
set q = 0.
This results in the following equation of motion (satisfied only by q = 0)
Hq = 0.
Recursive computation of H for i = 1, . . . , n
set qi = 1, and qj = 0 for all j 6= i
perform a forward and backward recursion
At the ith iteration, the result from the backward recursion would be avector of torques/forces that is equivalent to the ith column of H.
See file bMSd/examples/example_ID.m.17 / 17
Top Related