39
R.Parent, CSE788 OSU Constrained Body Dynamics Chapter 4 in: Mirtich Impulse-based Dynamic Simulation of Rigid Body Systems Ph.D. dissertation, Berkeley, 1996

Constrained Body Dynamics

  • Upload
    piper

  • View
    31

  • Download
    2

Embed Size (px)

DESCRIPTION

Constrained Body Dynamics. Chapter 4 in: Mirtich Impulse-based Dynamic Simulation of Rigid Body Systems Ph.D. dissertation, Berkeley, 1996. Preliminaries. Links numbered 0 to n Fixed base: link 0; Outermost like: link n Joints numbered 1 to n Link i has inboard joint, Joint i - PowerPoint PPT Presentation

Citation preview

Page 1: Constrained Body Dynamics

R.Parent, CSE788 OSU

Constrained Body Dynamics

Chapter 4 in:Mirtich

Impulse-based Dynamic Simulation of Rigid Body Systems

Ph.D. dissertation, Berkeley, 1996

Page 2: Constrained Body Dynamics

R.Parent, CSE788 OSU

Preliminaries• Links numbered 0 to n• Fixed base: link 0; Outermost like: link n• Joints numbered 1 to n• Link i has inboard joint, Joint i• Each joint has 1 DoF

• Vector of joint positions: q=(q1,q2,…qn)T

1

2 n…

Page 3: Constrained Body Dynamics

R.Parent, CSE788 OSU

The Problem

• Given:

– the positions q and velocities of the n joints of a serial linkage,

– the external forces acting on the linkage,

– and the forces and torques being applied by the joint actuators

• Find: The resulting accelerations of the joints:q

q

Page 4: Constrained Body Dynamics

R.Parent, CSE788 OSU

First Determine equations that give absolute motion of

all links

Given: the joint positions q, velocities and accelerationsCompute: for each link the linear and angular velocity and acceleration relative to an inertial frame

Page 5: Constrained Body Dynamics

R.Parent, CSE788 OSU

Notation

ia

iv

i

i

Linear velocity of link i

Linear acceleration of link i

Angular velocity of link i

Angular acceleration of link i

Page 6: Constrained Body Dynamics

R.Parent, CSE788 OSU

Joint variables

iu

ir

id

Unit vector in direction of the axis of joint i

vector from origin of Fi-1 to origin of Fi

vector from axis of joint i to origin of Fi

joint position

joint velocity

iq

iq

Page 7: Constrained Body Dynamics

R.Parent, CSE788 OSU

Basic terms

ui

ridi

Fi

Fi-1

],[ qq

State vectorAxis of articulation

Frames at center of mass

• Fi – body frame of link i• Origin at center of mass• Axes aligned with principle axes of inertia

Page 8: Constrained Body Dynamics

R.Parent, CSE788 OSU

From base outward

• Velocities and accelerations of link i are completely determined by:

1. the velocities and accelerations of link i-1

2. and the motion of joint i

Page 9: Constrained Body Dynamics

R.Parent, CSE788 OSU

First – determine velocities and accelerations

From velocity and acceleration of previous link, determine total velocity and acceleration of current link

iiii av ,,,,111,1 ,,, iiii av

relrelrelrel av ,,,,From local joint

Computed from base outward To be computed

Page 10: Constrained Body Dynamics

R.Parent, CSE788 OSU

Compute outwardAngular velocity of link i =

angular velocity of link i-1 plus

angular velocity induced by rotation at joint i

relii 1

Linear velocity:

reliiii vrvv 11

Page 11: Constrained Body Dynamics

R.Parent, CSE788 OSU

Compute outward

relii 1

reliiiiii vrraa 111

relreliiiiiiii vvrraa 11111 )(

Rewritten, using

Angular acceleration propagation

Linear acceleration propagation

reliiii vrvv 11 1 iii vvr and(from previous slide)(relative velocity)

Page 12: Constrained Body Dynamics

R.Parent, CSE788 OSU

Define wrel and vrel and their time derivatives

iii uqiii uq

0relirelv

irel

iirel dv

prismatic revolute

Axis times parametric velocity Axis times parametric accelerationJoint velocity vector Joint acceleration vector

Page 13: Constrained Body Dynamics

R.Parent, CSE788 OSU

Velocity propagation formulae

(revolute)

iii 1

iiiiii drvv 11

linear

angular

reliiii vrvv 11

relii 1

iirel dv

irel

Page 14: Constrained Body Dynamics

R.Parent, CSE788 OSU

Time derivatives of vrel and wrel

iiirel 1

(revolute)

)()(1 iiiiiiiirel dddv

Joint acceleration vectorChange in joint velocity vector

From change in joint velocity vector

From joint acceleration vector

From change in change in vector from joint to CoM

Page 15: Constrained Body Dynamics

R.Parent, CSE788 OSU

Derivation of

iii uq(revolute)

)()(1 iiiiiiiirel dddv

iiii 1uququq iiii iii uu 1

iiiiiirel ddddt

dv

dt

d )()(

iiiiii ddd )( 1

relv

Page 16: Constrained Body Dynamics

R.Parent, CSE788 OSU

Propagation formulae(revolute)

iiiii 11

)()(2

)(

1

1111

iiiiii

iiiiiiiii

dd

rdraa

linear

angular

reliiiiii vrraa 111

relii 1

)()(1 iiiiiiiirel dddv

iiirel 1

Page 17: Constrained Body Dynamics

R.Parent, CSE788 OSU

First step in forward dynamics

• Use known dynamic state (q, q-dot)

• Compute absolute linear and angular velocities

• Acceleration propagation equations involve unknown accelerations

But first – need to introduce notation to facilitate equation writing

Spatial Algebra

Page 18: Constrained Body Dynamics

R.Parent, CSE788 OSU

Spatial Algebra

Spatial velocity

v

v

Spatial acceleration

a

a

Page 19: Constrained Body Dynamics

R.Parent, CSE788 OSU

Spatial Transform Matrix

FFGG vXv

RRr

RX FG ~

0

r – offset vector R– rotation

FFGG aXa

(cross product operator)

Page 20: Constrained Body Dynamics

R.Parent, CSE788 OSU

Spatial Algebra

Spatial force

f

f

Spatial transpose

TT abb

ax

yx

Spatial inner productSpatial joint axis

ii

ii du

us

(used in later)

Page 21: Constrained Body Dynamics

R.Parent, CSE788 OSU

ComputeSerialLinkVelocities

For i = 1 to N do

iiii uq

end

)( iiiii duqvv

Rrotation matrix from frame i-1 to i

rradius vector from frame i-1 to frame i (in frame i coordinates)

(revolute)

0,,, 0000 av

1 ii RrRvv iii 1

Specific to revolute joints

Page 22: Constrained Body Dynamics

R.Parent, CSE788 OSU

Spatial formulation of acceleration propagation

(revolute)

iiiiii csqaXa 11

)()(2

)(

1

1111

iiiiii

iiiiiiiii

dd

rdraa

Want to put in form:

iiiii 11Previously:

Page 23: Constrained Body Dynamics

R.Parent, CSE788 OSU

Spatial Coriolis force

)()(2)( 111

1

iiiiiiiii

iii ddrc

(revolute)

iiiiiii csqaXa 11

)()(2

)(

1

1111

iiiiii

iiiiiiiii

dd

rdraa

iiiii 11

These are the terms involving

ii

ii du

us

iii uq

Page 24: Constrained Body Dynamics

R.Parent, CSE788 OSU

Featherstone algorithm

Spatial acceleration of link i

Spatial force exerted on link i through its inboard joint

Spatial force exerted on link i through its outboard joint

All expressed in frame i

Forces expressed as acting on center of mass of link i

Iif

Oif

ia

Page 25: Constrained Body Dynamics

R.Parent, CSE788 OSU

Serial linkage articulated motion

Aii

Ai

Ii ZaIf

AiI

AiZ

Spatial articulated inertia of link i

Spatial articulated zero acceleration force of link I(independent of joint accelerations)

Develop equations by induction

Page 26: Constrained Body Dynamics

R.Parent, CSE788 OSU

Base Case

nnnIn amgmf

nnnnnIn II

Force/torque applied by inboard joint + gravity = inertia*accelerations of link

Consider last link of linkage (link n)

Newton-Euler equations of motion

Page 27: Constrained Body Dynamics

R.Parent, CSE788 OSU

Using spatial notation

nnn

n

n

n

n

n

In

In

I

gm

aI

Mf

0

0

Ann

Ann ZaIf

Inboard joint

Inf

In

gmn

Link n

Page 28: Constrained Body Dynamics

R.Parent, CSE788 OSU

Inductive case

111

1

1

1

1

1

1

1

1

1

0

0

iii

i

i

i

i

i

Oi

Oi

Ii

Ii

I

gm

aI

Mff

Inboard joint

Iif 1

Ii 1 gmi 1

outboard joint

Oi 1O

if 1Link i-1

Page 29: Constrained Body Dynamics

R.Parent, CSE788 OSU

Inductive case

111

1

1

1

1

1

1

1

1

1

0

0

iii

i

i

i

i

i

Oi

Oi

Ii

Ii

I

gm

aI

Mff

Oiiii

Ii fZaIf 11111

Iiii

Oi fXf

11

Iiiiiii

Ii fXZaIf

11111

The effect of joint I on link i-1 is equal and opposite to its effect on link i

Substituting…

Page 30: Constrained Body Dynamics

R.Parent, CSE788 OSU

Inductive caseIiiiiii

Ii fXZaIf

11111

)(11111Aii

Aiiiiii

Ii ZaIXZaIf

Invoking induction on the definition of Iif

Page 31: Constrained Body Dynamics

R.Parent, CSE788 OSU

Inductive case

)(11111Aii

Aiiiiii

Ii ZaIXZaIf

Express ai in terms of ai-1 and rearrange

])([)( 1111111 iiAii

Ai

Aiiiiiii

Aiiii

Ii qsIcIZXZaXIXIf

Need to eliminate from the right side of the equation iq

iiiiiii csqaXa 11

Page 32: Constrained Body Dynamics

R.Parent, CSE788 OSU

Inductive case])([)( 1111111 ii

Aii

Ai

Aiiiiiii

Aiiii

Ii qsIcIZXZaXIXIf

iiiiiiiiiiii

i

ii

iIiii uufdduf

fd

f

du

ufsQ

)()(

Magnitude of torque exerted by revolute joint actuator is Qi

Moment of force Moment of force

df u

A force f and a torque applied to link i at the inboard joint give rise to a spatial inboard force (resolved in the body frame) of

iii

iIi fd

ff

Page 33: Constrained Body Dynamics

R.Parent, CSE788 OSU

Inductive case

iiIiii ufsQ

iAii

iAi

Aiiiii

Aiii

i

sIs

cIZsaXIsQq

)(11

iiiiiii csqaXa 11

Aiiiiiii

Ai

Ii ZcsqaXIf

)( 11

Aii

Ai

Ii ZaIf

Premultiply both sides by is

substitute for Qi , and solve

previously and

Page 34: Constrained Body Dynamics

R.Parent, CSE788 OSU

And substitute

iAii

iAi

Aiiiii

Aiii

i

sIs

cIZsaXIsQq

)(11

])([)( 1111111 iiAii

Ai

Aiiiiiii

Aiiii

Ii qsIcIZXZaXIXIf

])]([

[

])([

1111

11111

iAii

iAi

Aiiiii

Aiiii

Ai

iAi

Aiiii

iii

iAii

Aiii

AiA

iiiiI

i

sIs

cIZsaXIsQsIcIZXZ

aXsIs

IssIIXIf

Page 35: Constrained Body Dynamics

R.Parent, CSE788 OSU

And form I & Z terms

])]([

[

])([

1111

11111

iAii

iAi

Aiiiii

Aiiii

Ai

iAi

Aiiii

iii

iAii

Aiii

AiA

iiiiI

i

sIs

cIZsaXIsQsIcIZXZ

aXsIs

IssIIXIf

1111 )(

ii

iAii

Aiii

AiA

iiiiA

i XsIs

IssIIXII

])]([

[ 11111

iAii

iAi

Aiiiii

Aiiii

Ai

iAi

Aiiii

Ai

sIs

cIZsaXIsQsIcIZXZZ

Aii

Ai

Ii ZaIf

To get into form:

Page 36: Constrained Body Dynamics

R.Parent, CSE788 OSU

Ready to put into code

Using • Loop from inside out to compute velocities

previously developed (repeated on next slide)• Loop from inside out to initialization of I, Z, and c

variables• Loop from outside in to propagate I, Z and c

updates• Loop from inside out to compute q-dot-dot using

I, Z, c

Page 37: Constrained Body Dynamics

R.Parent, CSE788 OSU

ComputeSerialLinkVelocities

For i = 1 to N do

iiii uq

end

)( iiiii duqvv

Rrotation matrix from frame i-1 to i

rradius vector from frame i-1 to frame i (in frame i coordinates)

(revolute)

0,,, 0000 av

1 ii RrRvv iii 1

Specific to revolute joints

Page 38: Constrained Body Dynamics

R.Parent, CSE788 OSU

InitSerialLinks

For i = 1 to N do

end

iii

iAi I

gmZ

)()(2)( 111

1

iiiiiiiii

iii ddrc

0

0

i

iAi I

MI

(revolute)

Page 39: Constrained Body Dynamics

R.Parent, CSE788 OSU

SerialForwardDynamics

For i = n to 2 do

1111 ][

ii

iAii

Aiii

AiA

iiiA

iA

i XsIs

IssIIXII

Call compSerialLinkVelocities

Call initSerialLinks

])]([

[111

iAii

iiAA

iiiiAi

iAi

Aiii

Ai

Ai

sIs

cIZsQsIcIZXZZ

For i = 1 to n do

00 a

iAii

iAi

Aiiiii

Aiii

isIs

cIZsaXIsQq

)(11

iiiiiii sqcaXa 11