MAE 4 Homework # SOLUTIONS Due Friday, January 3, 9. Mass Properties (pts) (a) Find the principle moments of inertia for each body. The inertia tensor is: J xx J xy J xz J = J xy J yy J yz J xz J yz J zz The principle moments of inertia are the eigenvalues of the inertia tensor. In Matlab: [eigenvectors,eigenvalues]=eig(j) For Body, J =, J =, and J 3 =. For Body, J =, J =, and J 3 =. The ordering of inertias is addressed below. (b) Find the principle axes for each body. The principle axes are the eigenvectors of the inertia tensor. For Body :.5475.5843.599 p =.5898, p =.7773, p 3 =.9.5936.334.77 For Body :.77 p =.47, p =.4794.388.959, p 3 =.668.6379.58.5789 The ordering of the principle axes is determined by which one is closest to each geometric axis via the dot product. For example, take the first eigenvector of Body : acos(dot(eigenvectors(:,),[ ] )) =.994 acos(dot(eigenvectors(:,),[ ] )) =.6 acos(dot(eigenvectors(:,),[ ] )) =.63 As the angle between the first eigenvector and the geometric x axis is the smallest, it is obvious that the first eigenvector is the p axis of the set of principle axes. The same idea can be applied to the remaining eigenvectors.
(c) Are there any special properties about each body? Yes, both bodies are axi-symmetrical and oblate. (d) In the presence of energy dissipation, which (if either) body would be stable and about which principle axes? Body would be stable spinning about ±p 3 and Body would be stable spinning about ±p.
. Kinematics (4pts) (a) Derive the three fundamental rotation matrices. i. The basis vectors of the inertial frame in the inertial frame coordinates are: â =, â =, â 3 = The basis vectors of the rotated frame in the inertial frame coordinates are: ˆb =, ˆb = cos θ, ˆb 3 = cos ( ) θ + π sin θ sin ( ) θ + π Recall the definition of a dot product is: v v = v v cos θ The definition of the DCM is the dot products of the two sets of basis vectors: ˆb â ˆb â ˆb â 3 C (θ ) = ˆb â ˆb â ˆb â 3 ˆb3 â ˆb3 â ˆb3 â 3 Carrying out the multiplications and trig identities: C (θ ) = cos θ sin θ sin θ cos θ ii. iii. (b) Show: cos θ sin θ C (θ ) = sin θ cos θ C 3 (θ 3 ) = cos θ 3 sin θ 3 sin θ 3 cos θ 3 Ω = ċ c 3 + ċ c 3 + ċ 3 c 33 Ω = ċ 3 c + ċ 3 c + ċ 33 c 3 Ω 3 = ċ c + ċ c + ċ 3 c 3 3
The kinematic differential equation can be manipulated to isolate the skewsymmetric angular velocity matrix: (Ċb/a Ċ b/a = Ω C b/a ) T ( = Ω C b/a) T ( ) = C b/a T ( ) Ω T ( ) = C b/a T Ω ( (C b/a ) T ) (Ċb/a ) T = Ω ) T b/a C (Ċb/a = Ω Ω 3 Ω Ω 3 Ω = Ω Ω c ċ + c ċ + c 3 ċ 3 c ċ + c ċ + c 3 ċ 3 c ċ 3 + c ċ 3 + c 3 ċ 33 c ċ + c ċ + c 3 ċ 3 c ċ + c ċ + c 3 ċ 3 c ċ 3 + c ċ 3 + c 3 ċ 33 c 3 ċ + c 3 ċ + c 33 ċ 3 c 3 ċ + c 3 ċ + c 33 ċ 3 c 3 ċ 3 + c 3 ċ 3 + c 33 ċ 33 This is now a system of 9 equations, where only 3 of them are independent (because of the orthonormal nature of the DCM). Therefore, it is obvious that: Ω = ċ c 3 + ċ c 3 + ċ 3 c 33 Ω = ċ 3 c + ċ 3 c + ċ 33 c 3 Ω 3 = ċ c + ċ c + ċ 3 c 3 (c) To construct the DCM from an Euler 3-- rotation sequence, recall that successive rotations are dependent on order of rotation: C b/a = C (θ ) C (θ )C 3 (θ 3 ) Using this and the kinematical relationship above, find the angular rate vector (Ω) as a function ( of the 3-- sequence Euler angles (θ,θ,θ 3 ) and angular velocities θ, θ, θ ) 3. The DCM is: C b/a = C (θ ) C (θ )C 3 (θ 3 ) = cos θ cos θ 3 cos θ sin θ 3 sin θ sin θ sin θ cos θ 3 cos θ sin θ 3 sin θ sin θ sin θ 3 + cos θ cos θ 3 sin θ cos θ cos θ sin θ cos θ 3 + sinθ sin θ 3 cos θ sin θ sin θ 3 sin θ cos θ 3 cos θ cos θ 4
Taking the time derivative of the DCM, we get: ċ = θ sin θ cos θ 3 θ 3 cos θ sin θ 3 ċ = θ sin θ sin θ 3 + θ 3 cos θ cos θ 3 ċ 3 = θ cos θ ċ = θ (cos θ sin θ cosθ 3 + sin θ sin θ 3 ) + θ sin θ cos θ cos θ 3 + θ 3 ( sin θ sin θ sin θ 3 cos θ cos θ 3 ) ċ = θ (cos θ sin θ sin θ 3 sin θ cos θ 3 ) + θ sin θ cosθ sin θ 3 + θ 3 (sin θ sin θ cosθ 3 cos θ sin θ 3 ) ċ 3 = θ cos θ cos θ θ sin θ sin θ ċ 3 = θ ( sin θ sin θ cosθ 3 + cos θ sin θ 3 ) + θ cos θ cos θ cos θ 3 + θ 3 ( cos θ sin θ sin θ 3 + sinθ cosθ 3 ) ċ 3 = θ ( sin θ sin θ sin θ 3 cos θ cosθ 3 ) + θ cos θ cosθ sin θ 3 + θ 3 (cosθ sin θ cos θ 3 + sinθ sin θ 3 ) ċ 3 = θ sin θ cos θ θ cos θ sin θ Plugging it all together: Ω ċ c 3 + ċ c 3 + ċ 3 c 33 sin θ Ω = ċ 3 c + ċ 3 c + ċ 33 c 3 = cos θ sin θ cosθ Ω 3 ċ c + ċ c + ċ 3 c 3 sin θ cos θ cos θ θ θ θ 3 5
3. Kinetics (4pts) (a) Derive the equations of motion. Recall that in the Lagrangian formulation of the equations of motion, the equation for each generalized coordinate q i is: d dt ( ) L q i L q i + F q i = Q i where L = T U and the Rayleigh dissipation function would be F = C d φ in this case if φ is the angle of the damper body relative to the main body. There are no generalized forces, therefore: Q i =, i. The kinetic energy T, was given: Compute L ( ) d dt L φ T = ΩT J J J 3 Ω + J d Ω + L, θ θ L, θ L, 3 φ, L L L L θ, θ, θ 3,, d φ dt, and F φ ( T Ω + ) L θ d, dt ( φ ) L θ d, dt ( ) L θ, 3 φ using your favorite symbolic solver (Matlab script attached below). From the above, the equations of motion can now be written. θ equation (J + J d ) θ + ( J sin θ J d sin θ ) θ 3 + J d φ θ J cosθ θ 3 J d cos θ θ 3 θ + J sin θ θ cos θ + J θ cos θ θ 3 J cos θ cos θ θ 3 θ J cosθ cos θ θ 3 sin θ J 3 sin θ θ cos θ +J 3 cos θ cos θ θ 3 θ J 3 θ cos θ θ 3 + J 3 cos θ cos θ θ 3 sin θ = θ equation ( cos θ J + sin θ J 3 ) θ + (cosθ J sin θ cos θ sin θ J 3 cos θ cos θ ) θ 3 J cos θ θ 3 sin θ + J cos θ θ 3 θ J d cos θ θ 3 sin θ +J d cos θ θ 3 θ + J d cos θ θ 3 φ θ sin θ J cos θ θ θ sin θ J cos θ θ 3 + θ cos θ J cos θ θ 3 + θ cos θ J 3 sin θ θ θ cos θ J 3 cos θ θ 3 + θ sin θ J 3 cos θ θ 3 + sinθ sin θ θ 3 J cos θ + cosθ sin θ θ 3 J3 cos θ = 6
θ 3 equation φ equation ( J sin θ J d sin θ ) θ + (cosθ J sin θ cosθ sin θ J 3 cos θ cos θ ) θ + ( ) sin θj + sin θ cos θj + cosθ cos θj 3 + sinθj d θ3 + ( J d sin θ ) φ + θ cosθ cos θ J θ + θ cos θ cos θj sin θ θ 3 θ sin θ cosθ J θ + θ sin θ cos θ J 3 θ θ sin θ cos θ J 3 cos θ θ 3 θ cos θ cos θ J 3 θ θ cos θ J θ + θ sin θ J cos θ θ 3 sin θ sin θ J cos θ θ θ sin θ cos θ J sin θ θ 3 + cos θ sin θ J 3 sin θ θ θ cos θ cos θ J 3 sin θ θ 3 θ cos θ J d θ + θ sin θ J d cosθ θ 3 θ cos θ J d φ = J d θ + ( J d sin θ ) θ 3 + J d φ Jd cosθ θ 3 θ + C d φ = (b) Simulate the equations of motion and discuss. The Matlab code for simulating the bodies is attached below. As Body starts out spinning about its major axis p, the energy dissipation from the viscous damper body causes the transverse angular rates to null and the body to spin purely about the major axis (the nutation angle goes to zero). This is easier to see if one looks at the angular rates Ω about the principle axes (also attached below) instead of just the Euler angular rates θ, θ, and θ 3. As Body starts out spinning about its minor/intermediate axis (because of the symmetry), it starts out in a flat spin. If the simulation were to continue to run and the Euler angles never became singular (a.k.a. gimbal lock), Body would settle to a pure spin about its major axis p 3. 7
. Body Euler Angles θ [rad]. 3 4 5 6 7 8 9. θ [rad]. 3 4 5 6 7 8 9 5 θ 3 [rad] 5 3 4 5 6 7 8 9.4 φ [rad]. 3 4 5 6 7 8 9 8
dφ/dt [rad/s] dθ /dt [rad/s] dθ /dt [rad/s] dθ /dt [rad/s] 3.5 Body Euler Angular Velocities.5 3 4 5 6 7 8 9.5.5 3 4 5 6 7 8 9..98 3 4 5 6 7 8 9.5.5 3 4 5 6 7 8 9 Time [sec] 9
.4 Body Angular Velocities about Principle Axes. Ω..4 3 4 5 6 7 8 9.4. Ω..4 3 4 5 6 7 8 9. Ω 3. 3 4 5 6 7 8 9
5 Body Euler Angles θ [rad] 5 3 4 5 6 7 8 9.5 θ [rad].5 3 4 5 6 7 8 9 5 θ 3 [rad] 5 3 4 5 6 7 8 9. φ [rad].5 3 4 5 6 7 8 9
dθ /dt [rad/s] dθ /dt [rad/s] dθ 3 /dt [rad/s] Body Euler Angular Velocities 3 4 5 6 7 8 9 3 4 5 6 7 8 9.5.5 3 4 5 6 7 8 9. dφ/dt [rad/s]. 3 4 5 6 7 8 9 Time [sec]
.5 Body Angular Velocities about Principle Axes. Ω.5. 3 4 5 6 7 8 9 Ω 3 4 5 6 7 8 9 Ω 3 3 4 5 6 7 8 9 3
Symbolic Derivation of Equations of Motion in Matlab close all; clear all; syms t t t3 p dt dt dt3 dp w Jx Jy Jz Jd Cd T V F L real t=theta, t=theta, t3=theta3, p=phi dt=dtheta/dt, dt=dtheta/dt, dt3=dtheta3/dt, dp=dphi/dt w=[ -sin(t); cos(t) sin(t)*cos(t); -sin(t) cos(t)*cos(t)]*[dt dt dt3] ; wd=[dp ] ; T=.5*w *[Jx ; Jy ; Jz]*w+.5*(w+wd) *diag([jd ])*(w+wd); U=; F=.5*Cd*dp^; L=T-U; eqn=fulldiff(diff(l,dt),{t,t,t3,dt,dt,dt3,dp})-diff(l,t)+diff(f,dt); eqn=fulldiff(diff(l,dt),{t,t,t3,dt,dt,dt3,dp})-diff(l,t)+diff(f,dt); eqn3=fulldiff(diff(l,dt3),{t,t,t3,dt,dt,dt3,dp})-diff(l,t3)+diff(f,dt3); eqn4=fulldiff(diff(l,dp),{t,t,t3,dt,dt,dt3,dp})-diff(l,p)+diff(f,dp); [E,HOW]=simple(eqn); [E,HOW]=simple(eqn); [E3,HOW]=simple(eqn3); [E4,HOW]=simple(eqn4); E, E, E3, E4, 4
Main Function for Simulation close all; clear all; global J Jinv Jx Jy Jz Jd Cd bodyname= Body ; Jx=; Jy=; Jz=; bodyname= Body ; Jx=; Jy=; Jz=; J=diag([Jx Jy Jz]); Jinv=inv(J); Jd=; Cd=; T=:.:; X=[...] ; [T,Y]=ode45( eom_rigid_euler_lagrange,t,x); figure() subplot(4,,) plot(t,y(:,)),grid on; title(strcat(bodyname, Euler Angles )); ylabel( theta [rad] ); subplot(4,,) plot(t,y(:,)),grid on; ylabel( theta [rad] ); subplot(4,,3) plot(t,y(:,3)),grid on; ylabel( theta 3 [rad] ); subplot(4,,4) plot(t,y(:,4)),grid on; ylabel( phi [rad] ); figure(gcf+) subplot(4,,) plot(t,y(:,5)),grid on; ylabel( d theta /dt [rad/s] ); title(strcat(bodyname, Euler Angular Velocities )); subplot(4,,) plot(t,y(:,6)),grid on; ylabel( d theta /dt [rad/s] ); subplot(4,,3) plot(t,y(:,7)),grid on; ylabel( d theta 3/dt [rad/s] ); subplot(4,,4) plot(t,y(:,8)),grid on; ylabel( d phi/dt [rad/s] ); xlabel( Time [sec] ); 5
Equations of Motion Function: function [Xdot]=eom_rigid_euler_lagrange(t,X) global J Jinv Jx Jy Jz Jd Cd t=x(,); t=x(,); t3=x(3,); tr=x(4,); dt=x(5,); dt=x(6,); dt3=x(7,); dt=x(8,); ct=cos(t); ct=cos(t); st=sin(t); st=sin(t); M(,)=Jx+Jd; M(,)=; M(,3)=-Jx*st-Jd*st; M(,4)=Jd; M(,)=; M(,)=ct^*Jy+st^*Jz; M(,3)=ct*Jy*st*ct-st*Jz*ct*ct; M(,4)=; M(3,)=-Jx*st-Jd*st; M(3,)=ct*Jy*st*ct-st*Jz*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