Top Banner

of 17

MB Dynamics NE

Apr 04, 2018

Download

Documents

saxena
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/31/2019 MB Dynamics NE

    1/17

    Multibody simulationDynamics of a multibody system (Newton-Euler formulation)

    Dimitar Dimitrov

    Orebro University

    June 8, 2012

    Main points coveredNewton-Euler formulationforward dynamicsinverse dynamics

    1/17

  • 7/31/2019 MB Dynamics NE

    2/17

    Euler-Lagrange formulationWe 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) of the 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 bodyf = m v ct = I C + I C

    2/17

  • 7/31/2019 MB Dynamics NE

    3/17

    Let us express the equations of motion for link i as

    f it i

    = m i I 0

    0 I iv i i

    +0

    i I i i

    v i denotes the linear velocity of the center of mass (CoM) of linki i denotes the angular velocity of link i I i 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

    u ei = M i i + u ni ,

    where

    u ei =f it i

    , M i =m i I 0

    0 I i, i =

    v i i

    , u ni =0

    i I i i

    3/17

  • 7/31/2019 MB Dynamics NE

    4/17

    For a system of n bodies (without constraints) we have

    ue1

    u e2...

    u en

    u e

    =M 1 0 . . . 0

    0 M 2 . . . 0...

    .... . .

    ...0 0 . . . M n

    M

    1 2...

    n

    +u

    n1

    u n2...

    u nn

    u n

    or in short

    u e = M + u n (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

  • 7/31/2019 MB Dynamics NE

    5/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 explicitlysince we are dealing only with open-loop systems, we could use the

    joint 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

  • 7/31/2019 MB Dynamics NE

    6/17

    Implicit constraints

    The relation between the velocityof link i and q can be expressed as

    i =J v iJ i

    q = J c i q .

    By using

    J c =

    J c 1J c 2

    ...J c n

    R6 n n

    the velocities of all links can beexpressed as

    = J c q

    = J c q + J c q (2)

    Substitute ( 2) in u e = M + u n

    u e = M (J c q + J c q ) + u n= MJ c q + u c , (3)

    where u c = M J c q + u n is the sum of allvelocity dependent inertial forces (and

    torques) acting on the CoM of the links.

    Multiply (3) by J T c from the left

    J T c MJ c

    H q + J T c u

    c

    c= J T c u

    e

    e

    .

    e are the generalized forces/torquesacting on the generalized coordinates as aresult of u e . Recall that e = J T c u e isthe static relation .

    6/17

  • 7/31/2019 MB Dynamics NE

    7/17

    Computing c

    c = J T c M J c q + J T c u

    n

    The only term of the above equation that we have not computed yet isJ c . Forming it explicitly is not usually done because we can computedirectly the product J c q as follows.

    If we set q = 0 in = J c q + J c q , we obtain

    J c q = 0

    .

    We use 0

    to denote the Cartesian accelerations of the links computedwith zero joint accelerations q . Hence, c can be computed using

    c = J T c (M 0

    + u n )

    u c. (4)

    Computing the vector 0R 6 n can be done in a recursive fashion (as we

    show next).7/17

  • 7/31/2019 MB Dynamics NE

    8/17

    Link velocity

    can be computed using = J c q , which corresponds to the followingrecursion for i = 1 , . . . , n (we will assume xed basev 0 = 0 , 0 = 0 ).

    All vectors are expressed in the world frame.

    Revolute joint i = i 1 + k i q iv i = v i 1 + i 1 h i + i d i

    = v i 1 + i 1 (r i r i 1 ) + k i d i q i

    Prismatic joint i = i 1

    v i = v i 1 + i 1 h i + i d i + k i q i= v i 1 + i 1 (h i + d i ) + k i q i= v i 1 + i 1 (r i r i 1 ) + k i q i

    whered i = d i + k i q i

    ri

    r i 1

    h i

    d iq i

    k i

    v i

    v i 1

    i

    i

    1

    8/17

  • 7/31/2019 MB Dynamics NE

    9/17

    Link acceleration

    The following computation for i = 1 , . . . , n is called forward recursion. Axed base is assumed, i.e., v 0 = 0 , v 0 = 0 , 0 = 0 , 0 = 0 .

    revolute joint i = i 1 + k i q i i = i 1 + i 1 k i q i + k i q i

    v i = v i 1 + i 1 (r i r i 1 ) + k i d i q iv i = v i 1 + i 1 (r i r i 1 ) + i 1 (v i v i 1 ) + i (k i d i )q i

    + k i d i q i

    prismatic joint i = i 1 i = i 1v i = v i 1 + i 1 (r i r i 1 ) + k i q iv i = v i 1 + i 1 (r i r i 1 ) + i 1 (v i v i 1 + k i q i ) + k i q i

    9/17

  • 7/31/2019 MB Dynamics NE

    10/17

    Some notes

    d

    dt

    k i = i k i = ( i 1 + k i q i ) k i = i 1 k i .

    ddt

    (k i d i ) = ( i 1 k i ) d i + k i ( i d i )

    = ( i 1 k i ) d i + k i [( i 1 + k i q i ) d i ]= ( i 1 k i ) d i + k i ( i 1 d i ) + k i (k i d i )q i= i (k i d i ).

    The last equality is obtained by adding the following term to the equation

    i 1 (k i d i ) + k i (d i i 1 ) + d i ( i 1 k i ) = 0 .

    Note that any three vectors a , b, c R 3 satisfy the Jacobi identity

    a (b c ) + b (c a ) + c (a b) = 0 .

    10/17

    f

  • 7/31/2019 MB Dynamics NE

    11/17

    Summary (Newton-Euler formulation - batch version)

    Given(q , q ) - state of the system at time tu e - 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 c MJ c

    compute link accelerations 0

    (forward recursion using q = 0 )

    form u c = M 0

    + u n

    compute c = J T c u c (backward recursion)compute e = J T c u e (backward recursion)

    The above steps lead to the following equation of motion

    H q + c = e +

    11/17

    R i i f T ( e c)

  • 7/31/2019 MB Dynamics NE

    12/17

    Recursive computation of J T c (u e u c)Dene

    f eci

    teci

    = u eci = uei u

    ci

    f eci R3 is a force acting at the CoM of link i

    t eci R3 is a torque acting on link i .

    see gure on next slideThe following computation for i = n , . . . , 1 is called backward recursion.It is computationally more efficient compared to using J T c (u e u c ).

    f J i = f eci + f J i +1

    t J i = t eci + t J i +1 + d i f eci + ( d i + h i +1 ) f J i +1

    f J i +1 , t J i +1 - forces and torques acting on link i through joint i + 1f J i , t J i - forces and torques acting on link i 1 through joint i

    f J n +1 =0

    , t J n +1 =0

    is assumed12/17

    Fi (b k d i )

  • 7/31/2019 MB Dynamics NE

    13/17

    Figure (backward recursion)

    f J it J i

    f J i +1

    t J i +1f eci

    t eci

    d i

    h i +1

    joint i

    joint i + 1

    link i

    backward recursion (i = n . . . , 1)

    f J i = f eci + f J i +1

    t J i = teci + t J i +1 + d i f

    eci + ( d i + h i +1 ) f J i +1

    13/17

    P j t (f ) th i th i f t ti /t l ti

  • 7/31/2019 MB Dynamics NE

    14/17

    Project (f J i , t J i ) on the i th axis of rotation/translation

    Dene ec = e c = J T c (u

    e u c ).

    ec is the generalized force/torque acting on the generalized coordinatesq as a result of u c and u e .

    The nal step of the backward recursion is to determinethe torque eci around the axis of rotation k i , if joint i is revolutethe force eci along the axis of translation k i , if joint i is prismatic

    eci =k i t J i if joint i is revolutek i f J i if joint i is prismatic

    14/17

    N t E l f l ti (th big i t )

  • 7/31/2019 MB Dynamics NE

    15/17

    Newton-Euler formulation (the big picture)

    v e l o

    c i t i e

    s a n d a

    c c e l e

    r a t i o n s ( fo rw a r d r e c u r s i o n )

    f o r c e

    s a

    n d

    t o r q

    u e s( ba c k w a r d r e c u r s i o n )

    the two recursionsforward recursion (1, . . . , n ) for computing Cartesian velocities andaccelerations of the linksbackward recursion (n , . . . , 1) for computing the generalized forces ec as a result of the external and inertial forces acting on the links

    15/17

    For ard d namics in erse d namics

  • 7/31/2019 MB Dynamics NE

    16/17

    Forward dynamics inverse dynamics

    Forward dynamicsSolve 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 dynamicsFind joint forces/torques that should be applied by the joint motors, inorder to generate system motion specied by q , q , q , (possibly in the

    presence of external forces). Solving the inverse dynamics problem isequivalent to performing forward and backward recursions. It is useful forforming the equations of motionmanipulator trajectory planningcontrol algorithm implementation

    16/17

    Recursive computation of the manipulator inertia matrix

  • 7/31/2019 MB Dynamics NE

    17/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 0set all external forces (including gravity) equal to zeroset q = 0 .

    This results in the following equation of motion (satised only byq =0

    )H q = 0 .

    Recursive computation of H for i = 1 , . . . , n

    set q i = 1 , and q j = 0 for all j = iperform a forward and backward recursion

    At the i th iteration, the result from the backward recursion would be avector of torques/forces that is equivalent to the i th column of H .

    See le bMSd/examples/example_ID.m .17/17