Quick viewing(Text Mode)

1 Force Models 2 Kinematics

1 Force Models 2 Kinematics

STANFORD UNIVERSITY CS277 - Summary Department of Dr. Adam Leeper, Spring 2014

This sheet summarizes some useful formulas for dynamics. For simplicity of notation, all , , angular velocities, and angular accelerations are assumed to be with respect to (measured in) the world Newtonian frame, N. Note “with respect to” is not the same as “expressed in”. The first has to do with actual physical and the reference frame of the observer; the second has to do with the choice of variables and unit vectors.

Our notation assumes an arbitrary frame F has an origin Fo and orthonormal unit vectors bfx, bfy, bfz fixed in it. 1 Models 1.1 Translational Spring-Damper For points Q and P connected by a translational spring-damper, the force on Q from P is given by: ~ Q/P Q/P Q/P Spring: Fspring = −k(L − Ln) ∗ ub , where L = ~r and Ln is the spring’s natural length. ~ Q/P ˙ Q/P ˙ Q/P Q/P Damper: Fdamper = −bL ∗ ub , where L =~v · ub . Q/P 1 Q/P Note: The the unit-vector pointing to Q from P is ub = L (~r ). Hint: Instead of L, use L +  to avoid divide-by-zero issues. 1.2 Air B ~ air Bcm Translational air resistance on body B is often modeled as Fair = −bair,1 ∗ ~v . ~ B air B Rotational air resistance on body B is often modeled as Tair = −bair,2 ∗ ~ωωωωωωωω . 1.3 The effect of gravity is often modeled as a single force acting at the center-of- of a body (or particle): ~ B Fg = mg ∗ (unit-vector pointing “down”).

2 Kinematics 2.1

Represent the vector from No to particle/body center Bcm using measures along basis vectors nbx, nby, nbz: Bcm/No ~r = x nbx + y nby + z nbz vector to Bcm from No. Bcm ~v =x ˙ nbx +y ˙ nby +z ˙ nbz of Bcm (expressed in nbxyz). Bcm ~a =x ¨ nbx +y ¨ nby +z ¨ nbz of Bcm (expressed in nbxyz). For the case, the position and velocity of the attachment point Q on the edge of the sphere is:  x   0  Q/No Bcm/No Q/Bcm n b ~r =~r +~r = x nbx + y nby + z nbz + r bz =  y  + R ∗  0  z r nbxyz bxyz         x˙ ωx 0 ~ Q ~ Bcm ~ωωωωωωωωB ~ Q/Bcm  n b  v = v + ωωωωω × r =  y˙  +  ωy  ×  R ∗  0   z˙ ωz r nbxyz nbxyz bxyz

2.2 Particles have no orientation, so there is no need to do any rotational or kinematics.   ωx B For a rigid body, represent the of body B as: ~ωωωωωωωω = ωx nbx + ωy nby + ωz nbz =  ωy  ωz nbxyz

1 3

3.1 Translation Newton’s 2nd Law relates forces on a body B (or particle Q) to the acceleration of the body’s :

B Q ~F = mB ∗~aBcm ~F = mQ ∗~aQ

3.2 Rotation Euler’s 3D rigid body equation relates the resultant on body B to its . (Without diving into the subtleties, in this case we can treat moments and as the same thing.)

B/Bcm B/Bcm B/B ⇒ ⇒ M~ cm = I · ~ααααααααB + ~ωωωωωωωωB × (I · ~ωωωωωωωωB)

In the very special case when the matrix of a body can be written in terms of a scalar I the identity matrix (e.g. for a sphere or box), the full form of Euler’s 3D rigid body equation collapses to:

B/Bcm B/Bcm 2 M~ = I ∗~ααααααααB M~ = mr2 ∗~ααααααααB (for a sphere) 5

Q ~F /B Q cm Q/Bcm Note the moment about Bcm due to a force applied at point Q is: M~ =~r × ~F .

4 Numerical Integration

A simple (but poor-performing) integration scheme is explicit forward-Euler.

4.1 Translation ~vBcm [k + 1] = ~vBcm [k] +~aBcm [k] ∗ ∆t ~r Bcm/No [k + 1] = ~r Bcm/No [k] +~vBcm [k] ∗ ∆t

4.2 Rotation ~ωωωωωωωωB[k + 1] = ~ωωωωωωωωB[k] +~ααααααααB[k] ∗ ∆t There are multiple ways to go from angular velocity to an orientation representation: • If you use a q = [w x y z], you can do: 1 q[k + 1] = q[k] + ∆t ∗ ( ∗ H ∗~ωωωωωωωωB[k]) 2 where  −x −y −z   w −z y  H =    z w −x  −y x w

After each step, you should normalize the quaternion by dividing by its magnitude pw2 + x2 + y2 + z2.

• You can use your [ωx ωy ωz]∗∆t as an axis-angle representation, convert to a , and multiply by your previous rotation: n b n b R [k + 1] = Raxis−angle[k] ∗ R [k]

2