A.3.6 User’s Guide for Spin Stabilization Codes 1 A.3.6: User’s Guide for Spin Stabilization Codes A.3.6.1 User’s Guide for Spin_Rate.m Written by Albert Chaney Revision by Jeffrey Stuart – 2/27/2008, 3/1/2008, 3/21/2008 Description: This code calculates the needed spin rate based on an acceptable velocity pointing error that has been pre-determined. It outputs plots of the angular momentum vector in inertial space. It uses a body fixed 3-1-2 Euler angle sequence to convert to inertial space. It numerically integrates the EOMs using the MATLAB function ode45. The EOMs are calculated in the function Spin_Rate_EOMs.m which is called in the ode45 function. Assumptions: It is assumed that there is only one moment on the vehicle during the thrusting due to a predetermined offset in the thrust. Also assumed is that there is constant thrust and that the inertia matrices are calculated using a distributed mass model. Important Notes: For this code to work Spin_Rate_EOMs.m needs to be in the same directory. Input Section: The variables below are what one would change between cases. Then one would simply save and run Spin_Rate.m. Author: Albert Chaney A.3.6 User’s Guide for Spin Stabilization Codes Variable Name r L_tot tburn T rpm m0 mdot off cm0 cmf I10, I20, I30 I1f, I2f, I3f 2 Description Radius of the stage [m] Length of stage [m] Burn time of the stage [sec] Thrust of the stage [N] Spin rate of the stage [rpm] Initial mass of the stage [kg] Mass flow rate of the stage [kg/s] Offset of the thrust [rad] Initial location of center of mass from the forward point of stage [m] Final location of center of mass from the forward point of stage [m] Initial values for moments of inertia along the principle axes 1,2, and 3 [kg*m2] Final values for moments of inertia along the principle axes 1,2, and 3 [kg*m2] Output: The output of this program is four plots. Below is an example case using the following inputs: Variable Name r L_tot tburn T rpm m0 mdot off cm0 cmf I10, I20, I30 I1f, I2f, I3f Value 0.13605 [m] 0.9874 [m] 191.9 [sec] 625.0 [N] 180 [rpm] 60.4611 [kg] 0.194 [kg/s] 0.5871 [deg] 0.6313 [m] 0.7136 [m] 19.2267, 19.2267, 0.4378 [kg*m2] 4.8343, 4.8343, 0.1041 [kg*m2] Author: Albert Chaney A.3.6 User’s Guide for Spin Stabilization Codes 3 Angular Momentum Error Total Burn 1.6 1.4 Hy/Hz (deg) 1.2 1 0.8 0.6 0.4 0.2 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 Hx/Hz (deg) 0.4 0.6 0.8 1 Fig. A.3.6.1.1: Angular Momentum for the total burn Figure A.3.6.1.1 is the first figure formed by this code. It shows the angular momentum vector for the total burn. Plotted is the inertial y-component versus the inertial x-component. The distance the center of the circle is from the origin is the pointing error for the burn. Ang. Mom. Beginning 1.6 1.4 Hy/Hz (deg) 1.2 1 0.8 0.6 0.4 0.2 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 Hx/Hz (deg) 0.4 0.6 0.8 1 Fig. A.3.6.1.2: Angular Momentum for the beginning of the burn Figure A.3.6.1.2 is the second figure formed by this code. It displays angular momentum vector for the beginning of the burn. Author: Albert Chaney A.3.6 User’s Guide for Spin Stabilization Codes 4 Ang. Mom. End 0.9 0.8 0.7 Hy/Hz (deg) 0.6 0.5 0.4 0.3 0.2 0.1 0 -0.4 -0.2 0 Hx/Hz (deg) 0.2 0.4 0.6 Fig. A.3.6.1.3: Angular Momentum for the end of the burn Figure A.3.6.1.3 is the third figure formed by this code. It displays angular momentum vector for the end of the burn. This figure is the most useful as it is simple to see the distance from the center of the circle to the origin. Change in Velocity Error Total Burn 1 0.9 0.8 vY/vZ (deg) 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 -0.2 0 0.2 0.4 vX/vZ (deg) 0.6 0.8 Fig. A.3.6.1.4: Change in velocity error for the entire burn Figure A.3.6.1.4 is the fourth and final figure formed by this code. It shows the change in the velocity error for the entire burn. Author: Albert Chaney A.3.6 User’s Guide for Spin Stabilization Codes 5 A.3.6.2: User’s Guide for AAE450_DNC_spin_offset.m Written by Jeffrey Stuart Description: This code calculates the values associated with spinning up the third stage of the launch vehicle. It numerically integrates EOMs using MATLAB’s ode45 function which calls AAE450_DNC_spin_eom. Assumptions: It is assumed that there is an offset in the thrust of the motors that spin up the third stage which causes a disturbance, and there is no active control in the third stage. Important Notes: For this code to work AAE450_DNC_spin_eom.m needs to be in the same directory. Input Section: The variables below are what one would change between cases. Then one would simply save and run AAE450_DNC_spin_offset.m. Variable Name R tb S P cm0 I10, I20, I30 Description Radius of the stage [m] Burn time of the spin up motor [m] Spin moment [N*m] Offset spin moment [N*m] Center of mass of the stage from forward point [m] Initial values for moments of inertia along the principle axes 1,2, and 3 [kg*m2] Output: Author: Albert Chaney A.3.6 User’s Guide for Spin Stabilization Codes 6 The output of this program is two figures. Below is an example case using the following inputs: Variable Name Description 0.1375 [m] 5 [m] 2.15 [N*m] 0.0215 [N*m] 0.6141 [m] 20.1985, 20.1985, 0.4608 [kg*m2] R tb S P cm0 Omega 3 300 Burn 200 rpm 200 100 Angular Velocity, rad/sec Angular Velocity, rpm I10, I20, I30 0 0 0.5 1 1.5 2 -3 1 2.5 3 3.5 4 4.5 5 3 3.5 4 4.5 5 3 3.5 4 4.5 5 Omega 1 x 10 0 -1 0 0.5 1 1.5 2 -3 1 2.5 Omega 2 x 10 0 -1 0 0.5 1 1.5 2 2.5 Time, sec Fig. 3.6.2.1: Angular velocities for the entire spin up maneuver Figure 3.6.2.1 shows the angular velocities for the entire spin up maneuver. Author: Albert Chaney A.3.6 User’s Guide for Spin Stabilization Codes 7 0.3 0.25 Hy/Hz (deg) 0.2 0.15 0.1 0.05 0 -0.05 -0.3 -0.2 -0.1 0 0.1 0.2 Hx/Hz (deg) 0.3 0.4 0.5 0.6 Fig. 3.6.2.2: Angular momentum vector for the spin up maneuver Figure 3.6.2.2 shows the angular momentum vector for the spin up maneuver. Author: Albert Chaney