rigid body dynamics ii solving the dynamics problems

47
UNC Chapel Hill S. Redon - M. C. Lin Rigid body dynamics II Solving the dynamics problems

Upload: avery

Post on 05-Jan-2016

71 views

Category:

Documents


4 download

DESCRIPTION

Rigid body dynamics II Solving the dynamics problems. Outline. Algorithm overview Computing constrained accelerations Computing a frictional impulse Extensions - Discussion. Outline. Algorithm overview Computing constrained accelerations Computing a frictional impulse - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Rigid body dynamics IISolving the dynamics problems

Page 2: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Outline

Algorithm overviewComputing constrained accelerations Computing a frictional impulseExtensions - Discussion

Page 3: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Outline

Algorithm overviewComputing constrained accelerations Computing a frictional impulseExtensions - Discussion

Page 4: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Algorithm Overview

Page 5: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Algorithm Overview

Two modules– Collision detection– Dynamics Calculator

Two sub-modules for the dynamics calculator– Constrained motion computation (accelerations/forces)– Collision response computation

(velocities/impulses)

Page 6: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Two modules– Collision detection– Dynamics Calculator

Two sub-modules for the dynamics calculator– Constrained motion computation (accelerations/forces)– Collision response computation

(velocities/impulses)

Two kinds of constraints– Unilateral constraints (non-penetration constraints…)– Bilateral constraints (hinges, joints…)

Algorithm Overview

Page 7: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Outline

Algorithm overviewComputing constrained accelerations Computing a frictional impulseExtensions - Discussion

Page 8: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Constrained accelerations

Solving unilateral constraints is enoughWhen vrel ~= 0 -- have resting contact

All resting contact forces must be computed and applied together because they can influence one another

Page 9: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Constrained accelerations

Page 10: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Here we only deal with frictionless problemsTwo different approaches

– Contact-space : the unknowns are located at the contact points

– Motion-space : the unknowns are the object motions

Constrained accelerations

Page 11: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Contact-space approach– Inter-penetration must be prevented– Forces can only be repulsive – Forces should become zero when the bodies

start to separate– Normal accelerations depend linearly on normal

forces This is a Linear Complementarity Problem

Constrained accelerations

Page 12: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Motion-space approach– The unknowns are the objects’ accelerations

Gauss’ principle of least contraints – “The objects’ constrained accelerations are the

closest possible accelerations to their unconstrained ones”

Constrained accelerations

Page 13: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Formally, the accelerations minimize the distance

over the set of possible accelerationsa is the acceleration of the system M is the mass matrix of the system

Constrained accelerations

Page 14: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

The set of possible accelerations is obtained from the non-penetration constraints

This is a Projection problem

Constrained accelerations

Page 15: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Example with a particle

Constrained accelerations

The particle’s unconstrained acceleration is projected on the set of possible accelerations (above the ground)

Page 16: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Both formulations are mathematically equivalent

The motion space approach has several algorithmic advantages– J is better conditionned than A– J is always sparse, A can be dense– less storage required– no redundant computations

Constrained accelerations

Page 17: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Outline

Algorithm overviewComputing constrained accelerations Computing a frictional impulseExtensions - Discussion

Page 18: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

We consider -one- contact point only The problem is formulated in the collision

coordinate system

Computing a frictional impulse

-j

+j

Page 19: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Notations– v : the contact point velocity of body 1

relative to the contact point velocity of body 2– vz : the normal component of v – vt : the tangential component of v – : a unit vector in the direction of vt

– fz and ft : the normal and tangential (frictional) components of force exerted by body 2 on body 1, respectively.

tv̂

Computing a frictional impulse

Page 20: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

When two real bodies collide there is a period of deformation during which elastic energy is stored in the bodies followed by a period of restitution during which some of this energy is returned as kinetic energy and the bodies rebound of each other.

Computing a frictional impulse

Page 21: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

The collision occurs over a very small period of time: 0 tmc tf.

tmc is the time of maximum compression

vz is the relative normal velocity. (We used vrel before)

Computing a frictional impulse

vz

Page 22: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

jz is the impulse magnitude in the normal direction.

Wz is the work done in the normal direction.

jz

Computing a frictional impulse

Page 23: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

v-=v(0), v0=v(tmc), v+=v(tf), vrel=vz

Newton’s Empirical Impact Law:Poisson’s Hypothesis:

Stronge’s Hypothesis:

– Energy of the bodies does not increase when friction present

zz εvv0z

0zz εjjj

0zz ε)j(1j

0z

20zz WεWW

0z

2z )Wε(1W

Computing a frictional impulse

Page 24: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sliding (dynamic) friction

Dry (static) friction

Assume no rolling friction

tntt vfμf0v ˆ

ntt fμf0v

Computing a frictional impulse

Page 25: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

where:

r = (p-x) is the vector from the center of mass to the contact point

Kj(t)j(t)rIrrIr1m1

m1

Δv(t) 21

2211

1121

~~~~

0rr-

r-0r

rr-0

r

xy

xz

yz~

Computing a frictional impulse

Page 26: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

The K Matrix

K is constant over the course of the collision, symmetric, and positive definite

Page 27: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Collision Functions

Change variables from t to something else that is monotonically increasing during the collision:

Let the duration of the collision 0. The functions v, j, W, all evolve over the

compression and the restitution phases with respect to .

)Kj()Δv(

Page 28: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Collision Functions

We only need to evolve vx, vy, vz, and Wz directly. The other variables can be computed from the results.

(for example, j can be obtained by inverting K)

Page 29: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sliding or Sticking?

Sliding occurs when the relative tangential velocity – Use the friction equation

to formulateSticking occurs otherwise

– Is it stable or instable?– Which direction does the instability get

resolved?

0v t

tntt vfμf0v ˆ

Page 30: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sliding Formulation

For the compression phase, use– is the relative normal velocity at the

start of the collision (we know this)– At the end of the compression phase,

For the restitution phase, use– is the amount of work that has been

done in the compression phase– From Stronge’s hypothesis, we know that

zvzv

0v0z

0zW

0z

2z )Wε(1W

zW

Page 31: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sliding Formulation

Compression phase equations are:

z

y

x

zz

y

x

z v

ξ(θ)k

ξ(θ)k

ξ(θ)k1

W

v

v

dvd

Page 32: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sliding Formulation

Restitution phase equations are:

ξ(θ)k

ξ(θ)k

ξ(θ)k

v1

ξ(θ)K v1

v

v

v

dWd

z

y

x

zzz

y

x

z

Page 33: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sliding Formulation

where the sliding vector is:

1vv

μvvv

μv

1

μsinθ

μcosθ

ξ(θ) 2y

2x

y

2y

2x

x

Page 34: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sliding Formulation

These equations are based on the sliding mode

Sometimes, sticking can occur during the integration

tntt vfμf0v ˆ

Page 35: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sticking Formulation

Page 36: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Sticking Formulation

Stable if– This means that static friction takes over for the

rest of the collision and vx and vy remain 0

If instable, then in which direction do vx and vy leave the origin of the vx, vy plane?– There is an equation in terms of the elements of K

which yields 4 roots. Of the 4 only 1 corresponds to a diverging ray – a valid direction for leaving instable sticking.

2133

22123

2113 KμKK

Page 37: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Impulse Based Experiment

Platter rotating with high velocity with a ball sitting on it. Two classical models predict different behaviors for the ball. Experiment and impulse-based dynamics agree in that the ball rolls in circles of increasing radii until it rolls off the platter.

Correct macroscopic behavior is demonstrated using the impulse-based contact model.

Page 38: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Outline

Algorithm overviewComputing constrained accelerations Computing a frictional impulseExtensions - Discussion

Page 39: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Systems can be classified according to the frequency at which the dynamics calculator has to solve the dynamics sub-problems

Extensions - Discussion

Page 40: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Systems can be classified according to the frequency at which the dynamics calculator has to solve the dynamics sub-problems

It is tempting to generalize the solutions (fame !)– Lasting non-penetration constraints can be viewed as

trains of micro-collisions, resolved by impulses– The LCP / projection problems can be applied to

velocities and impulses

Extensions - Discussion

Page 41: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Problems with micro-collisions– creeping : a block on a ramp can’t be stabilized

Extensions - Discussion

Page 42: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Problems with micro-collisions– creeping : a block on a ramp can’t be stabilized

Extensions - Discussion

Page 43: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Problems with micro-collisions– creeping : a block on a ramp can’t be stabilized– A hybrid system is required to handle bilateral

constraints (non-trivial)

Extensions - Discussion

Page 44: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Problems with micro-collisions– creeping : a block on a ramp can’t be stabilized– A hybrid system is required to handle bilateral

constraints (non-trivial)– Objects stacks can’t be handled for more than three

objects (in 1996), because numerous micro-collisions cause the simulation to grind to a halt

Extensions - Discussion

Page 45: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Extending the LCP– accelerations are replaced by velocities– forces are replaced by impulses– constraints are expressed on velocities and forces

Problem :– constraints are expressed on velocities and forces (!)

This can add energy to the system– Integrating Stronge’s hypothesis in this formulation ?

Extensions - Discussion

zz εvv

Page 46: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Extending the projection problem– accelerations are replaced by velocities– constraints are expressed on velocities and forces

Extensions - Discussion

zz εvv

Page 47: Rigid body dynamics II Solving the dynamics problems

UNC Chapel Hill S. Redon - M. C. Lin

Extending the projection problem– accelerations are replaced by velocities– constraints are expressed on velocities

Problem :– constraints are expressed on velocities (!)– This can add energy to the system

Extensions - Discussion

zz εvv