Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Multibody simulation

Dynamics 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 treating the multibody system as a whole and performing analysis using the Lagrangian (the dierence between the kinetic and potential energy) of the system. Newton-Euler formulation In this lecture, we describe an alternative formulation which treats each link in turn by forming the equations that govern its linear and angular motion. The forces f and torques t acting on a particular link are computed by analyzing its interaction with its neighboring links. Our starting point are the Newton-Euler equations for a single rigid body f = mv c t = IC + IC

2 / 17

Let us express the equations of motion for link i as fi ti = mi I 0 0 Ii vi i + 0 i Ii i

v i 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 its CoM and expressed in the world frame. all vectors are expressed with respect to the world frame We can write the above equations as ue = M i i + un , i i where ue = i fi , ti Mi = mi I 0 0 , Ii i = vi , i un = i 0 i Ii i
3 / 17

For a system of n bodies (without constraints) we have ue 1 ue 2 . . . ue n ue or in short ue = M + un (1) M1 0 . . . 0 0 M2 . . . 0 M ... ... .. . 0 0 . . . 1 2 . . . n

. . . Mn

un 1 un 2 . . . un n un

The fact that M is a block-diagonal matrix implies that there is no coupling between the rigid bodies in the system. Or in other words, the motion 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 introduce constraints on their motion. There are alternative ways to do so form the constraint equations of each pair of bodies, and impose them explicitly since we are dealing only with open-loop systems, we could use the joint variables q as generalized coordinates, and impose the constraints implicitly by expressing in (1) as a function of the generalized coordinates and their derivatives We adopt the second approach Recall that when using the Euler-Lagrange formulation, we expressed the Lagrangian 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 velocity of link i and q can be expressed as i = By using J c1 J c2 . . . J cn J vi J i q = J ci q. Substitute (2) in ue = M + un ue = M (J c q + J c q) + un = M J c q + uc ,

(3)

where uc = M J c q + un is the sum of all velocity dependent inertial forces (and torques) acting on the CoM of the links. Multiply (3) by J T from the left c J T M J c q + J T uc = J T ue . c c c H c e

Jc =

R6nn

the velocities of all links can be expressed as = J cq = J cq + J cq

(2)

e are the generalized forces/torques acting on the generalized coordinates as a result of ue . Recall that e = J T ue is c the static relation.
6 / 17

Computing c
c = J T M J c q + J T un c c The only term of the above equation that we have not computed yet is J c . Forming it explicitly is not usually done because we can compute directly the product J c q as follows. If we set q = 0 in = J c q + J c q, we obtain 0 J cq = . 0 We use to denote the Cartesian accelerations of the links computed with zero joint accelerations q . Hence, c can be computed using c = J T (M + un ) . c uc 0 Computing the vector R6n can be done in a recursive fashion (as we show next).
7 / 17

(4)

Link velocity
can be computed using = J c q, which corresponds to the following recursion for i = 1, . . . , n (we will assume xed base v 0 = 0, 0 = 0). All vectors are expressed in the world frame. Revolute joint i = i1 + ki qi v i = v i1 + i1 hi + i di = v i1 + i1 (r i ri1 ) + ki di qi
hi ki qi di vi i

Prismatic joint i = i1 v i = v i1 + i1 hi + i di + ki qi = v i1 + i1 (hi + di ) + ki qi = v i1 + i1 (r i r i1 ) + ki qi where di = di + ki qi

v i1 i1 r i1 ri

8 / 17

Link acceleration
The following computation for i = 1, . . . , n is called forward recursion. A xed base is assumed, i.e., v 0 = 0, v 0 = 0, 0 = 0, 0 = 0. revolute joint i = i1 + ki qi i = i1 + i1 ki qi + ki qi v i = v i1 + i1 (r i r i1 ) + ki di qi v i = v i1 + i1 (r i r i1 ) + i1 (v i v i1 ) + i (ki di )qi + ki di qi prismatic joint i = i1 i = i1 v i = v i1 + i1 (r i ri1 ) + ki qi v i = v i1 + i1 (r i ri1 ) + i1 (v i v i1 + ki qi ) + ki qi
9 / 17

Some notes
d ki = i ki = ( i1 + ki qi ) ki = i1 ki . dt

d (ki di ) = ( i1 ki ) di + ki ( i di ) dt = ( i1 ki ) di + ki [( i1 + ki qi ) di ] = ( i1 ki ) di + ki ( i1 di ) + ki (ki di )qi = i (ki di ). The last equality is obtained by adding the following term to the equation i1 (ki di ) + ki (di i1 ) + di ( i1 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 , J c , un form the manipulator inertia matrix H = J T M J c c 0 compute link accelerations (forward recursion using q = 0) 0 form uc = M + un compute c = J T uc (backward recursion) c compute e = J T ue (backward recursion) c The above steps lead to the following equation of motion Hq + c = e +
11 / 17

Recursive computation of J T (ue uc ) c


Dene f ec i tec i = uec = ue uc i i i

f ec R3 is a force acting at the CoM of link i i tec R3 is a torque acting on link i. i see gure on next slide The following computation for i = n, . . . , 1 is called backward recursion. It is computationally more ecient compared to using J T (ue uc ). c f Ji = f ec + f Ji+1 i tJi = tec + tJi+1 + di f ec + (di + hi+1 ) f Ji+1 i i f Ji+1 , tJi+1 - forces and torques acting on link i through joint i + 1 f Ji , tJi - forces and torques acting on link i 1 through joint i f Jn+1 = 0, tJn+1 = 0 is assumed
12 / 17

Figure (backward recursion)


joint i + 1 f Ji+1 tJi+1 f ec i tec i di f Ji t Ji joint i backward recursion (i = n . . . , 1) f Ji = f ec + f Ji+1 i tJi = tec + tJi+1 + di f ec + (di + hi+1 ) f Ji+1 i i
13 / 17

hi+1

link i

Project (f Ji , tJi ) on the ith axis of rotation/translation

Dene ec = e c = J T (ue uc ). c ec is the generalized force/torque acting on the generalized coordinates q as a result of uc and ue . The nal step of the backward recursion is to determine the torque iec around the axis of rotation ki , if joint i is revolute the force iec along the axis of translation ki , if joint i is prismatic iec = k i t Ji k i f Ji if joint i is revolute if joint i is prismatic

14 / 17

Newton-Euler formulation (the big picture)


ions (forward recursio erat n) cel ac d

ie

an

vel o

the two recursions forward recursion (1, . . . , n) for computing Cartesian velocities and accelerations 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

f or c

es a

nd

ackward re es (b curs qu ion) r to

cit

Forward dynamics inverse dynamics


Forward dynamics Solve the equations of motion for the accelerations q resulting from given generalized forces/torques q = H 1 ( e + c). After solving for q , one can obtain q and q by using numerical integration. Forward dynamics is useful for the purpose of simulation. Inverse dynamics Find joint forces/torques that should be applied by the joint motors, in order to generate system motion specied by q , q, q, (possibly in the presence of external forces). Solving the inverse dynamics problem is equivalent 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 ecient) approach. Step 0 set all external forces (including gravity) equal to zero set q = 0. This results in the following equation of motion (satised only by q = 0) H q = 0. Recursive computation of H for i = 1, . . . , n set qi = 1, and qj = 0 for all j = i perform a forward and backward recursion At the ith iteration, the result from the backward recursion would be a vector of torques/forces that is equivalent to the ith column of H. See le bMSd/examples/example_ID.m.
17 / 17

You might also like