A Thesis
Presented to the Faculty of
California Polytechnic State University
In Partial Fulfillment
of the Requirements for the Degree
Master of Science in Aerospace Engineering
by
Noriko Takada
August 2003
2003
Noriko Takada
ALL RIGHTS RESERVED
Title: Development of an Attitude Dynamics Simulation Applet
Author: Noriko Takada
Date Submitted: August 2003
ABSTRACT
By Noriko Takada
This paper presents the development of a webbased application written in Java, or an applet, for simulating attitude dynamics of a spacecraft. The project was a continuation of a previous work done by Daniel L. Quock in 2000. Previously available scenarios included constant torque, gravity gradient, and reactionwheel control simulation of a rigid spacecraft. The challenges left by the previous work included adding more scenarios, such as adding damping components, incorporating flexibility, and deploying the applet on the world wide web for public use, which the project presented in this paper has achieved. In addition, the applet was integrated into the Java Astrodynamics Toolkit (JAT) project, which is a comprehensive collection of classes for an astrodynamics researcher. The spacecraft attitude dynamics applet developed in this project was constructed by the classes available from JAT, while at the same time this thesis project has contributed to the JAT project.
ACKNOWLEDGEMENTS
I would like to express my gratitude to my thesis advisor, Dr. Jordi PuigSuari for his support and guidance. Especially the derivation of the flexiblespacecraft equations of motion could not have been done without his insight. I would like to thank him also for helping me finishing up the project during the last several weeks and for checking and correcting my thesis draft and making suggestions for the format.
My thanks also go to Daniel L. Quock, who preceded this project and developed the first attitude simulation applet, for his help and encouragement. He was kind enough to let me study and modify his code and use it for the applet developed in this project.
This project would not have been the same if I did not participate in the Java Astrodynamics Toolkit (JAT) project. The applet developed in this project uses numerical integration routine and plotting interface available from JAT, which has enhanced the overall feature of the applet. I would like to thank the project administrators David Gaylor and Tobias Berthold for letting me join the project and giving me suggestions for my work.
Last, but not least, I would like to thank my parents for supporting me for a full six years of my education and making this whole thing possible in the first place, and many thanks to my friends and classmates whose encouragement I really appreciate.
TABLE OF CONTENTS
1.1 Objective of the Project 1
1.3 Overview of Rigid Body Dynamics 3
1.3.2 Angular Momentum & Rotational Kinetic Energy 4
2.3 Java Astrodyamics Toolkit (JAT) 10
2.3.2 Opensource software development 10
2.3.3 Concurrent Versions System (CVS) and Sourceforge.net 11
2.3.4 Tools used to develop JAT 11
2.4 Development of jat.attitude package 15
2.5 Development of Attitude Simulation Applet 16
3 Developed Scenarios for a Rigid Spacecraft 24
3.1 Constant, BodyFixed Torques 24
3.2 Gravity Gradient in a Circular Orbit 28
3.3 Gravity Gradient in an Eccentric Orbit 34
3.4 Damping with Spherical Wheel Damper 37
3.5 Reorientation Maneuver with Four Reaction Wheels 42
3.6 Reorientation Maneuver with Three Control Moment Gyros 52
3.7 OneAxis BangBang Control Demonstration 61
4 Developed Scenarios for a Flexible Spacecraft 65
4.1 Flexible Spacecraft in Two Dimensions 65
4.1.1 Derivation of Equations of Motion 65
4.1.3 Confirmation of the Accuracy of the Model 80
4.1.4 Simulation Implementation 91
4.2 Flexible Spacecraft in Three Dimensions 95
4.2.1 Derivation of Equations of Motion 95
4.2.3 Confirmation of the Accuracy of the Model 106
4.2.4 Simulation Implementation 112
5 Implementation on a Website 119
6 Conclusions and Future Work 121
Figure 1.1: Applet Interface from Previous Work 2
Figure 2.1: Interface of Eclipse Platform 12
Figure 2.2: Interface of WinCVS 13
Figure 2.3: Interfaces of 2D Plots in JAT 17
Figure 2.4: 3D Animation produced by AnimationWindow class 18
Figure 2.5: Scene graph diagram for AnimationWindow 19
Figure 2.6: 3D Visualization of a Spacecraft with Flexible Appendages 20
Figure 2.7: Scene Graph Diagram of AnimtionWIndow2.class 21
Figure 2.8: Interface of the Attitude Simulation Applet 22
Figure 3.1: Applet Interface for Scenario 1 25
Figure 3.2: Scenario 1 Simulation with 26
Figure 3.3: Scenario 1 Simulation with 27
Figure 3.4: Scenario 1 Simulation with 28
Figure 3.5: Applet Interface for Scenario 2 33
Figure 3.6: Applet Interface for Scenario 3 36
Figure 3.7: A rigid spacecraft with a spherical damper inside 37
Figure 3.8: Interface of Scenario 4 41
Figure 3.9: Four Reaction Wheels in a Pyramid Configuration 42
Figure 3.10: A reaction wheel in an arbitrary orientation 43
Figure 3.11: Applet Interface for Scenario 5 50
Figure 3.12: Example of reorientation maneuver 51
Figure 3.13: Angular momentum during a reorientation maneuver with no initial angular velocities 51
Figure 3.14: Possible configuration of CMG Assembly using three CMGs 53
Figure 3.15: A CMG of Arbitrary Orientation inside a spacecraft 54
Figure 3.16: Applet Interface for Scenario 6 60
Figure 3.17: Block diagram used for the simulation 61
Figure 3.18: Reduced Block diagram 62
Figure 3.19: Final Transfer function 62
Figure 3.20: Algorithm of BangBang Control 63
Figure 3.21: Interface for Scenario 7 64
Figure 4.1: A Flexible Spacecraft in a Circular Orbit 65
Figure 4.2: Flexible element modeling 69
Figure 4.3: Position plot for antisymmetric initial condition 79
Figure 4.4: Position plot for symmetric initial condition 79
Figure 4.5: Total energy of the system with no energydissipating elements 82
Figure 4.6: Total energy of the system with no energydissipating elements 82
Figure 4.7: Model of a flexible spacecraft system 83
Figure 4.8: Total angular momentum for a symmetric initial condition 88
Figure 4.9: Total angular momentum for an antisymmetric initial condition 89
Figure 4.10: Angular momentum plot for nonsymmetric initial condition 90
Figure 4.11: Applet Interface of Flexible Spacecraft in 2D Simulation 91
Figure 4.12: Position Plot for a symmetric initial condition 92
Figure 4.13: Angular Momentum Plot for a symmetric initial condition 92
Figure 4.14: Position Plot for an antisymmetric initial condition 93
Figure 4.15: Angular Momentum Plot for an antisymmetric condition 93
Figure 4.16: Position Plot for a nonsymmetric initial condition 94
Figure 4.17: Angular Momentum Plot for a nonsymmetric initial condition 94
Figure 4.18: Flexible spacecraft model 95
Figure 4.19: Numerical Simulation for a symmetric initial condition 105
Figure 4.20: Numerical Simulation for an antisymmetric condition 105
Figure 4.21: System Total Energy for antisymmetric initial condition 107
Figure 4.22: System Energy for symmetric initial condition 107
Figure 4.23: Angular momentum of the system for antisymmetric initial condition 112
Figure 4.24: Angular momentum of the system for symmetric initial condition 112
Figure 4.26: Tipmass Position and Velocity Plot for a symmetric initial condition 114
Figure 4.27: Spacecraft Euler Angle Plot for a symmetric initial condition 114
Figure 4.28: Angular Momentum Plot for a symmetric initial condition 115
Figure 4.29: Tipmass Position and Velocity Plot for an antisymmetric initial condition 115
Figure 4.30: Spacecraft Euler Angle Plot for an antisymmetric condition 116
Figure 4.31: Angular Momentum Plot for an antisymmetric condition 116
Figure 4.32: Tipmass Position and Velocity Plot for a nonsymmetric condition 117
Figure 4.33: Spacecraft Euler Angle Plot for a nonsymmetric condition 117
Figure 4.34: Angular Momentum Plot for a nonsymmetric condition 118
H angular momentum ()
I moment of inertia ()
T kinetic energy (joule)
T_{c } control torque ()
K_{p} proportional gain
K_{d }derivative gain
K_{i} integral gain
M torque ()
V potential energy (joule)
a semimajor axis (km)
e eccentricity
n orbital rate, (rad/sec)
elemnt of direction matrix, i =1,2,3
c_{11} gravity gradient variable
c_{21} gravity gradient variable
c_{31} gravity gradient variable
angular velocity of a spacecraft in a circular otbit (rad/sec)
gravitational parameter (km^{3}/s^{2})
J reaction wheel moment of inertia (kgm^{2} )
G gravitational constant (Nm^{2}/kg^{2})
a semimajor axis (km)
angle (radian)
p semilatus rectum, p = a(1e^{2}) (km)
c viscous damping coefficient
m mass (kg)
r distance from Earth to spacecraft’s center of mass (km)
t time (second)
q_{1} first quaternion
q_{2} second quaternion
q_{3} third quaternion
q_{4} fourth quaternion
q_{e} error quarternion
q_{t }target quarternion
q_{s} current quarternion of a spacecraft
EI flexural rigdity
angular velocity (rad / sec)
angular acceleration (rad / sec^{2} )
number of orbits
a reaction wheel aligned along xaxis
b reaction wheel aligned along yaxis
c reaction wheel aligned along zaxis
x xaxis
y yaxis
z zaxis
xx principal axes, xdirection
yy principal axes, ydirection
zz principal axes, zdirection
GG gravity gradient
Superscripts
* nondimensionalized
T matrix transpose
Overhead Notations
vector
time derivative,
basis vector
The main objective of this project was to develop software for simulating spacecraft attitude dynamics and control in Java and to provide access to it via the Internet for the purpose of:
Providing visualization of the attitude behavior of a spacecraft,
Providing means for students to check the accuracy of their simulation
Providing demonstration of the simulation of complex spacecraft systems.
These needs come from the experience encountered in spacecraftdynamics courses offered at California Polytechnic State University, San Luis Obispo (Cal Poly). When students take a spacecraft dynamics course for the very first time in their undergraduate education, understanding the subject is relatively difficult because the subject mainly deals with the threedegree of freedom rotational motion in space while the focus of their previous education was usually on translational motion. The webbased application will provide students with one form of reference that they can consult with in studying attitude dynamics.
The idea of making an applet for simulating spacecraft attitude dynamics was generated by Daniel L. Quock [Ref 22], who undertook such a project as his Master’s thesis project. Quock developed an applet that was capable of simulating a rigid body dynamics with constant torques, maneuvering capability with three reaction wheels, and gravitygradient torques. An example of its interface is shown below.
Figure 1.1: Applet Interface from Previous Work
When Quock completed his project, (the applet was completed in terms of its functionality but was never actually deployed on a website), he determined the following future tasks: 1) Expanding the program—Add more scenarios (Ex. Damping, Gyros, Four Reaction Wheels), 2) Using it in the classroom, 3) Making it available publicly. At the onset of this project, it was determined that the first task was to deploy the available applet from previous work on a Web Site for public use. This was done successfully, and the applet was used by students who were taking spacecraftdynamics class at the time to check the accuracy of their simulation. Meanwhile, Quock made the applet file, which was originally one big file, modular, decomposing it into four separate files: 1) AttDynamics.java, 2) AnimationWindow.java, 3) HelpWindow.java,
4) PlotWindow.java. AttDynamics is the applet file, and other three are utility classes that are instanciated by AttDynamics. In order to make adding scenarios an easy process, Quock enhanced the comments in AttDynamics so as to indicate where new lines of code for new scenarios were to be added. However, because of the involvement in Java Astrodynamics Toolkit (JAT) project, which will be described later in this paper, the decision was made to write a completely new file for the new applet, the reason for which was that in JAT subroutines needed for simulation such as plotting routine and numerical integration routine were available, and using routines from previous work was no longer necessary. From the previous work, only AnimationWindow was used in the new applet for threedimensional visualization of the behavior of spacecraft attitude. Finally it was decided that the new applet was going to be developed as a part of JAT.
1.3 Overview of Rigid Body Dynamics
Satellite technology is young but is already indispensable to our lives today; some of the fields in which satellites are used include telecommunications, scientific research, meteorology, and others [Ref 3]. Therefore the need for engineers to have a solid educational background on spacecraft dynamics is critical for the improvement and safety of our daily lives.
Spacecraft dynamics is a combination of orbit dynamics and attitude dynamics, both of which is needed to describe the motion of a spacecraft in space but each deals with distinct area of dynamics. Orbit dynamics is a particle dynamics in which a spacecraft is considered to be a particle (a point mass with no dimension), and its translational motion is the focus of the subject. Attitude dynamics, on the other hand, is a rigidbody dynamics in which a spacecraft is considered to be a body with finite dimension, and its rotational motion about its center of mass is the main focus. As no physical bodies are completely rigid, a flexible body is also concerned in spacecraft attitude dynamics. The challenges in learning spacecraft attitude dynamics include its nonintuitiveness compared to the relative intuitiveness in translational dynamics, the difficulty in visualizing what is really happening to the spacecraft orientation, and the heavy emphasis on computer simulation because of the involved complexity and nonlinearity in the equations of motion of attitude dynamics.
1.3.2 Angular Momentum & Rotational Kinetic Energy
The two quantities important in attitude dynamics is the angular momentum and rotational kinetic energy, which together completely define the rotational dynamic state of a rigid body [Ref 3]. The equations of angular momentum and rotational kinetic energy in matrix form are given in [Ref 3] and are shown in the respective order.
(Eq. 1.1)
(Eq. 1.2)
These two quantities are subject to the law of conservation and can be used to check for the accuracy of the mathematical model of a spacecraft system. This way of checking the accuracy of a model can be applied to a flexible system as well
The attitude kinematics deals with the description of the orientation of a body in space, which is always described with respect to some reference coordinate system, which may or may not be inertial. An example of an inertial reference frame is the nonrotating coordinate system fixed at the center of the Earth, and an example of a noninertial reference frame is the orbit frame that moves with a spacecraft in an orbit. It is noted that the word ‘inertial’ should be interpreted to mean ‘inertial enough’ as no reference frame is never perfectly nonaccelerating; In the case of the nonrotating frame fixed at the center of the Earth, it is actually accelerating if considered in a bigger perspective since the solar system is accelerating through universe, but this fact is not relevant if a spacecraft is in the solar system.
The relationship between two frames (in the case of describing the orientation of a spacecraft, between the body frame and the reference frame) is defined by a transformation matrix by using Euler angles, direction cosines, or quaternion vectors. The relationship of any two coordinate systems is obtained by successive transformation between intermediate frames. The kinematics of a spacecraft in space is completely described by the kinematical differential equation that defines the timedependent relationships of two coordinate systems and any necessary transformation in order to express the quantity in the desired frame.
The attitude dynamics of a spacecraft is described by the angular momentum equation, which states that the time rate of change of the angular momentum of a system is equal to the external torques acting on the center of mass of the system.
The derivation leads to three, coupled nonlinear ordinary differential equations, which together with the kinematical equations, completely describe the attitude motion of a spacecraft in space.
The expression ‘attitude control’ has the meaning of controlling the attitude of a satellite so it can achieve a desired orientation [Ref 3]. In order to control the attitude of a spacecraft, control torque is necessary, which can be produced actively with control hardware instruments (this kind of control is called active control), or by natural effects such as gravity gradient torques (this kind of control is called passive control) [Ref 3]. In the case of active control, the control torque to be activated is a function of the attitude errors or the difference between the current orientation and the desired orientation [Ref 3]. The equation for the control torques is written as [Ref 3]:
(i =1, 2, 3) (Eq. 1.3)
The above equation applies to each of the three body axes. Control gains Kp, Kd, and Ki are proportional, derivative, and integral gains, respectively, and can be determined in order to obtain desired natural frequency and damping characteristic of the system through the linearization of spacecraft dynamic equations.
Attitude control can be of two types: attitude stabilization and attitude reorientation maneuver. For the attitude stabilization, passive control is popular although active control can also be used. For attitude reorientation maneuver, the attitude control must necessarily be active with the control torques calculated by a control command law. An example of satellites that need such attitude reorientation maneuver is one whose task is to scan the sky for scientific observations [Ref 3]. Command laws are expressed in different attitude error terminologies, and the most common include Eulerangle error for smallangle maneuver, and for largeattitude maneuvers, direction cosine error or quaternion error expressions [Ref 3]. The attitude control of a spacecraft using the control command law assumes the existence of control hardware that can generate the commanded torques. The topic of control hardware is discussed next.
For the attitude control of a spacecraft, Sidi [Ref 3] lists four distinct means:
1. Earth’s magnetic field
2. Reaction forces produced by expulsion of gas or ion particles
3. Solar radiation pressure on spacecraft surfaces
4. Momentum exchange devices (rotating bodies inside the s/c)
Of the four options, the first three change the overall inertial angular momentum of a spacecraft, while the fourth option do not because it is based on rotating masses inside the spacecraft, and angular momentum is transferred within the system without changing the overall inertial angular momentum vector of the system [Ref 3]. The momentum exchange devices include reaction wheels, momentum wheels, and control moment gyros, and they are popular for accurate and fast maneuvers for their capability of providing continuous and smooth control with lowest possible disturbing torques [Ref 3].
Java consists of three components: the Java programming language, the Java virtual machine, and the Java platform [Ref 11]. The Java programming language is the language Java programs are written in. It is similar to C++, which makes it easy for people who have used C++ to learn. It is design to be simpler than C++ so that it is easier to write bugfree code than C++ [Ref 11]. The Java virtual machine is a CPU architecture that can be implemented on hardware directly or in the form of a software program [Ref 11]. When Java codes are compiled, they are first converted to intermediate code called byte codes, which are the machine instruction for the Java virtual machine. The Java virtual machine then interprets and executes the byte codes. Therefore, as long as the Java virtual machine is implemented, any computer can run Java programs. The Java platform is the programming environment, which is also referred to as JRE (Java Runtime Environment) or the core Java APIs (Application Programming Interfaces). The platform is made up of a collection of classes available for use by all Java programs [Ref 11]. Java programs can be of two types: an application or applet. A Java application is said to run ‘standalone,’ and executes independently on a computer whereas an applet is, by definition, run inside a Web browser as a part of the page, which is downloaded via the Internet and runs on a user’s machine.
The following list summarizes the characteristics of Java that makes it more suitable for using in this project than other programming languages:
1. Simple
2. Object Oriented
3. Platform Independent
4. Easy to generate documentation
5. Easy to build Graphical User Interface
6. Available for free
First of all, as was mentioned in the previous section, the syntax in Java is simpler than other languages, which makes it relatively easy to write bugfree code. Second, the objectoriented design of Java makes it easy to reuse or add functionality to the existing code, which saves programmers time and effort. Third, programs written in Java can be run on any platforms with the implementation of Java virtual machine. Fourth, the implementation of Java comes with the tool called javadoc, which generates documentation in HTML format if the documentation convention is followed in the source code. Fifth, since the standard APIs include classes for building graphical user interface, it is easy to build GUI and to make an application that looks good. Lastly, everything needed to write Java programs, from the software development kit (SDK) to the language editor, is available free via the Internet.
2.3 Java Astrodyamics Toolkit (JAT)
The Java Astrodynamics Toolkit (JAT) project is an Open Source project hosted by the Web site: SourceFourge.net. It was started by a small group of aerospace engineering graduate students at the University of Texas at Austin, who decided to use Java for their homework assignments in Celestial Mechanics. They started sharing a numerical integrator and discussing homework problems, but they became frustrated by the lack of numerical and engineering routine in Java and decided to create Java Astrodynamics Toolkit. The ultimate goal of the project is for JAT to become a space mission analysis and design software that can compete with existing commercialofftheshelf (COTS) software in terms of features, accuracy and ease of use but with more flexibility that the Java language and the nature of opensource code can provide. The current Web address of the project is: http://jat.sourceforge.net/
2.3.2 Opensource software development
The Java Astrodynaics Toolkit project is an Open Source software development project for the purpose of providing users with flexibility to modify and redistribute the source code and of facilitating a rapid progress of the project. The definition of the term Open Source is maintained by an organization called Open Source Initiative (OSI), which certifies the license terms that comply with the Open Source Definition [Ref 15]. Simply stated, the Open Source license ensures the availability of the source code and uses’ freedom to redistribute the source code in the original or modified form.
2.3.3 Concurrent Versions System (CVS) and Sourceforge.net
The Java Astrodynamics Toolkit project utilizes the Concurrent Versions System (CVS) with much of its functionality provided by SourceFourge.net. CVS is a tool used by software development teams to store the source code in a centralized location, and the functions it provides include [Ref 16]:
Tracking each of the changes made by developers
Making sure that the changes made by each developer do not accidentally overwrite changes made by other developers
Maintaining a historical record of file changes, allowing developers to easily revert the source code to its state before a group of changes was made (i.e., “undo” feature)
Sourceforge.net is an Open Source software development website, providing free hosting services for OpenSource developers. It provides many of the CVS services along with the repository of Open Source code and applications available on the Internet [Ref 17].
2.3.4 Tools used to develop JAT
The following tools were used to develop the packages in JAT and the attitude simulation applet in this project.
1. Java 2 SDK, Standard Edition, Version 1.4
2. Java 3D API
3. Eclipse Platform
4. WinCVS 1.3
The Java 2 SDK, Standard Edition, Version 1.4 (SDK stands for Software Development Kit) contains the tools needed to develop Java programs including the compiler and is the minimum requirement that programmers must have in order to write code in Java. The Java 3D API provides a set of interfaces that enables developers to build 3D animation and incorporate into an application or applet [Ref 18]. As an editor, the Eclipse Java Development Tools (JDT) in the Eclipse Platform available from eclipse.org was used [Ref 19]. Figure 2.1 shows the interface of Eclipse Platform in the Javabrowsing mode.
F
igure
2.1: Interface of Eclipse Platform
WinCVS is an Open Source software called a CVS client that is needed for developers to make changes to the code in the CVS repository. WinCVS provides graphical user interface so that beginners can quickly learn the CVS operations[Ref 20]. The interface of WinCVS is shown in Figure 2.2.
F
igure
2.2: Interface of WinCVS
JAT is still growing in terms of its features and functionality, but the current architecture or the available packages as of July 2003 is summarized in the table below.
JAT Packages 
Features 
jat.alg 
Package alg contains generic algorithms such as numerical integrators, nonlinear equation solvers, etc. 
jat.attitude 
Package attitude contains equations of motion for basic rigid and flexible spacecraft dynamics and provides means to present the output to users 
jat.audio 
Package audio provides a utility for playing sound files 
jat.cm 
Package cm contains celestial mechanics routines 
jat.demo 
Package demo provides demonstration of how to use jat routines 
jat.env 
Package env provides the mechanism for setting environment variables (such as a path to the local JAT directory) 
jat.eph 
Package eph contains the methods necessary to parse the JPL DE 405 ephemeris files (text versions), and compute the position and velocity of the planets, Moon, and Sun 
jat.forces 
Package forces contains force models for generating space trajectories. These forces include gravity, atmospheric drag and solar radiation pressure. 
jat.gps 
Package gps contains models used to simulate the GPS constellation and navigation using GPS 
jat.math 
Package math contains mathematical functions that should have been included in java.math. 
jat.matvec 
Package matvec provodes Matrix and vector functions derived from JAMA and JMAT 
jat.plot 
Package plot provides plotting capability based on Ptolemy and Gr. 
jat.sensors 
Package sensors contains models of various spacecraft sensors such as gyros, accelerometers, etc. 
jat.timeRef 
Package timeRef contains classes for converting time formats and types and Earth reference frames. 
jat.traj 
Package traj provides a means to create trajectory file 
jat.util 
Package util provides utility functions 
jat.vr 
Package vr provides Virtual Reality functions for Java3D visualization 
2.4 Development of jat.attitude package
The development of jat.attitude package started because the need of developing Java files for the attitude simulation applet and the need of JAT developers to create rigidbody dynamics package matched. The way the attitude package works resembles the spacecraft dynamics simulation that can be done in MATLAB, which is a reasonable way to start because that makes it possible to check the output from JAT function against that from MATLAB, thereby confirming the accuracy and competence of JAT. Table 2.2 shows the current architecture of jat.attitude package.
Table 2.2: jat.attitude package architecture
Name 
Features 
jat.attitude 
Package attitude contains generic utility classes 
jat.attitude.eom 
Package eom contains equations of motions of a rigid and flexible spacecraft 
jat.attitude.thesis 
Package thesis contains the applet for this project 
jat.attitude.util 
Package thesis contains utility classes for GUI and 3D animation 
At this point, the package jat.attitude is designed so as to assist the development of the attitude simulation applet; however, there is a lot of room for improvement for this package architecture, and the thesis applet should eventually be moved to the demo package in order to be consistent with what Java Astrodynamics Toolkit is supposed to be: the class libraries for Astrodynamics researchers.
2.5 Development of Attitude Simulation Applet
The main subroutines needed for the development of the attitude simulation applet were 1) numerical integration routine, 2) GUI building routine, 4) event handling routine, 3) equations of motion defining routine, 4) 2D visualization routine, 5) 3D visualization routine. The numerical integration routine was provided by jat.alg integrator package, and the method employed was a fixedstepsize RungeKutta 8^{th} order method with the integration parameter values taken from Fehlberg, Erwin, NASA TR R287 [Ref 21]. Graphical User Interface (GUI) was mainly built in the init( ) method in the applet with the help of an outside routine that built input fields and accompanying labels. In this project all the GUI components used was Swing components because of their flexibility and ease in giving a sophisticate look to GUI and wellanticipated enhancement of features in the future. Event handling was mostly done in the actionPerformed( ) method in the applet that provided the responses to the users’ pushing buttons. Equations of motion for every scenario were defined in jat.attitude.eom package that implemented interfaces needed for the numerical integration. 2D visualization, that is, plotting the output was done through classes contained in jat.plot package. An example of a 2D plot is shown in the following figure. Please see the Appendix for the Java code used in this project.
F
igure
2.3: Interfaces of 2D Plots in JAT
The plot in JAT has the capability of printing the plot, resetting x and y ranges to their original values, setting the plot format, and resetting the plot to fit the data.
The visualization of attitude dynamics in threedimensional space was done through Java 3D API provided by Sun, and AnimationWindow class created by Quock [Ref 22]. AnimationWindow is capable of reproducing the attitude time history with the input of quaternions during the simulation period. An example of animation is shown in Figure 2.4.
F
igure
2.4: 3D Animation produced by AnimationWindow class
Java 3D uses a data structure called ‘scene graph’ or ‘virtual universe’ as it is called in Java 3D terminology [Ref 8]. A scene graph diagram is a pictorial description of how the scene is to be rendered on the screen; in a way this seems analogous to the pseudocode in generic programming.
In AnimationWindow, The satellite is represented using com.sun.j3d.utils.geometry.Box, which is available from the Java3D standard API.
Once an attitude simulation is run, and you have the quaternion values that describe the time history of satellite orientation stored in an array, it is quite easy to visualize the attitude motion using AnimationWindow.class. To construct AnimationWindow object, the following parameters have to be set:
title: (String) = title that goes in window title bar
ixxt: (float) = temp principal moment of inertia,
iyyt: (float) = temp principal moment of inertia
izzt: (float) = temp principal moment of inertia
pts: (int) = number of principal moment of inertia
tvars: (floar arrat) = array of values
symType; (String) = temp type of simulation
(e.g. “Gravity Gradient”)
Animation is controlled using Swing Timer (animControl) , which will fire ActionEvent at every time value specified as the ‘delayValue,’ and this updates the Canvas to produce animation. The scene graph diagram for AnimationWindow is shown below.
F
igure
2.5: Scene graph diagram for AnimationWindow
I
n
this project, a new 3D animation routine was developed in order to
visualize the flexible appendages on a spacecraft, which is shown in
Figure 2.6.
Figure 2.6: 3D Visualization of a Spacecraft with Flexible Appendages
The 3D animation shown in Figure 2.6 was created by the class named AnimationWindow2.class, which is a modified version of AnimationWindow.class. The scene graph diagram of AnimationWindow2.class is shown in Figure 2.7.
F
igure
2.7: Scene Graph Diagram of AnimtionWIndow2.class
In Java 3D, the connection (or ‘joint’) between two object is represented by TransformGroup (TG). TransformGroup has its own representation of transformation with respect to the TransformGroup at the next higher level, to which it is connected. The transformation can be in the state of identity in which case there is no transformation between two TransformGroups. In Figure 2.7, the TransformGroup named ‘satlTrans’ has the transformation of the spacecraft with respect to a reference frame, and the TransformGroup named ‘Beam1TG’ and ‘Beam2TG’ have the transformation of the tip masses with respect to the coordinate frame fixed at the spacecraft.
Figure 2.8 shows the interface of the applet developed in this project.
F
igure
2.8: Interface of the Attitude Simulation Applet
The attitude simulation applet developed in this project has nine scenarios to choose from, and users are asked to pick one scenario from the list at the top. The item below the scenario list is the help file for the specific scenario. It describes the configuration of the spacecraft system simulated and explains what kind of input is required for the simulation. The next item is the scenariospecific input panel in which users are asked to enter moments of inertia of the spacecraft, constants needed for the scenario, and initial condition. The text fields below are for the simulation control; the first field controls the timestep for the numerical integration routine and the next field control the simulation time. It should be noted that, in the case of gravitygradient scenario, time is in terms of number of orbits instead of seconds. For the output option, users can get 2D plots only, 3D animation only, or both by checking off the corresponding boxes. Simulation can be started by pushing the button that says “Start button” at the very bottom of the applet
The applet has an Euler angle converter that converts 321 Euler angle to corresponding quaternion values as an additional feature.
3 Developed Scenarios for a Rigid Spacecraft
3.1 Constant, BodyFixed Torques
This scenario uses Euler’s rotational equations of motion to simulate the attitude dynamics of a rigid spacecraft with optional bodyfixed, constant torques. Euler’s rotational equations of motion is found in most of the textbooks on spacecraft dynamics (See Ref 1,2,3,and 5), and is easily derived from the angular momentum equation:
(Eq. 3.1)
The resulting Euler’s rotational equations are:
(Eq. 3.2)
(Eq. 3.3)
(Eq. 3.4)
where the ’s are inertial angular velocities in body frame, the I’s are the principal moments of inertia, and the M’s are the bodyfixed, constant torques. The overhead dot in the above equations denotes the time derivative of the variable. Eq. (3.2), (3.3), and (3.4) are three coupled, nonlinear ordinary differential equations and completely describe the dynamics of a rigid body. The other half of the equations that will completely furnish the description of the attitude motion of a spacecraft is the kinematical differential equations that describe the timedependent relationship between two frames [Ref 1], which are given as:
(Eq. 3.5)
(Eq. 3.6)
(Eq. 3.7)
(Eq. 3.8)
where ’s are quaternions that define the transformation from inertial frame to body frame, which are preferred over Euler angles because of the lack of singularity in the set of kinematical differential equations Eq (3.5)(3.8). In the simulation, Eq (3.2)(3.8) are numerically integrated to get the time history of each variable.
T
he
simulation interface is shown in Figure 3.1 below.
Figure 3.1: Applet Interface for Scenario 1
T
his
scenario can be used to demonstrate the torquefree motion of a
spinning axisymmetric rigid body, torquefree motion of asymmetric
rigid body that is spinning about one of its principal axes, or a
spinning axisymmetric body with constant bodyfixed torques. With no
presence of external torques and internal energy dissipation, an
asymmetric rigid body has the characteristics that if the spin axis
is either the major axis or minor axis, then the rotational motion is
said to be stable [Ref 1]. If the spin axis is the intermediate axis,
then the rotational motion is said to be unstable [Ref 1]. The next
figure shows that a rigid asymmetric body spinning about its major
axis is stable if a small impulsive disturbance torque is applied to
the body.
Figure 3.2: Scenario 1 Simulation with
The next figure shows that a rigid, asymmetric body spinning about its minor axis is also stable if a small impulsive disturbance torque is applied to the body.
F
igure
3.3: Scenario 1 Simulation with
The next figure shows that a rigid, asymmetric body spinning about its intermediate axis is unstable if a small impulsive disturbance torque is applied to the body.
Figure 3.4: Scenario 1 Simulation
with
3.2 Gravity Gradient in a Circular Orbit
Because of a finite dimension of a spacecraft, the body experiences a gradient of gravitational force; the stronger force is felt on the side of the spacecraft that is closer to the Earth, and the weakest force is felt on the side that is furthest from the Earth. Depending on the orientation of a spacecraft with respect to the Earth, the Gravity Gradient force may cause a spacecraft to go unstable over a period of time. This scenario intends to demonstrate the behavior of a GravityGradient spacecraft.
The approximate gravity gradient torque acting on a spacecraft in an orbit is expressed as [Ref 1]:
(Eq. 3.9)
=
=
=
=
where n is the orbital rate defined as .
To construct the dynamic equations of motion about bodyfixed principal axes with gravity gradient, the external moment terms in the Euler’s rotational equations of motion are substituted with the gravity gradient torque defined above.
The Gravity Gradient affects the spacecraft’s stability as it moves in an orbit, but the size of the gravity gradient torques is small and long simulations may be required to observe its effects. This makes simulating in terms of time in seconds undesirable because of the expensive computation time. In addition, simulation in terms of seconds is not convenient for eccentric orbits which will be discussed later. To avoid such a problem, the time has been taken out from the differential equations used in this scenario. To nondimensionalize the equation, the following parameter was used:
(Eq. 3.10)
is the angular velocity of a spacecraft going around in a circular orbit with the radius of r, and is the gravitational parameter defined as [Ref 2].
G is the gravitational constant, and in the case of artificial satellites, is nearly equal to Gm_{1} [Ref 2]. is constant for a spacecraft in a circular orbit with the radius being constant throughout the revolution, and it therefore can be used as the nondimensinalizing parameter. The following definition was used:
(i = 1,2, 3) (Eq. 3.11)
where has been nondimensionalized by .
Identities and definitions used in the nondimensionalizing process are:
(Eq. 3.12)
where is the angular velocity in the units of radians per second, and t is the time in seconds. It is noted that the unit of the lefthand side and the righthand side of Eq (3.12) is radian.
(Eq. 3.13)
(Eq. 3.14)
(Eq. 3.15)
Rearranging the definition of time derivative as
(Eq. 3.16)
Putting Eq (3.15) into Eq (3.16),
(Eq. 3.17)
Eq (3.17) converts the derivative with respect to time into the derivative with respect to which is the number of orbits.
The dynamic equations Eq.(3.23.4) and the gravitytorque can be nondimentionalized using the relationships Eq (3.11)(3.17):
(Eq. 3.18)
(Eq. 3.19)
(Eq. 3.20)
c_{11}, c_{21}, and c_{31} in the above equations can be written in terms of quaternions:
(Eq. 3.21)
(Eq. 3.22)
(Eq. 3.23)
The kinematical equations Eq. (3.5)(3.8) are nondimensionalized as:
(Eq. 3.24)
(Eq. 3.25)
(Eq. 3.26)
(Eq. 3.27)
where q’s define the transformation from orbit frame (LocalVerticalLocalHorizontal: LVLH) to body frame.
To simulate the attitude dynamics of a rigid spacecraft in a circular orbit, Eq. (3.18)(3.20) and Eq. (3.24)(3.27) were numerically integrated to get the time history of each variable. The applet interface for this scenario is shown in Figure 3.5.
F
igure
3.5: Applet Interface for Scenario 2
For this scenario, the reference frame is the orbit frame, not an inertial frame, which moves with the spacecraft in an orbit. It should be noted, the time is in terms of orbits instead of seconds for this scenario.
3.3 Gravity Gradient in an Eccentric Orbit
Incorporating eccentricity in the GravityGradient dynamic and kinematical equations is done through redefining the nondimensionalizing scheme. In the case with a circular orbit, the nondimensionalizing parameter was , but cannot be used for the eccentric case because it is no longer a constant as a spacecraft revolves around an orbit with eccentricity. The parameter that was used in nondimensionalizing differential equations for the eccentric case is the orbital mean motion n [Ref 2]:
(Eq. 3.28)
where is the semimajor axis.
In order to nondimensionalize the equations, the following identities are used:
(Eq. 3.29)
(Eq 3.30)
where
(Eq. 3.31)
(Eq. 3.32)
The dynamic equations for this scenario that have been nondimensionalized are:
(Eq. 3.33)
(Eq. 3.34)
(Eq. 3.35)
The nondimensionalized kinematical equations are:
(Eq. 3.36)
(Eq. 3.37)
(Eq. 3.38)
(Eq. 3.39)
Eq. (3.33)(3.39) were numerically integrated to get the time history of variables. The applet interface for this scenario is shown in Figure 3.6.
F
igure
3.6: Applet Interface for Scenario 3
Again, the time is in terms of number of orbits for this scenario.
3.4 Damping with Spherical Wheel Damper
Damping was added to a rigid spacecraft in the form of a spherical wheel damper with the viscous damping coefficient of c. The configuration of the system, which is a simplified model of a rigid body with internal energy dissipation [Ref 1], is shown in Figure 3.7.
F
igure
3.7: A rigid spacecraft with a spherical damper inside
The total angular momentum of the system is:
(Eq. 3.40)
where the moments of inertia used in calculating include both the inertia of spacecraft and that of the damper. is the angular momentum of the damper relative to the spacecraft.
The absolute angular momentum of the spherical damper is
(Eq. 3.41)
where ’s are the angular velocities of the spacecraft about the principal axes, and ’s are the relative velocities between the rigid body and the damper about the principal axes.
The relative angular momentum of the spherical damper is
(Eq. 3.42)
The total angular momentum of the system in the body frame is expressed as:
(Eq. 3.43)
where I’s are the spacecraft’s moments of inertia including the moments of inertia of the spherical damper.
Then the dynamic equations of the spacecraft system is
(Eq. 3.44)
where
(Eq. 3.45)
(Eq. 3.46)
= (Eq. 3.47)
(Eq. 3.48)
where M’s are external torques acting on the spacecraft.
Then Eq. (3.44) becomes
(Eq. 3.49)
Rearranging, Eq. (3.49) becomes
(Eq. 3.50)
The dynamic equations of the spherical damper is given as follows:
(Eq. 3.51)
where
(Eq. 3.52)
(Eq. 3.53)
(Eq. 3.54)
=
(Eq. 3.55)
where c is the viscous damping coefficient of the spherical damper.
Eq. (3.55) represents the reaction torque acting on the damper by the spacecraft.
Then Eq. (3.51) becomes:
(Eq. 3.56)
Rearranging Eq. (3.56),
(Eq. 3.57)
From Eq. (3.57), the dynamic equations for the spherical damper are written as:
(Eq. 3.58)
(Eq. 3. 59)
(Eq. 3.60)
By substituting Eq. (3.583.60) into Eq. (3.50), the dynamic equations for the spacecraft system becomes:
(Eq. 3.61)
(Eq. 3.62)
(Eq. 3.63)
I
n
the simulation Eq. (3.58)(3.60), Eq. (3.61)(3.63) are numerically
integrated together with the kinematical differential equations. The
next figure shows the interface of the applet for this scenario.
Figure 3.8: Interface of Scenario 4
3.5 Reorientation Maneuver with Four Reaction Wheels
An attitude maneuver via momentum transfer based on the conservation of angular momentum was simulated. In this project, four reaction wheels in a pyramid configuration was used; this configuration provides redundancy such that if one wheel becomes unable to operate for some reason, the other three reaction wheels can provide control torque in all three directions. The pyramid configuration is illustrated in Figure 3.9.
Figure 3.9: Four Reaction Wheels in a Pyramid Configuration
The rotational axes of four wheels are inclined to 12 plane by an arbitrary angle, by which each reaction wheel contributes its control torque about the third axis. For an arbitrarily oriented reaction wheel, its momentum vector can be expressed in terms of bodyreference basis vectors as illustrated in the following figure.
Figure 3.10: A reaction wheel in an arbitrary orientation
The simple illustration in Figure 3.10 reveals that the vector pointing in the direction of angular momentum of the reaction wheel can be expressed as:
(Eq. 3.64)
From Figure 3.9, the following relationships are found:
(Eq. 3.65)
(Eq. 3.66)
(Eq. 3.67)
(Eq. 3.68)
The control law used in this project was given by [Ref 3]
(Eq. 3.69)
(Eq. 3.70)
(Eq. 3.71)
(Note: From the way the control laws are written, the gains have to have negative signs)
In Eq. (6)(8), K’s are the proportional gain and Kd’s are derivative gain calculated in the program so that the natural frequency and damping coefficient will be 1. q_{e}’s are error quaternions defined as [Ref 3]
(Eq. 3.72)
In Eq. (9), q_{t}’s are target quaternions that describe the commanded orientation and q_{s}’s are the current quaternions that describe the current orientation of a spacecraft. Similar information is found on page 403 of Ref 1.
The total angular momentum of a rigid spacecraft and four reaction wheels inside is expressed as:
(Eq. 3.73)
where is the angular momentum of the spacecraft and reaction wheels, and the moments of inertia used to calculate include both the inertia of the spacecraft and that of the reaction wheels. is the angular momentum of the reaction wheel assembly relative to the spacecraft. Both quantities can be expressed as follows:
(Eq. 3.74)
where I’s are the principal moments of inertia of the spacecraft including the inertia of reaction wheels.
(Eq. 3.75)
where J’s are the moment of inertia of the reaction wheels, ’s are the angular speed of reaction wheels, and (, , , ) are the direction cosines, as indicated in Eq. (3.64), between the wheel spin axis and body axes. In this project, it was assumed that all wheels had the same inertia J, so Eq. (3.75) can be reduced to:
(Eq. 3.76)
For convenience later on in the calculation, following definitions will be used:
(Eq. 3.77)
(Eq. 3.78)
(Eq. 3.79)
The dynamic equations of motion for the system of a rigid spacecraft and four reaction wheels in a pyramid configuration as shown in Figure 3.9 are expressed in a vector form as:
(Eq. 3.80)
where
= (Eq. 3.81)
(Eq. 3.82)
(Eq. 3.83)
=
=
(Eq. 3.84)
Then Eq. (3.80) becomes:
(Eq. 3.85)
Rearranging Eq. (3.85),
(Eq. 3.86)
Solving Eq. (3.86) for ’s:
(Eq. 3.87)
(Eq. 3.88)
(Eq. 3.89)
The term shaded in gray in Eq. (3.87, 3.88, 3.89) can be considered as control torques generated by reaction wheels; that is,
(Eq. 3.90)
(Eq. 3.91)
(Eq. 3.92)
Eq. (3.903.92) can be solved for the commanded reaction wheel speed ’s in order to generate necessary control torques ’s that are calculated by the particular control law being employed. Eq. (3.903.92) can be put into matrix form so as to solve for ’s:
(Eq. 3.93)
Then
(Eq. 3.94)
where
and is the pseudoinverse of defined as
(Eq. 3.95)
In this scenario, dynamic equations for a spacecraft Eq. (3.87 – 3.89), dynamic equations for a reaction wheel assembly Eq. (3.94), and kinematical equations Eq. (3.5 3.8) were numerically integrated. The applet interface for this scenario is shown below.
F
igure
3.11: Applet Interface for Scenario 5
As indicated in Figure 3.11, users have the choice of selecting between fourreactionwheel configuration or threereactionwheel configuration. The three reactionwheel configuration is the fourwheelsinapyramid configuration with one wheel being disabled.
The following figures shows the result for commanded 321 Euler angles of = 10 degrees, = 20 degrees, and = 60 degrees reorientation maneuver with no initial angular velocities.

Figure 3.12: Example of reorientation maneuver
Since during a reorientation maneuver, angular momentum is internally exchanged between a spacecraft and its reaction wheel assembly, angular momentum of the total system is conserved, and this is shown in the next figure.

Figure 3.13: Angular momentum during a reorientation maneuver with no initial angular velocities
3.6 Reorientation Maneuver with Three Control Moment Gyros
Control moment gyros (CMGs) are used when a spacecraft mission requires high control torque that reaction wheels are not able to generate. CMGs can provide 1005000 Nm maximum torque while reaction wheels can only provide 12 Nm maximum torque [Ref 13]. The main difference between reaction wheels and CMGs is how they generate reaction torque. A reaction wheel generates torque about the rotor spin axis by spinning up and down, and its nominal spin rate is zero. Reaction wheels are often used to control threeaxis stabilized spacecraft and small spacecrafts [Ref 1]. On the other hand, a CMG generates reaction torque by changing the direction of the constant angular momentum vector of a spinning rotor, which is done by changing the gimbal angle or applying torque on the gimbal axis. Because of its nominal large constant angular momentum, a CMG is capable of providing a large reaction torque with a small gimbal torque input. CMGs are often used for control of agile spacecraft and momentum management of large spacecraft [Ref 1]. The fundamental principle of how a CMG generates a reaction torque is well described on page 143 of Ref 2.
The two basic types of control moment gyros used for spacecraft control are: 1) singlegimbal control moment gyros (SGCMGs) and 2) doublegimbal control moment gyros (DGCMGs). Some of the CMG arrangements that have been developed in the past are: four SGCMGs of pyramid configuration, six parallel mounted SGCMGs, three orthogonally mounted DGCMGs, and four parallel mounted DGCMGs [Ref 1]. In this project, to simulate a reorientation maneuver of a rigid spacecraft using CMGs, a configuration of 3 singlegimbal control moment gyros aligned with the principal axis was used. Figure 3.14 shows one example of how three CMGs can be set up in a spacecraft with respect to the body frame.
Figure 3.14: Possible configuration of CMG Assembly using three CMGs
In Figure 3.14, ’s are gimbal angle of each CMG and ’s are angular momentum vector of CMGs. indicates that the axis is fixed while its angle can be changed by an electric motor.
W
hile
a reaction wheel directly effects the spacecraft around the flywheel
rotation axis, a CMG is rotated about the second axis (the flywheel
rotation axis being the first axis), and produce a spacecraft rate
about the third axis [Ref 2]. Figure 3.15 shows a CMG oriented in
an arbitrary direction in a rigid spacecraft.
Figure 3.15: A CMG of Arbitrary Orientation inside a spacecraft
In Figure 3.15, is the spin axis of the CMG shown, and is its gimbal axis. is the constant spin rate that provides the CMG with a nominal angular momentum, and the spin rate is usually high. is the gimbal angle, and is the gimbal rate used to provide the spacecraft with the control torque from the CMG. For the configuration shown in Figure 3.13, the total angular momentum of the system is:
(Eq. 3.96)
=
In Eq. (3.96), I’s are the moments of inertia of the spacecraft including the inertia of the CMG. The moment of inertia is assumed to be:
(Eq. 3.97)
In Eq. (3.96), it should be noted that (gimbal axis) is fixed while (spin axis) changes as the gimbal rate is commanded to produce control torque.
In this project, three singlegimbal CMGs aligned with the principal axis were used as the actuators.
The first CMG has the gimbal axis aligned with the body1 axis and has the following relative angular momentum:
(Eq. 3.98)
where is the gimbal rate of the first CMG, andis its constant spin rate.
In Eq (3.98), the gimbal axis and spin axis are expressed as:
Substituting the above definition into Eq. (3.98), the equation becomes:
(Eq. 3.99)
The angular momentum for the second and third CMG can be obtained following the similar processes.
(Eq. 3.100)
(Eq. 3.101)
Then the total angular momentum of the CMG assembly relative to the spacecraft is expressed in a matrix form as follows:
(Eq. 3.102)
For convenience later on in the calculation, the following definitions will be used:
(Eq. 3.103)
(Eq. 3.104)
(Eq. 3.105)
The dynamic equations of the spacecraft including the CMG assembly can be derived from the following governing equation:
(Eq. 3.106)
where
(Eq. 3.107)
(I’s are the moments of inertia of the spacecraft plus the inertia of CMG assembly.)
(Eq. 3.108)
(Eq. 3.109)
=
=
(Eq. 3.110)
Then Eq. (3.106) becomes:
(Eq. 3.111)
Rearranging Eq. (3.111),
(Eq. 3.112)
Eq. (3.112) can be solved for ’s as follows:
(Eq. 3.113)
(Eq. 3.114)
(Eq. 3.115)
The term shaded in gray in Eq. (3.113, 3.114, 3.115) can be considered as control torques generated by CMGs; that is,
(Eq. 3.116)
(Eq. 3.117)
(Eq. 3.118)
Eq. (3.1163.118) can be solved for the commanded CMG gimbal rates ’s in order to generate necessary control torques ’s that are calculated by the particular control law being employed. Eq. (3.1163.118) can be put into a matrix form so as to solve for’s:
=
(Eq. 3.119)
Then
(Eq. 3.120)
where
(Eq. 3.121)
(Eq. 3.122)
In Eq. (3.122), ’s were neglected because they were small and determined to be insignifiant.
In the simulation, the dynamic equations of motion of the spacecraft Eq. (3.1133.115), the dynamic equations of motion of the CMG assembly Eq. (3.120), and the kinematical differential equations Eq. (3.53.8) were numerically integrated.
The following figure shows the interface of this scenario.
F
igure
3.16: Applet Interface for Scenario 6
3.7 OneAxis BangBang Control Demonstration
A basic bangbang control about single axis, which is good to simulate thruster control (having only onoff fixedlevel thrust) was implemented in this scenario. First, the model of a linearized spacecraft dynamics with a proportional and derivative control was considered, which is shown in Figure 3.17.
Figure 3.17: Block diagram used for the simulation
The block diagram in Figure 2.71 can be further reduced to the diagram shown below.
Figure 3.18: Reduced Block diagram
Figure 3.18 can be reduced to the form of block diagram that describes the behavior of the spacecraft.
Figure 3.19: Final Transfer function
The denominator in the transfer function represents a secondorder system, and the proportional and derivative gain can be chosen to get the desired natural frequency and damping coefficient. The simulation is for a demonstration purpose only, so the gains were selected such that the natural frequency and the damping coefficient were 1. In the simulation two kinds of control actuators were tested; the first one was a continuous actuator with no physical constraint, and the second actuator was a bangbang actuator with a limited, fixed amount of torque. The differential equations used in the simulation are:
(Eq. 3.123)
(Eq. 3.124)
The control torque was calculated by the following control law:
(Eq. 3.125)
Kx and Kxd were calculated so as to get the natural frequency and the damping coefficient of 1 with no physical constraint.
For the bangbang control scheme, the control algorithm used at each integration step is shown in the following figure.
Figure 3.20: Algorithm of BangBang Control
In figure 3.20, dz denotes a dead zone below which no torque should be generated.
I
n
figure 3.20, sign is the signum function that returns 1 if the
element is grater than zero, 0 if it is equals zero, and –1 if it
is less than zero. The interface for this scenario is shown in Figure
3.21.
Figure 3.21: Interface for Scenario 7
4 Developed Scenarios for a Flexible Spacecraft
4.1 Flexible Spacecraft in Two Dimensions
4.1.1 Derivation of Equations of Motion
A twodimensional flexible spacecraft was modeled as a rigid central body with flexible appendages attached as illustrated below. Two concentrated masses are attached at the tip of the massless beams, one on each side of the rigid central spacecraft. The model used is illustrated in Figure 4.1 below.
F
igure
4.1: A Flexible Spacecraft in a Circular Orbit
In Figure 4.1, r is the radius of the spacecraft’s orbit, is the true anomaly of the spacecraft, is the angle between the spacecraft body frame and the orbit frame in the 12 plane (The spacecraft is constrained to move only in the 12 plane in this model.), u_{1} and u_{2} are the deflections of the tip masses measured from the b_{1} axis, L is the length of each beam that is attached to the central rigid body, a is the distance from the center of mass of the rigid body to the attachment point of the beam, EI is the flexural rigidity of each beam, and m_{e, }m_{s/c}, m_{1}, m_{2} are the mass of Earth, spacecraft, tipmass on the right side of spacecraft, tipmass on the left side of spacecraft, respectively.
Equations of motion for this system were derived by the Lagrange’s equation.
First of all, kinetic energy of the whole system illustrated above is
(Eq 4.1)
where T_{s/c} = Kinetic energy of the spacecraft
T_{m} = Kinetic energy of the masses
(Eq. 4.2)
(Eq. 4.3)
and can be calculated as follows.
First of all,
(Eq. 4.4)
So by chain rule,
(Eq. 4.5)
Derivatives of unit basis vectors are calculated as
(Eq. 4.6)
(Eq. 4.7)
Then becomes
(Eq. 4.8)
=
=
So ,which is a scalar value, becomes (Eq. 4.9)
is calculated following similar steps.
(Eq. 4.10)
(Eq. 4.11)
=
=
=
(Eq. 4.12)
The term is calculated with the fact that
(Eq. 4.13)
(Eq. 4.14)
(Eq. 4.15)
(Eq. 4.16)
So,
(Eq. 4.17)
With the preceding preliminary calculations, the kinetic energy of the whole system is
(Eq. 4.18)
Using the Lagrange’s method, equations of motion about each generalized coordinate is obtained with this total kinetic energy and respective generalized force about each coordinate. Generalized coordinates in this case are:
{ r, , , u_{1}, u_{2}}
Generalized forces about each coordinate in the order of the above listing is
(Eq. 4.19)
where G is the gravitational constant
(Eq. 4.20)
where is the environmental torque and is the control torque.
(Eq. 4.21)
(Eq. 4.22)
(Eq. 4.23)
The generalized forces and come from the deflection of the tip of the cantilever attached to the rigid central body as illustrated in the following figure. (Note: the cantilever itself is considered massless; the mass is concentrated only at the tip.)
Figure 4.2: Flexible element modeling
The deflection of a point in the cantilever is given by the following formula [Ref 23].
(Eq. 4.24)
where y = vertical deflection
P = applied load at the tip of the cantilever
x = horizontal distance measured from the beam attachment location
EI = constant flexural rigidity of each beam
At the tip of the beam, x=L, so the deflection becomes
(Eq. 4.25)
To formulate Lagrange’s equations, force in terms of coordinates (deflection) is desired, so solving the previous equation for the applied load P in terms of the tip deflection y,
(Eq. 4.26)
From this, it follows that
(Eq. 4.27)
and
(Eq. 4.28)
If Eq. (4.28) is correct, it must be the derivative of potential energy, .
The potential energy of the cantilever beam due to the deflection caused by the applied load in the previous illustration is given by
(Eq. 4.29)
With the derived value of applied load in terms of tip deflection,
(Eq. 4.30)
=
Force is the derivative of potential energy, so the following relationship must hold.
(Eq. 4.31)
which is in fact the case.
Then the equations of motion about each generalized coordinate can be obtained by setting up the following equations.
(Eq. 4.32)
(Eq. 4.33)
(Eq. 4.34)
(Eq. 4.35)
(Eq. 4.36)
In the model considered in which the spacecraft’s orbit is circular, r and are constant, so only 6 state variables were considered instead of 10 state variables. These 6 state variables are
Carrying out the operations in Eq (4.33), (4.35), and(4.36), the following equations results:
+
(Eq. 4.37)
(Eq. 4.38)
(Eq. 4.39)
_{In order to perform the numerical integration, Eq.(4.37),(4.38), and(4.39) have been simultaneously solved for the second derivative of }_{}_{, u}_{1}_{ and u}_{2}_{. Please see the appendix for the exact equations used in the simulation.}
There are several ways to proceed with a linear analysis for a nonlinear system. One way is to employ the small perturbation method in which small perturbation about an equilibrium point is assumed and higher order terms are discarded in the state equations, resulting in the linearized state equations about the equilibrium point. This method may work for a relatively simple system, but when the system becomes complicated and the equations become complex, even solving for a set of firstorder differential equations may be a daunting task, in which case other methods might be employed. One could also directly linearize the secondorder differential equations derived from the Lanrange’s method by ignoring the nonlinear terms and proceeding with the Laplace transform to get the characteristic equation for the system. This method is attractive because a set of secondorder differential equations may be more manageable than the corresponding set of firstorder differential equations. Another way is to use energy as a means to get the characteristic equation, and this is also an attractive method for a complex system. In this project, all aforementioned methods were employed and an identical system matrix and characteristic equation were obtained. In this paper, only the linearization of second –order differential equation and subsequent Laplace transformation will be described.
Transfer functions relating the input torque (control torque) to desired output were obtained directly from the secondorder nonlinear equations of motion derived by the Lagrange’s method by ignoring the nonlinear terms [Ref 6].
In the previous section, equation was derived as:
+
(Eq. 4.37 Repeated)
By ignoring nonlinear terms, the equation reduces to:
(Eq 4.40)
u_{1} equation has been derived as:
(Eq. 4.38 Repeated)
By ignoring nonlinear terms,
(Eq 4.41)
u_{2} equation has been derived as:
(Eq. 4.39 Repeated)
By ignoring nonlinear terms,
(Eq. 4.42)
Equation (4.40), (4.41), and (4.42) can be put into a matrix form as follows:
(Eq 4.43)
The above form can be recognized as the form:
[Ref 6] (Eq. 4.44)
where M = mass matrix (inertia matrix)
C = damping matrix
K = stiffness matrix
= ndimensional configuration vector, whose elements are the generalized coordinates
= generalized force vector associated with
It can be seen that in Eq(4.43), damping matrix C is absent.
The differential matrix equation is linear, and its Laplace transform can be taken [Ref 3]
(Eq. 4.45)
(Eq. 4.46)
This can be solved for the vector by employing Cramer’s rule or a computer algebra system such as Maple.
The system matrix as seen in Eq. (4.46) is:
(Eq. 4.47)
The characteristic equation is the determinant of this matrix.
_{ } (Eq. 4.48)
In an attempt to use reasonable parameters for the numerical simulation, following values were used, which were taken from [Ref 14]
J = 13.35 (kgm^{2})
a= 0.40 (m)
L = 1.80 (m)
EI = 15.52 (Nm^{2})
The tip mass was chosen to be 1kg.
With these parameters, the characteristic equation becomes
_{ (Eq. 4.49)}
The roots of this equation are
From this, the frequencies that can be seen in the numerical simulation are
2.826 rad/sec
3.711 rad/sec
The natural frequencies of the system above are interpreted to mean that there are two vibration modes in the system. The first mode has the frequency of 2.826 radians/second and the period of 2.223 seconds indicating the oscillation in this mode completes one cycle in 2.223 seconds. The second mode has the frequency of 3.711 radians/second and the period of 1.693 second. These frequencies were confirmed by numerical simulation.
Figure 4.3: Position plot for antisymmetric initial condition
Figure 4.4: Position plot for symmetric initial condition
From the above figures, it was determined that the frequency of 3.771 radians/second was for the antisymmetric mode, and the frequency of 2.826 seconds was for the symmetric mode.
4.1.3 Confirmation of the Accuracy of the Model
The reliable method to confirm the accuracy of the mathematical model of a system is to check its consistency with the law of conservation of energy and angular momentum. That is, the total energy of a closed system must remain constant and the total angular momentum of the system with no external torque applied must also remain constant. To carry out this process of confirming the accuracy of the model, the total energy and angular momentum were calculated first.
The total energy of any system is
(Eq. 4.50)
where E = total energy
T = kinetic energy
V = potential energy
For the twodimensional flexible spacecraft considered in this project,
(Eq. 4.51)
=
+
(Eq. 4.52)
So,
E = + + (Eq. 4.53)
That the energy E was constant during the numerical simulation was confirmed with the fallowing parameters and initial condition.
J = 13.35 ()
a= 0.40 (m)
L = 1.80 (m)
EI = 15.52 ()
m= 1 (kg)
The simulation result for the above parameters and initial condition is shown below.
Figure 4.5: Total energy of the system with no energydissipating elements
The above figure implies that the mathematical model was accurate in terms of the energy point of view.
Simulation with the same parameters and different initial condition was also performed.
J = 13.35 ()
a= 0.40 (m)
L = 1.80 (m)
EI = 15.52 ()
m= 1 (kg)
Figure 4.6: Total energy of the system with no energydissipating elements
Figure 4.6 also confirms that the mathematical model is consistent with the law of conservation of energy.
The total angular momentum of the system was also checked. The angular momentum of the system was calculated referring to the model illustrated below.
Figure 4.7: Model of a flexible spacecraft system
The total angular momentum is the sum of the angular momentum of each massive element in the system: the central rigid spacecraft and the two masses at the beam tips.
(Eq. 4.54)
(Eq. 4.55)
By definition [Ref 1],
(Eq. 4.56)
=
where because the reference frame and the body frame are coincided at the origin
Also, the position vector of the mass is, as seen in the previous illustration, the following form, which is subsequently expressed in the reference frame.
(Eq. 4.57)
=
=
The time derivative of with respect to the reference frame was taken in terms of the body frame frame, which was then expressed in the reference frame as follows.
For an arbitrary vector [Ref 1],
(Eq. 4.58)
So for ,
(Eq. 4.59)
=
(Note: ==0)
=
=
= =
+
Then,
(Eq. 4.60)
Similarly for ,
(Eq. 4.61)
=
where
(Eq. 4.62)
=
=
The time derivative of is
(Eq. 4.63)
=
=
=
=
=
+
Then,
(Eq. 4.64)
Therefore the total angular momentum of the system is
(Eq. 4.65)
=
+
+
With no external torque applied on the system, the total angular momentum should be constant, which is indicated in the following equation [Ref 1].
(Eq. 4.66)
The system angular momentum was checked for symmetric, antisymmetric, and nonsymmetric cases.
Symmetric case:
Figure 4.8: Total angular momentum for a symmetric initial condition
The above figure shows that the total angular momentum is constant (plot in the fourth row). Since the initial condition is symmetric, the figure also shows that the angular momentum of the rigid central body stays zero .
Antisymmetric case:
Figure 4.9: Total angular momentum for an antisymmetric initial condition
The above figure shows that the angular momentum of the system is zero and is constant. Also the figure shows that the angular momentum of the spacecraft fluctuates since the initial condition is antisymmetric.
Nonsymmetric case:
Figure 4.10: Angular momentum plot for nonsymmetric initial condition
The above figure shows that the system angular momentum for a nonsymmetric initial condition also stays at zero throughout the simulation period.
4.1.4 Simulation Implementation
The equations of motion for a flexible spacecraft in two dimensions were implemented in the Attitude Simulation applet. Its interface is shown in Figure 4.11.
Figure 4.11: Applet Interface of Flexible Spacecraft in 2D Simulation
Outputs from MATLAB and the applet for the position and angular momentum are shown sidebyside in figures that follow. The outputs were obtained for symmetric, antisymmetric, and nonsymmetric initial conditions.

Figure 4.12: Position Plot for a symmetric initial condition

Figure 4.13: Angular Momentum Plot for a symmetric initial condition

Figure 4.14: Position Plot for an antisymmetric initial condition

Figure 4.15: Angular Momentum Plot for an antisymmetric condition

Figure 4.16: Position Plot for a nonsymmetric initial condition

Figure 4.17: Angular Momentum Plot for a nonsymmetric initial condition
4.2 Flexible Spacecraft in Three Dimensions
4.2.1 Derivation of Equations of Motion
To model a threedimensional flexible spacecraft, the same model as for the twodimensional model was used.
Figure 4.18: Flexible spacecraft model
The concentrated masses were constrained to only move in the 12 plane, but the body frame was allowed to orient freely with the reference frame. Therefore, in the two dimensional case, the angular velocity vector was , but in a three dimensional case, the angular velocity vector is.
Compared to the previously considered twodimensional model, the derivation process was quite similar except that the three dimensional case had two more degrees of freedom. Again Lagrange’s method was used to obtain the equations of motion.
The system potential energy comes from the deflection of beam cantilevered at the rigid spacecraft due to the displacements of the masses attached at the tips.
(Eq. 4.67)
Kinetic energy is
(Eq. 4.68)
where
=
and
=
=
With these preliminary calculations, the system kinetic energy becomes
(Eq. 4.69)
The Lagrangian is then
(Eq. 4.70)
=
+
+
With this Lagrangian, the standard form of Lagrange’s equation was used to derive the equations of motion of the system. The standard form of Lagrange’s equation is defined as [Ref 7] :
(i = 1,2,…, n) (Eq. 4.71)
where = those generalized forces not derivable from a potential function
Examples of typical such forces are frictional forces, timevariant forcing functions, and nonhohlonomic constraint forces.
In the case considered in this project, the generalized forces, not derivable from a potential function, are not present, so the righthand side of the equation is zero.
Generalized coordinates q_{i }are:
, , and are Euler angles, which define a sequenced simple rotation to locate the orientation of a rigid body with respect to a reference frame. The sequence of Euler angle rotation used in this project was 321 (or ). For reference, transformation matrix in terms of 321 Euler angles and kinematical differential equations in terms of 321 Euler angles are summarized below.
To be consistent with notations commonly used in published materials on spacecraft dynamics, Euler angles were defined as follows:
The transformation matrix for 321 Euler angle rotation can be obtained by multiplying transformation matrix of each successive simple rotation [Ref 3].
(Eq. 4.72)
where
(Eq. 4.73)
(Eq. 4.74)
(Eq. 4.75)
[Ref 3] (Eq. 4.76)
The reference to 321 Euler angle rotation can be found in [Ref 1,2,and 3].
Also for 321 Euler angle rotation,
(Eq. 4.77)
[Ref 3] (Eq. 4.78)
In a matrix form [Ref 1],
(Eq. 4.79)
(Eq. 4.80)
The Lagrange’s equations of motion are:
(Eq. 4.81)
(Eq. 4.82)
(Eq. 4.83)
(Eq. 4.84)
(Eq. 4.85)
The second order differential equations of motion were linearized by ignoring nonlinear terms [Ref 5], and replacing trigonometric functions with their smallangle assumptions. In order to get the smallangle assumption of sine and cosine, truncated Taylor series was utilized.
For a function f(x), truncated Taylor series about a point is
(Eq. 4.86)
Ignoring the secondorder or higherorder terms,
(Eq. 4.87)
=
Using the above formula, the truncated Taylor series of about is
(Eq. 4.88)
where
(Eq. 4.89)
Similar process was carried out to determine the smallangle assumption of sine function.
(Eq. 4.90)
where
(Eq. 4.91)
The set of secondorder equations was linearized using Eq (4.89) and Eq (4.91), and was put in a matrix form as follows. See the appendix for the detailed process of linearization.
+ = (Eq. 4.92)
The values of T_{1}, T_{2}, T_{3}, T_{4}, and T_{5} are arbitrary here.
In order to get the characteristic equation of the system, the Laplace transform of the lefthandside was taken.
(Eq, 4.93)
(Eq. 4.94)
The determinant of the above matrix gives the characteristic equation of the system and determines the natural frequencies of the system.
(Eq. 4.95)
If the same parameters were put in the equation as in the two dimensional case, the same frequency values should be obtained. This should be true since the state variables and are decoupled as seen in the system matrix.
The set of parameters for that condition is:
EI = 15.52 (Nm2)
a = 0.4 (m)
L = 1.8 (m)
Ixx = 45.42 (kgm)
Iyy = 35.42 (kgm)
Izz = 13.35 (kgm)
m = 1 (kg)
The characteristic roots are:
These are the same as the roots for the two dimensional model:
This result increased the confidence that the threedimensional model derived as descried in this paper was accurate.
The characteristic roots indicate that there are two modes that have the following frequencies and periods:
Mode1: 2.826 rad/sec (frequency), 2.223 sec (period)
Mode2: 3.711 rad/sec (frequency), 1.693 sec (period)
Simulation with the following initial condition was performed:
Figure 4.19: Numerical Simulation for a symmetric initial condition
To confirm the other mode, simulation was performed with the following initial condition:
Figure 4.20: Numerical Simulation for an antisymmetric condition
In the above figure, the period of 1.693 seconds is confirmed.
4.2.3 Confirmation of the Accuracy of the Model
For a torquefree motion of a rigid body with no internal energy dissipation and no external torques, the system energy and angular momentum should be constant. The energy of the threedimensional flexible spacecraft being modeled is calculated as follows.
The system potential energy comes from the tip mass deflections.
(Eq. 4.96)
Kinetic energy is
(Eq. 4.97)
So the total energy that is conserved during the numerical simulation is
(Eq. 4.98)
To confirm the conservation of system energy, numerical simulations were performed with the two different initial conditions. which are shown in Figure 4.21 and 4.22. Both figure show that the output is consistent with the law of conservation of energy.
Figure 4.21: System Total Energy for antisymmetric initial condition
Figure 4.22: System Energy for symmetric initial condition
In order to calculate the angular momentum, the following notation will be used.
For an arbitrary vector, ,
expressed in basis vectors
expressed in basis vectors
time derivative of with respect to [a] frame expressed in [b] frame
time derivative of with respect to [a] frame expressed in [b]
frame
The system total angular momentum is given by
(Eq. 4. 99)
where ()
=
(Noteis the transpose of the transformation matrix, which would perform the t ransformation from body frame to reference frame.)
(Eq. 4.100)
where
For convenience, the following definition was used:
,
,
Then the angular momentum calculation in a matrix format becomes
(Eq. 4.101)
Similarly for the second mass,
(Eq. 4.102)
where
For convenience, define:
,
,
(Eq. 4.103)
The total angular momentum of the system expressed in a reference frame is
(Eq. 4.104)
= +
+
The following calculations describes the detail of Eq(4.104).
For an arbitrary vector [Ref 1],
So for ,
=
(Note: ==0)
=
=
The time derivative of () is
=
=
=
In other words,
Above equations can be expressed in the reference frame by using the transformation matrix. Since there is no external torque acting on the system, the total angular momentum of the system should be constant.
Figure 4.3 shows that the angular momentum is constant for the following initial condition.
Figure 4.23: Angular momentum of the system for antisymmetric initial condition
Figure 4.24 shows the result of numerical simulation with the following initial condition, which shows that the angular momentum remained constant.
Figure 4.24: Angular momentum of the system for symmetric initial condition
4.2.4 Simulation Implementation
The equations of motion derived in this section were implemented in the applet, and its interface is shown below.
. F
igure
4.25: Interface of Flexible Spacecraft in 3D Simulation
Outputs from MATLAB and the applet for the position and angular momentum are shown sidebyside in figures that follow. The outputs were obtained for symmetric, antisymmetric, and nonsymmetric initial conditions.

Figure 4.26: Tipmass Position and Velocity Plot for a symmetric initial condition

Figure 4.27: Spacecraft Euler Angle Plot for a symmetric initial condition

Figure 4.28: Angular Momentum Plot for a symmetric initial condition

Figure 4.29: Tipmass Position and Velocity Plot for an antisymmetric initial condition

Figure 4.30: Spacecraft Euler Angle Plot for an antisymmetric condition

Figure 4.31: Angular Momentum Plot for an antisymmetric condition

Figure 4.32: Tipmass Position and Velocity Plot for a nonsymmetric condition

Figure 4.33: Spacecraft Euler Angle Plot for a nonsymmetric condition

Figure 4.34: Angular Momentum Plot for a nonsymmetric condition
The attitude simulation applet developed in this project has been deployed on a website managed by the Cal Poly Advanced Technology Lab (ATL), which is shown in Figure 5.1.
F
igure
5.1: The Applet on the World Wide Web
The file structure in the server for the deployment of the applet is shown below.
Figure 5.2: Server file structure
In the third tier, external_jar file contains the external packages to be loaded with the applet in a jar compressed format, jat file contains the AttitudeSimulator.class with the jat package structure preserved, and jat_jar file contains the jat packages in a jar compressed format to be loaded with the applet itself.
The first objective of adding more scenarios to the attitude simulation applet and deploying it on a Website was achieved, and a new task of developing the attitude package in JAT was initiated in this project. In the future, more options may be added to the applet such as changing the number of reaction wheels/CMGs, selecting different reaction wheels/CMGs configuration, providing different control scheme, and selecting different external torque environment. All these are reasonably feasible because the Java programming language is objectoriented in nature, and adding new features to the existing code should be relatively easy. Once the applet is fully operational on a Web site, an instructor may use it in the classroom to demonstrate the principle of spacecraft attitude dynamics to students.
1. Wie, Bong, Spacecraft Vehicle Dynamics and Control, AIAA Education Series, VA, 1998
2. Wiesel, William E., Spaceflight Dynamics, Irwin McGrawHill, 1997
3. Sidi, Marcel J., Spacecraft Dynamics & Control—A Practical Enginering Approach, Cambridge University Press, 1997
4. Kane, Thomas R., Likins, Peter W., and Levinson, David A., Spacecraft Dynamics, McGrawHill, Inc. 1983
5. Meirovitch, Leonard, Methods of Analytical Dynamics, McGrawHill Book Company, 1970
6. Meirovitch, Leonard, Computational Methods in Structural Dynamics, Sijthoff & Noordhoff, 1980
7. Greenwood, T. Donald, Principles of Dynamics—second edition, PrenticeHall, Inc., 1988
8. Walsh E., Aaran, and Gehringer, Doug, JAVA 3D API JumpStart, PrenticeHall Inc., 2002
9. Java 3D Tutorial Ch.0Ch.7
10. Cadenhead, Rogers., Sams Teach Yourself Java 2 in 24 Hours, Second Edition, Sams Publishing, 2001
11. Flanagan, David., Java in a Nutshell, fourth Edition, O’Reilly & Associates Inc., 2002
12. Bishop., Judith M., and Bishop ., Nigel T., Java Gently for Engineers and Scientists, Pearson Education Limited 2000.
13. Wie, Bong., and Bailey, David, Rapid “Multitarget Acquisition and Pointing Control of Agile Spacecraft”, Journal of Guidance, Control, and Dynamics, Vol. 25, No.1, JanuaryFebruary 2002
14. Ge. T. H. Lee and F. Hong, Variable Structure Maneuvering Control of a Flexible Spacecraft, Proceeding of the American Control Conference Arlington, VA June 2527, 2001
15. The Open Source Definition, http://www.samurajdata.se/opensource/mirror/docs/definition.html, Open Source Initiative (OSI), Aug 9, 2003
16. Basic Introduction to CVS and SourceForge.net (SF.net) Project CVS Services, http://sourceforge.net/docman/display_doc.php?docid=14033&group_id=1, Open Source Development Network, 2003
17 What is SourceForge.net?, http://sourceforge.net/docman/display_doc.php?docid=6025&group_id=1, Open Source Development Network, 2003
18 Java 3D API Home Page, http://java.sun.com/products/javamedia/3D/, Sun Microsystems, Inc., 2003
19 eclipse.org, http://www.eclipse.org/, 2003
20 Cvs Gui, http://www.wincvs.org/, 2003
21 Java Astrodynamics Toolkit (JAT), http://jat.sourceforge.net/, The JAT Project, 2003
22. Quock, Daniel L., WebBased Tools for Spacecraft Attitude Dynamics and Control Simulation, A Thesis Presented to the Faculyty of California Polytechnic State University, August 2001
23 Beer,Ferdinand and Johnston, Russell, Mechanics of Materials—2^{nd} edition, McGrawHill, Inc.
1. Equations of Motion for the Flexible Spacecraft (2D case)
2. Linearization of Equations of Motion (3D case)
3. Java code
3.1 jat.attitude
3.1.1 DegToQuat.java
3.1.2 QuatToDeg.java
3.2 jat.attitude.eom
3.2.1 RConstantTorque.java
3.2.2 RGGCircularOrbit.java
3.2.3 RsphericalDamper.java
3.2.4 FourRWManeuver.java
3.2.5 CMGManeuver.java
3.2.6 BangBangTwoD.java
3.2.7 FlexibleTwoD.java
3.2.8 FlexibleThreeD.java
3.2.9 EomTest.java
3.3 jat.attitude.util
3.3.1 AnimationWindow.java
3.3.2 AnimationWindow2.java
3.3.3 JTextFieldPanel.java
3.3.4 TextFieldPanel.java
3.4 jat.attitde.thesis
3.4.1 AttitudeSimulatorA.java
Appendix 1 2D Flexible Spacecraft Equations of Motion
Appendix 2 Linearization of Equations of Motion (3D)
Previously the 2^{nd} order equations of motion were derived directly from Lagrangian function as:
(Eq. 4.92)
(Eq. 4.93)
(Eq. 3.2.29)
(Eq. 3.2.210)
(Eq. 3.2.211)
By substituting in these equations the following values:
(Eq. 3.2.212)
(Eq. 3.2.213)
(Eq. 3.2.214)
(Eq. 3.2.215)
(Eq. 3.2.216)
To further simplify the hand calculation, equations were further simplified with the following substitution and side relations.
,
The simplified equations are
(Eq. 3.2.217)
(Eq. 3.2.218)
(Eq. 3.2.219)
(Eq. 3.2.220)
(Eq. 3.2.321)