- Joined
- May 23, 2008
- Messages
- 1,785
- Reaction score
- 0
- Points
- 36
Hi guys!
I'm working on a little project to try and simulate gravity gradient torque for a generic spacecraft. I'm doing my work right now in MATLAB to try and develop the mathematics needed to get all of this right. However, I've run into a little snag and I was hoping someone can show me where I might be going wrong.
If we assume the vehicle is a rigid body and I set up a body-fixed coordinate system along principle axis, then I have Euler's Equations of Motion:
...where "M_n" are the torques around x, y, z axis, "Inn" are principle moments of inertia, and "omega_n" are angular rates about x, y, and z axis. Note that I'm using lowercase x, y, and z for the body axis.
Now, if I am just looking at gravity gradient torques, then I can describe the left-hand side of Euler's Equations by the following (which I take from Curtis' "Orbital Mechanics for Engineering Students"):
Here, "muEarth" is the gravitational parameter of the Earth (but it could be whatever body I'm interested in), "R" is the radial distance from the CoM of the Earth to the CoM of the spacecraft, "Rn" are the x, y, z components of that R, and "Inn" is as above.
So, when I take these moment equations and plug them into Euler's equations, I get first order differential equations I can numerically integrate over time. Great. (From here I can go on to the kinematic equations and get the actual vehicle attitude, but bear with me.) However, I would expect that in a system where I only have gravity gradient torque, the torques would damp out eventually as the vehicle settled into an equilibrium position. That's not what I'm seeing, however: my calculations show that the angular rates of my vehicle actually grow over the course of a week or so! This can't be right.
Let me pose two questions:
1) I am not taking orbital motion into account, and thus I am not taking into account the attitude changes one would get as Earth "falls under" the spacecraft while in orbit. Is this important?
2) The distance vectors I'm using for the M_n_g gravity gradient torques are body frame vectors. Is this correct?
I can post some output if anyone would like. Can someone help me?
Thanks!
---------- Post added at 01:27 PM ---------- Previous post was at 11:34 AM ----------
Say, for example, I use the following initial conditions:
omega_x = omega_y = omega_z = 0
phi_x=pi/6
phi_y = phi_z = 0
...where phi_n are the euler angles.
In particular, here's what I see when I use an RK4 integration scheme on the above equations (with a 312 Euler angle kinematic equation thrown in):
I am perplexed, to say the least.
I'm working on a little project to try and simulate gravity gradient torque for a generic spacecraft. I'm doing my work right now in MATLAB to try and develop the mathematics needed to get all of this right. However, I've run into a little snag and I was hoping someone can show me where I might be going wrong.
If we assume the vehicle is a rigid body and I set up a body-fixed coordinate system along principle axis, then I have Euler's Equations of Motion:
Code:
M_x = I_xx * omega_x_dot + (Izz - Iyy)*omega_y*omega_z
M_y = I_yy * omega_y_dot + (Ixx - Izz)*omega_z*omega_x
M_z = I_zz * omega_z_dot + (Iyy - Ixx)*omega_x*omega_y
Now, if I am just looking at gravity gradient torques, then I can describe the left-hand side of Euler's Equations by the following (which I take from Curtis' "Orbital Mechanics for Engineering Students"):
Code:
M_x_g=((3*muEarth*Ry*Rz)/R^5) * (Izz - Iyy)
M_y_g=((3*muEarth*Rx*Rz)/R^5) * (Ixx - Izz)
M_z_g=((3*muEarth*Rx*Ry)/R^5) * (Iyy - Ixx)
So, when I take these moment equations and plug them into Euler's equations, I get first order differential equations I can numerically integrate over time. Great. (From here I can go on to the kinematic equations and get the actual vehicle attitude, but bear with me.) However, I would expect that in a system where I only have gravity gradient torque, the torques would damp out eventually as the vehicle settled into an equilibrium position. That's not what I'm seeing, however: my calculations show that the angular rates of my vehicle actually grow over the course of a week or so! This can't be right.
Let me pose two questions:
1) I am not taking orbital motion into account, and thus I am not taking into account the attitude changes one would get as Earth "falls under" the spacecraft while in orbit. Is this important?
2) The distance vectors I'm using for the M_n_g gravity gradient torques are body frame vectors. Is this correct?
I can post some output if anyone would like. Can someone help me?
Thanks!
---------- Post added at 01:27 PM ---------- Previous post was at 11:34 AM ----------
Say, for example, I use the following initial conditions:
omega_x = omega_y = omega_z = 0
phi_x=pi/6
phi_y = phi_z = 0
...where phi_n are the euler angles.
In particular, here's what I see when I use an RK4 integration scheme on the above equations (with a 312 Euler angle kinematic equation thrown in):
I am perplexed, to say the least.