LET'S LEARN ABOUT DYNAMICS
Oct. 6th, 2008 09:53 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Ok, this isn't the end of the week, but I thought this was something fun to share with ya'll. The kind of stuff I remember hearing and thinking, "HELL YEAH I WANT TO BE AN ENGINEER THAT ROCKS".
Alright, so it might not have the same effect on you, but at least it helps me recover from the result of my last exam grade. Ha.
So, dynamics all about reference frames. You have no frame of reference, you have chaos and doom. And chaos and doom tends to be something that should be avoided, typically, particularly when you're dealing with vehicles that might be flying around. Especially if you're in said vehicle.
The things you need to understand about reference frames is that they're imaginary axes so you can define a position. It's real simple if something isn't moving, once you've defined up and down and that crap, it's in that position. No issues. The complication comes when it's moving, particularly in three dimensions. Because up and down is going to change, particularly if it's something that's spinning or otherwise not being a perfect little point mass.
So you create two reference frames; one for something that isn't moving (we call this an inertial frame), and another stuck on the object itself (this is called a body frame). Think of the inertial frame as some dude on the ground just chilling and the body frame as his skateboarder friend flipping around; even with all the flipping around the skater is doing, his head is still going to be in the same place in relation to his feet, etc. If this isn't the case, he's probably an alien and you should get the hell away.
It'll look something like this in lame terms:

The frame on the left won't move, whereas the frame on the the right can go wherever the hell it wants, so long as all the axes stay at 90 degrees to each other. Like the corner of a box.
Now that you have a basic rundown of frames, let's get to gimbals. Anyone that's seen the Apollo 13 movie, you remember where they're flipping out and say the word "gimbal" a lot and there's some
technobabble? Well, half the reason the movie is so popular with us nerd types is they did their research. Gimbals are nifty little things that kind of serve as ways to see your reference frames without having to do the math. Because doing the math for EVERY maneuver would blow. Seriously. My average Dynamics problem takes me a couple hours to do. When your spacecraft needs to get into a different orbit and shit's not working like it should, the LAST thing you want to do is some integral matrix math.
So they made this nifty attitude indicator:

Which tells you where you are. Now, it's reliant on some initial conditions--basically shit to make up your inertial frame. This was determined from old school sailor tricks, like using stars that don't move (well, to us) as points of reference. Usually using something nifty like this:

It's called a sextant. The way Professor California says it made me want to giggle.
Any, so how does this crazy ball thing and that crazy sailor tool thing tie into the ridiculous amount of matrix math I'm using? Well, there's something called Euler angles, which are used to define rotations between coordinate frames. Because no matter how crazy your skater dude is, at any point in time, he's basically just a few simple rotations from the inertial frame. Which is kind of wild if you think about it. Even more wild is what google produced for my Euler angle diagram:

WILD. Anyway. Ignoring that crazy diagram, you're going to end up with a matrix full of sines and cosines, because the nifty thing called a right triangle makes it easy to find out where everything is. Particularly if you've have five years of engineering study:

Now, pretending that the c's and s's say sine and cosine, you can how that would take some slide-ruling to figure that all out. But that is just for a fixed point. The reeeeally nifty stuff comes in when it's moving. Because that matrix, which is like a switch between inertial and body frames? You have to integrate. This is why your computer being down is bad. And a particular problem with the gimbal is called "gimbal lock" which fucks you over even more because even if your computer is running, it'll be feeding the wrong values and doing the wrong integrations. Now, this sounds like a mechanical problem, and to some extent it is.
But in truth it's mostly mathematical.
No way! Alright. Basic mathematical principle. I'm talking like algebra here. You can't divide by zero. You can technically, but it's not a number, it's an idea. A divide by zero error can fuck up a LOT of things. But in this case, the red circle on that crazy ball thing? That indicates where gimbal lock would happen, if it lines up with the center, which is like the viewing point for someone reading it. What that point represents is a place where one of the Euler angles equals 90 degrees, and hence the cosine equals zero, hence something gets divided by zero (for reasons I didn't go into, because the equations might frighten a few of you), which means the integrals go "OMG WTF".
So, the moral of this story:
- Don't divide by zero, you could crash and die.
- Some technobabble in movies is based on real things
- Jim Lovell would have made a good pirate
- This icon makes more sense now, doesn't it?
P.S. OMG EULER ANGLES IN MOOOOTION:

Alright, so it might not have the same effect on you, but at least it helps me recover from the result of my last exam grade. Ha.
So, dynamics all about reference frames. You have no frame of reference, you have chaos and doom. And chaos and doom tends to be something that should be avoided, typically, particularly when you're dealing with vehicles that might be flying around. Especially if you're in said vehicle.
The things you need to understand about reference frames is that they're imaginary axes so you can define a position. It's real simple if something isn't moving, once you've defined up and down and that crap, it's in that position. No issues. The complication comes when it's moving, particularly in three dimensions. Because up and down is going to change, particularly if it's something that's spinning or otherwise not being a perfect little point mass.
So you create two reference frames; one for something that isn't moving (we call this an inertial frame), and another stuck on the object itself (this is called a body frame). Think of the inertial frame as some dude on the ground just chilling and the body frame as his skateboarder friend flipping around; even with all the flipping around the skater is doing, his head is still going to be in the same place in relation to his feet, etc. If this isn't the case, he's probably an alien and you should get the hell away.
It'll look something like this in lame terms:

The frame on the left won't move, whereas the frame on the the right can go wherever the hell it wants, so long as all the axes stay at 90 degrees to each other. Like the corner of a box.
Now that you have a basic rundown of frames, let's get to gimbals. Anyone that's seen the Apollo 13 movie, you remember where they're flipping out and say the word "gimbal" a lot and there's some
technobabble? Well, half the reason the movie is so popular with us nerd types is they did their research. Gimbals are nifty little things that kind of serve as ways to see your reference frames without having to do the math. Because doing the math for EVERY maneuver would blow. Seriously. My average Dynamics problem takes me a couple hours to do. When your spacecraft needs to get into a different orbit and shit's not working like it should, the LAST thing you want to do is some integral matrix math.
So they made this nifty attitude indicator:

Which tells you where you are. Now, it's reliant on some initial conditions--basically shit to make up your inertial frame. This was determined from old school sailor tricks, like using stars that don't move (well, to us) as points of reference. Usually using something nifty like this:

It's called a sextant. The way Professor California says it made me want to giggle.
Any, so how does this crazy ball thing and that crazy sailor tool thing tie into the ridiculous amount of matrix math I'm using? Well, there's something called Euler angles, which are used to define rotations between coordinate frames. Because no matter how crazy your skater dude is, at any point in time, he's basically just a few simple rotations from the inertial frame. Which is kind of wild if you think about it. Even more wild is what google produced for my Euler angle diagram:

WILD. Anyway. Ignoring that crazy diagram, you're going to end up with a matrix full of sines and cosines, because the nifty thing called a right triangle makes it easy to find out where everything is. Particularly if you've have five years of engineering study:

Now, pretending that the c's and s's say sine and cosine, you can how that would take some slide-ruling to figure that all out. But that is just for a fixed point. The reeeeally nifty stuff comes in when it's moving. Because that matrix, which is like a switch between inertial and body frames? You have to integrate. This is why your computer being down is bad. And a particular problem with the gimbal is called "gimbal lock" which fucks you over even more because even if your computer is running, it'll be feeding the wrong values and doing the wrong integrations. Now, this sounds like a mechanical problem, and to some extent it is.
But in truth it's mostly mathematical.
No way! Alright. Basic mathematical principle. I'm talking like algebra here. You can't divide by zero. You can technically, but it's not a number, it's an idea. A divide by zero error can fuck up a LOT of things. But in this case, the red circle on that crazy ball thing? That indicates where gimbal lock would happen, if it lines up with the center, which is like the viewing point for someone reading it. What that point represents is a place where one of the Euler angles equals 90 degrees, and hence the cosine equals zero, hence something gets divided by zero (for reasons I didn't go into, because the equations might frighten a few of you), which means the integrals go "OMG WTF".
So, the moral of this story:
- Don't divide by zero, you could crash and die.
- Some technobabble in movies is based on real things
- Jim Lovell would have made a good pirate
- This icon makes more sense now, doesn't it?
P.S. OMG EULER ANGLES IN MOOOOTION:

(no subject)
Date: 2008-10-09 01:56 am (UTC)That diagram and that matrix kinda make me feel ill inside.
I could never get excited about stuff like this. XD
I tried to explain to my little sister at one point about how you can't divide by zero, and she just looked at me like "Why?"
I was finally like "*splutter splutter* You just--you just CAN'T! THE WORLD WILL END."
(no subject)
Date: 2008-10-09 02:53 am (UTC)(no subject)
Date: 2008-10-09 11:55 pm (UTC)