Let's derive the equations of motion of a rigid body. We know how to describe the orientation of a rigid body. We have Euler angles, we have DCMs. We've got and CRPs, MIPs. All these things and we always have differential equations and how they relate back to omega. If the omega is not just prescribed or measured, if you really have a free tumbling body. You kick off the satellite from the rocket. What happens as it gets released? I need to be able to mathematically predict how omega will evolve, and that means I need to find differential equations for omega. And what we're going to use always, for translation, we use f equals ma essentially. That's what it boils down to, that's one of the forms. Here, for rotation, we always go back to H dot equal to L. And so, here, H is taken about the center of mass. So, we know H dot equal to L holds. And L is the torque. About of all the extra influences about the center of mass of the system. So okay if we know it's the inertia derivative of H that is equal to this equal to this torque. So we have to be now a little bit careful in how we derive this. I've chosen to take a body relative derivative of this plus now, I have two omega b, relative to n, crossed with that h vector again, right. The transport theorem isn't just for positions and velocities and so forth. It's true for any vectorial quantity that you're differentiating, as seen by a rotating frame. Angular momentum counts as also a vector. So this is true. Now why did we choose to do the body frame derivative of this? If we do this, and I just use chain rule, we know h we defined as being the inertia about point c times omega. So that's two terms. And taking the time derivative of this chain rule, right? You get the derivative of the first term plus the derivative of the second term with the right multiplications. That's good, now it says this is going to become equal to i omega dot. There's two steps in this one little equal sign. What happens to this part? What happens to body frame derivative of the inertia tenser? Jordan. >> Finishes. >> Why? >> Constant in time. >> So even if this thing is tumbling and spinning and going through space as seen by you inertial observers. The mass distribution keeps changing. This point is here, it's up, it's left, it's flat, it's all over the place right? That's why doing this derivative on any inertia tensers inertia frame you can do it. But it becomes a time varying quantity and you have to track all this stuff. And it gets harder. Whereas the derivative of the inertia tensor as seen by the body frame is trivial if it's rigid. Because in the mass distribution, as seen by myself, if I'm rigid and I'm rotating and doing stuff, that mass distribution is exactly the same. And this is going to vanish. If you had a deployable mass, you slowly having your solar panels from your cube sat and doing something. Then some servos that are moving them out. Well then you would have body relative derivatives and that's the point where you include extra terms, all of a sudden, into these equations. That's what gives you those extra stuff. So good, so that term vanished. Now here, this dot, Lewis, implies what type of derivative? >> It implies an inertial derivative. >> Here it's a body frame derivative. So how did I go from a body frame derivative to inertial derivative? >> Make the vectors consistent between the two. >> Right, this isn't omega of b relative to n. So therefore, the b framed derivative and the n framed derivative have to be the same. That's the one vector where you find this kind of stuff, where the derivatives between the two frames is the same if it's the angular velocity between the two frames. Because the omega cross product term always goes to 0. Exactly. So, if you want to be careful, show all these steps. In an exam don't just go from here and that's clearly this. I'm, you can be missing points. I want to see all these sub steps. Argue every case as you understand, this is why this goes to zero here. And argue correctly why this other one goes to this, right? So, good. So, the body around this derivative is just going to be i*omega-dot. Plus this cross-product term. So, we're almost there. Now, you put this together and you get this differential equation. I put this cross-product, H=Ic, so I have omega cross is the same thing as omega two the h. That's essentially how we got to this last step. I took it over to the right hand side, so I have i omega that is equal to minus omega til the i omega plus l c. That's the classic orders rotational equations of motion. This is what predicts now, in your integration, how does my omega evolve in time. And for a rigid body, tumbling like this, there's two aspects. One is, this is a gyroscopic. And you notice, it's omega and omega, so it's omega squared, is essence. And it's a second order term. If you look at linearized departures, you miss all of this stuff, it just vanishes. So, this is the quadratic, this is your gyroscopics and you'll see different ways this manifests itself. The other part is our external torque, and that's it and it looks really simple. Why did this become so hard so quickly sometimes? Well, we'll talk about different ways to write this. This form, we have a nice, generic i. So, we can have a principle coordinate frame as we talked about earlier. Or we can have any body fixed frame. This can be a regular 3 by 3 matrix representation and it will work, all right. So, this is a very general format. So in your integration, I would recommend this is the equation you should implement because that way you're solving always the most general case and the easier cases become sub classes of that. If you pick, sorry Jordan? >> Quick notational question, you have sub scripts on l and h but you don't have them on i? >> Yeah. Is that purposeful? Or wouldn't you [CROSSTALK]. >> Just lazy. >> Same point? >> I was just lazy. >> Okay. >> If you want to keep track, I do recommend. If you want to keep track of them, this has to be the inertia about point C in this case. If you wanted to keep track of that. For these kind of rigid body dynamics, people very quickly drop them and it's just implied. But it's a subtlety. If you have multi body stuff and you take in moments and torques about you know, there's a different body fix point, there's a docking port point. Definitely keep track of those suckers, because it's easy to get it mixed up when you're adding these things. So here I just dropped it out of convenience, this is, you see this a lot actually in the notations, they don't declare themselves as being lazy, but [SOUND] I don't care. Okay, so we have this. Now, let's say we have a principal corded frame. As we were hearing earlier, that means all the matrix representation of this tensor will just have diagonals. Lots of off diagonals go to zero. And the same thing here. So, omega I omega will just become i1 omega 1, i2 omega 2, i3 omega 3. Really simple. And then that 10 to the omega 2, you carry out this math and you up with these equations. So, these are equivalent to these equations, this just assumes I've chosen principal axes of the body. Whereas this allows for any body fixed axises. So, yes integration wise this is what you use. But, in analysis we often find it much easier to just look at this. And in fact we will be using these equations a lot here coming up. The torque free motion and discuss different things. So, you can see the classic kind of results and L, L 1 2 3, is basically, this is all taken in a body fixed frame that's principle. So, these are the same vector components with respect to that frame And then we go. So, you can see now for example, if you have a axis symmetric body, we talked earlier about different shapes. because if you have a cylinder, a rocket body, a lot of things in space tend to be barrels because everything fits in a rocket. Well the rocket itself is kind of a barrel shape, it has an axis of symmetry. In that case two principle inertias will always be equal. So since in here the gyroscopics are all these differences of two principle inertias you know right away [INAUDIBLE] metric bodies one of these gyroscopic terms is going to vanish right and that's an insight to have. I'll see this in a few cases that we'll look at. Now let's talk about how to integrate these things. One question I have for you is, does, we've derived differential nematic equation, just MRPs. We know sigma odd is equal to one over four b times is omega vector right. So omega appears defiantly going to need that. Otherwise we just need sigma Here, I need omega, omega, the inertia, it's a rigid body so with relative to B frame, this is a fixed inertia tensor. And then, you have external torques. Nowhere in here do you see sigmas, or quaternions, or any attitude measure. So if I have two differential equations, the question then becomes can you integrate just omegas first and then do the attitude? Or should you aways be integrating omegas in attitudes simultaneously? [SOUND], I see some wrinkles now, okay, good. Can we do it? The sigma starts omega. So, you know you can't do sigmas first, but I could do omegas first, integrate forward and then use that answer and then separately integrate omegas. What do you think? Andre? >> I'd say simultaneously. >> Because? But you delivered the question. >> I know. [LAUGH] >> Hopefully you're good enough at by now where you know I'm asking you a trick question. And B, the gut feeling probably is I know simultaneous should definitely work. Separating, now you need to argue a defense why was that valid, right. There's simple answers, definitely. I would also do it simultaneously, but why. Is it ever okay to just integrate omegas? And then do that. Daniel. >> Don't have torques. >> Okay. Torque free motion. If I have torque free motion, I don't have my that works only here. If I don't have the torque, absolutely. You could just integrate omega. Now in my codes, let me just say upfront, I always do it simultaneously. Just, that's the most general answer, right. And I don't want to write code for these cases when I have no torque or here I have torque. If I do them simultaneously, it doesn't matter if I have torque or not. But absolutely, you could do that but let's say we do have torque. I have some thrusters I'm firing. There's two thrusters, four thrusters, they're firing. They're producing a torque. Can you still integrate the omegas first and then apply them to the sigma dots? Need to have a situation where your angular rates aren't coupled to your actual angle, itself, right? >> Well, yes, the angular accelerations we're worried about. It's omega dot. Does omega dot couple with the angles? This will never make it couple with angles. This never makes it couple with angles. The only term that could make us couple with attitudes Is this. My example with thrusters. If I'm firing pairs of thrusters that produce a torque and spin it, does that matter now on the altitude? The thrusters are body fixed, so I get this torque. If I spun around, then I thrust again, relative to the body, you always get in the same torque, it's actually just going to show up a bunch of constants, no attitude dependence that works. Give me a torque that is attitude dependant. >> Gradient. Spencer. >> Solo radiation pressure. >> Solo radiation pressure. Right. Daniel, talking about atmospheric drag, those effects. Gravity gradients. There's all these kind of disturbances, often environmental. All of a sudden, you need the attitude. And then, whoa, now it matters. When we do another thing [INAUDIBLE] as humans, we will be developing feedback control, and even the simplest form the torque, we come up with a thruster control torque, which is minus a gain times attitude error minus a gain time rate error or something very simplistic like that, right? And all of a sudden, through our algorithm, we're coupling in our attitude. because we want to point here, not just come to rest over here, right? And the thruster firings will be a function of attitude. So yes, so when you look at these things and it's a good PHD prelim oral questions. There are ways we can one way decouple them and solve omega separately and doing that parallel as Andre was saying. Absolutely your gut feeling is right. That's probably the way it always will work and in fact that's how you should program it. And the way attitude couples into it, thought, is only through this part, which could be environmental effects like drag, SRP, gravity gradient or also we could external torques. That's our control solution, all right? That's what's producing these things. And that's where attitude couples in as well.