Rigid Body Dynamics

Rigid Body Dynamics

Rigid body dynamics Rigid body simulation Once we consider an object with spatial extent, particle system simulation is no longer sufficient Rigid body simulation • Unconstrained system • no contact • Constrained system • collision and contact Problems Performance is important! Problems Control is difficult! Particle simulation x(t) Y(t)= Position in phase space ! v(t) " v(t) Y˙ (t)= Velocity in phase space ! f(t)/m " Rigid body concepts Translation Rotation Position Orientation Linear velocity Angular velocity Mass Inertia tensor Linear momentum Angular momentum Force Torque • Position and orientation • Linear and angular velocity • Mass and Inertia • Force and torques • Simulation Position and orientation Translation of the body x x(t)= y z Rotation of the body rxx ryx rzx R(t)= rxy ryy rzy rxz ryz rzz x(t) and R ( t ) are called spatial variables of a rigid body Body space Body space A fixed and unchanged space where the shape of a rigid body y0 is defined r0i The geometric center of the x0 rigid body lies at the origin of the body space z0 Position and orientation Body space World space y0 r0i y0 R(t) r0i z0 x0 y x t x0 ( ) z 0 z x Position and orientation World space Use x(t) and R(t) to transform the body space into world space y0 R(t) r0i What’s the world coordinate of an arbitrary point r0i on the body? z0 x0 y x(t) ri(t)=x(t)+R(t)r0i z x Position and orientation • Assume the rigid body has uniform density, what is the physical meaning of x(t)? • center of mass over time • What is the physical meaning of R(t)? • it’s a bit tricky Position and orientation Consider the x-axis in body space, (1, 0, 0), what is the direction of this vector in world space at time t? 1 rxx R(t) 0 = rxy 0 rxz which is the first column of R(t) R(t) represents the directions of x, y, and z axes of the body space in world space at time t Position and orientation • So x(t) and R(t) define the position and the orientation of the body at time t • Next we need to define how the position and orientation change over time • Position and orientation • Linear and angular velocity • Mass and Inertia • Force and torques • Simulation Linear velocity Since x ( t ) is the position of the center of mass in world space, x˙ ( t ) is the velocity of the center of mass in world space v(t)=x˙ (t) Angular velocity • If we freeze the position of the COM in space • then any movement is due to the body spinning about some axis that passes through the COM • Otherwise, the COM would itself be moving Angular velocity We describe that spin as a vector ω(t) Direction of ω ( t ) ? Magnitude of | ω ( t ) | ? d v t x t Linear position and velocity are related by ( )=dt ( ) How are angular position (orientation) and velocity related? Angular velocity How are R ( t ) and ω ( t ) related? Hint: Consider a vector c ( t ) at time t specified in world space, how do we represent c˙ ( t ) in terms of ω(t) ω(t) |c˙(t)| = |b||ω(t)| = |ω(t) × b| b c˙ c˙(t)=ω(t) × b = ω(t) × b + ω(t) × a a c c˙(t)=ω(t) × c(t) Angular velocity Given the physical meaning of R ( t ) , what does each column of R ˙ ( t ) mean? At time t, the direction of x-axis of the rigid body in world space is the first column of R(t) rxx rxy rxz At time t, what is the derivative of the first column R t of ( ) ? ˙ rxx rxx r = !(t) r 2 xy 3 ⇥ 2 xy 3 rxz rxz 4 5 4 5 Angular velocity rxx ryx rzx R˙ (t)= ω(t) × rxy ω(t) × ryy ω(t) × rzy rxz ryz rzz This is the relation between angular velocity and the orientation, but it is too cumbersome We can use a trick to simplify this expression Angular velocity Consider two 3 by 1 vectors: a and b, the cross product of them is aybz − byaz a × b = −axbz + bxaz axby − bxay Given a, let’s define a* to be a skew symmetric matrix 0 −az ay az 0 −ax −ay ax 0 0 −az ay bx ∗ then a b = az 0 −ax by = a × b −ay ax 0 bz Angular velocity rxxrxx ryxryx rzx rzx ∗ ∗ ∗ R˙ (t)= ω(t) × rxyrxy ωω(t()t) × ryyryy ω(tω)(t) ×rzy rzy rxzrxz ryzryz rzz rzz ∗ = ω(t) R(t) Vector relation: c˙(t)=ω(t) × c(t) ∗ Matrix relation: R˙ = ω(t) R(t) Perspective of particles • Imagine a rigid body is composed of a large number of small particles • the particles are indexed from 1 to N • each particle has a constant location r0i in body space • the location of i-th particle in world space at time t is ri(t)=x(t)+R(t)r0i Velocity of a particle d r t r t ω∗R t r v t ˙( )=dt ( )= ( ) 0i + ( ) ∗ = ω (R(t)r0i + x(t) − x(t)) + v(t) ∗ = ω (ri(t) − x(t)) + v(t) r˙ i(t)=ω × (ri(t) − x(t)) + v(t) angular component linear component Velocity of a particle r˙ i(t)=ω × (ri(t) − x(t)) + v(t) y0 ω(t) ω(t) × (ri(t) − x(t)) ri (t) v t x(t) ( ) r˙ i(t) y x z0 v(t) 0 z x • Position and orientation • Linear and angular velocity • Mass and Inertia • Force and torques • Simulation Mass The mass of the i-th particle is mi N Mass M = ! mi i=1 ! miri(t) Center of mass in world space M What about center of mass in body space? (0, 0, 0) Center of mass Proof that the center of mass at time t in word space is x(t) ! miri(t) M = = x(t) Inertia tensor Inertia tensor describes how the mass of a rigid body is distributed relative to the center of mass 02 02 mi(riy + riz) mirix0 riy0 mirix0 riz0 − 02 02 − I = 2 miriy0 rix0 mi(rix + riz) miriy0 riz0 3 − − 02 02 i mir0 r0 mir0 r0 mi(r + r ) X 6 − iz ix − iz iy ix iy 7 4 5 ! ri = ri(t) − x(t) I(t) depends on the orientation of a body, but not the translation For an actual implementation, we replace the finite sum with the integrals over a body’s volume in world space Inertia tensor • Inertia tensors vary in world space over time • But are constant in the body space • Pre-compute the integral part in the body space to save time Inertia tensor Pre-compute Ibody that does not vary over time 2 100 mirix0 mirix0 riy0 mirix0 riz0 T 2 I(t)= m r0 r0 010 mir0 r0 mir0 mir0 r0 i i i 2 3 2 iy ix iy iy iz 3 001 − m r r m r r m r 2 X i iz0 ix0 i iz0 iy0 i iz0 4 5 4 5 I r!T r! 1 − r! r!T (t)=! mi( i i) i i ) T T = ! mi((R(t)r0i) (R(t)r0i)1 − (R(t)r0i)(R(t)r0i) ) T T − T T = ! mi(R(t)(r0ir0i)R(t) 1 R(t)r0ir0iR(t) ) T T T = R(t) mi((r r0i)1 − r0ir ) R(t) !" 0i 0i # I t R t I R t T I m rT r 1 − r rT ( )= ( ) body ( ) body = ! i(( 0i 0i) 0i 0i) i Inertia tensor Pre-compute Ibody that does not vary over time 2 100 mirix0 mirix0 riy0 mirix0 riz0 T 2 I(t)= m r0 r0 010 mir0 r0 mir0 mir0 r0 i i i 2 3 2 iy ix iy iy iz 3 001 − m r r m r r m r 2 X i iz0 ix0 i iz0 iy0 i iz0 4 5 4 5 I r!T r! 1 − r! r!T (t)=! mi( i i) i i ) T T = ! mi((R(t)r0i) (R(t)r0i)1 − (R(t)r0i)(R(t)r0i) ) T T − T T = ! mi(R(t)(r0ir0i)R(t) 1 R(t)r0ir0iR(t) ) T T T = R(t) mi((r r0i)1 − r0ir ) R(t) !" 0i 0i # I t R t I R t T I m rT r 1 − r rT ( )= ( ) body ( ) body = ! i(( 0i 0i) 0i 0i) i Approximate inertia tensor • Bounding boxes • Pros: simple • Cons: inaccurate Approximate inertia tensor • Point sampling • Pros: simple, fairly accurate • Cons: expensive, requires volume test Approximate inertia tensor • Green’s theorem F · ds = (∇×F) · da !∂D !!D • Pros: simple, exact • Cons: require boundary representation • Position and orientation • Linear and angular velocity • Mass and Inertia • Force and torques • Simulation Force and torque Fi(t) denotes the total force from external forces acting on the i-th particle at time t y 0 τ(t)=(ri(t) − x(t)) × Fi(t) F(t)=! Fi(t) ri (t) i x(t) Fi(t) τ(t)= (ri(t) − x(t)) × Fi(t) ! z0 x0 i y z x Force and torque •F(t) conveys no information about where the various forces acted on the body •!(t) contains the information about the distribution of the forces over the body •Which one depends on the location of the particle relative to the center of mass? Linear momentum P(t)=! mir˙i(t) i = ! miv(t)+ω(t) × ! mi(ri(t) − x(t)) i i = Mv(t) Total linear moment of the rigid body is the same as if the body was simply a particle with mass M and velocity v(t) Angular momentum Similar to linear momentum, angular momentum is defined as L(t)=I(t)ω(t) Does L(t) depend on the translational effect x(t)? Does L(t) depend on the rotational effect R(t)? What about P(t)? Derivative of momentum Change in linear momentum is equivalent to the total forces acting on the rigid body P˙ (t)=Mv˙ (t)=F(t) The relation between angular momentum and the total torque is analogous to the linear case L˙ (t)=τ(t) Derivative of momentum L˙ r! × F Proof (t)=τ(t)=! i i !∗ !∗ mir¨i − Fi = mi(v˙ − r˙ i ω − ri ω˙ ) − Fi = 0 !∗ − !∗ − !∗ − !∗ ! ri mi(v˙ r˙ i ω ri ω˙ ) ! ri Fi = 0 !∗ !∗ !∗ !∗ − mir r˙ ω − mir r ω˙ = τ !" i i # !" i i # − r!∗r!∗ r!T r! 1 − r! r!T I ! mi i i = ! mi(( i i) i i )= (t) !∗ !∗ − mir r˙ ω + I(t)˙ω = τ !" i i # d I˙ t −m r!∗r!∗ −m r!∗r!∗ − m r!∗r!∗ ( )=dt ! i i i = ! i i ˙ i i ˙ i i d I˙ t ω I t ω I t ω L˙ t τ ( ) + ( )˙ = dt( ( ) )= ( )= • Position and orientation • Linear and angular velocity • Mass and Inertia • Force and torques • Simulation Equation of motion x(t) position v(t) ∗ R(t) orientation d ω(t) R(t) Y(t)= Y(t)= P(t) linear momentum dt F(t) L(t) angular momentum τ(t) Constants: M and Ibody P t v t ( ) ( )= M T I(t)=R(t)IbodyR(t) −1 ω(t)=I(t) L(t) Momentum vs.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    57 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us