Expressing Vectors in Different Frames Using Rotation Matrices

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome to another video today I'd like to talk about expressing vectors in different frames as well as how to translate from one frame to another using rotation matrices as we don't deeper into our study of kinematics and dynamics we're gonna see that often it's really convenient to have multiple coordinate frames and we're going to need tools and notation to be able to write down and express a vector in any arbitrary frame as you know I like to use examples to motivate our discussions and I also like to fly unmanned aircraft so let's see if there's a way that we can combine the two of these so if this sounds like more fun to you than a tour of Willy Wonka's chocolate factory I guess the kind where nobody meets their gruesome fate then let's get this in the air in this scenario let's consider a situation where all I want to do is describe a vector so let's use this jar to denote the start of the vector and that star to denote the end of the vector what we can now do is use this red rope here to connect the start of the vector to the end of the vector and maybe let's call this red line the vector P now that we see this vector P the next thing we'd like to do is ask someone to describe this vector P so in this case we're going to ask this guy named Fred so I'm putting on this hat with the label Fred so you can see it from his perspective so we're really asking Fred to describe how to go from the base of the vector to the tip so this requires Fred to attach a coordinate system so we can specify the x axis there and the y axis there and in this situation I guess the z axis goes into the page so what Fred can do now is he can measure how far does he have to walk along his x axis and how far along does he need to walk in his Y axis to go from the base to the tip and he says oh you need to go 1.88 meters in the X and negative zero point six eight meters in the Y now let's repeat this but ask a different observer so this observer let's call him Joe so I'm gonna switch hat so I have this green hat with a new label that says Joe and Joe is going to use a slightly different coordinate system here so it has the same z axis as you see here but it's aligned slightly differently now we can again have Joe put down what he thinks is an x-axis there and what he thinks is a y-axis there and like we said they share z-axis with both Joe and Fred now we ask Joe here to make the same measurement namely how do you go from the base of the tip so he measures how far do I need to go in my x-axis and how far do I need to go in my y-axis and he says oh you know what you just need to walk two meters in the x-axis and zero meters in the Y so something is clearly inconsistent this is the exact same red vector here but they don't appear to be numerically the same okay so we see here that the thing that's lacking here is actually is our notation here because clearly we saw that this vector from Fred from Fred's perspective right - or sorry positive 1.88 and - 0.68 this is clearly not equal to what Joe saw here right so here was Fred and here was Joe so what would be better here is we apparently need to adopt some notation where we can discuss having a vector which we called P here and we're gonna now need to denote which frame am i trying to express this in using numeric values so we're gonna adopt a right superscript here so I'm just gonna use our here for an example here so what does write superscript R means is this is going to be the vector P but it's numerically expressed in F ours I guess it American Express in fr-s maybe a better way to put this here right so the value is the first value in here is going to be the how far you go along the x value in frame F R the second value is gonna be how far you go along the Y value of a frame are here so in this case to make this a little bit less ambiguous right we really should have written here that this vector P from Fred's perspective here is one point eight eight and minus zero point six eight and the vector P from Joe's perspective is two zero and zero here okay so this will clear up a little bit of some of this ambiguity here so again let's use this right superscripted to know which frame of given vector is expressed in numerically here right okay so now that we've got this down the next thing that we should maybe talk about here is clearly there's some relationship between I mean both of these are talking about the exact same vector it's just from a different perspective here right so there must be some way to translate between Joe's reference frame and Fred's reference frame here so this leads to a discussion here now of rotation matrices here so let's talk about rotation matrices okay let me erase some of this board here so we get a little bit more space here okay so what we're talking about here is we need the mathematics here to be able to translate a vector that's expressed in one frame to it being expressed in another frame here so let's go again consider that same vector let's call it P here but maybe let's write this in three dimensions here so I'm gonna try to draw this now and let's draw a coordinate frame in three dimensions here so let's do it like this here so here's the X hat R here's Y hat R and then the right-handed coordinate system is something like this so here's Z hat R so here is frame F R here right so all of these are right angles so here's a right angle here here's a right angle here and the last right angle is kind of kind of like this I think I think everyone gets the picture hopefully right so this is my right-handed coordinate system of x y&z going down here right so what I'd like to do now is again let's consider a vector P here I'm just going to draw it like such and then we'll try to decompose it in just a second here so here's this vector let's call this vector P I'll put a bar here so we can denote that and let's see if we can make this slightly understandable here so I'm going to project this vector up here into the XY plane here so there's going to be component like this and like like this so you can think about this I guess if you wanted to project this red vector into this plane right it would have some kind of a footprint like this right you could kind of see what that's looking like here and then finally let's also project the the Z component of it onto this z axis so let me see so graphically that's gonna I guess it's gonna be parallel to sort of well no actually no sorry it's getting paralyzed with this line here right this light so it's gonna go back like this okay okay so let me now pick up a different color here because what I'd like to show here I know this is a little bit confusing but again think about this here this vector P it's just a vector in three space and now I've attached some coordinate frame F R to this thing here right so why I wanted to project it on all of these these axes x y&z here is so I can draw let's try to draw this in green here maybe like a vector here let's call this vector a and then I'm going to draw a vector B which goes along the y axis here like this let's call this vector B and then finally a vector that goes along the z axis like this and let's call this vector C okay so that's the picture that goes along with this here the reason I'd like to do it like this here is because now we can write from a vector mechanics perspective here that this vector P that I'm interested in right it's just the the vector addition of a plus B plus C here right so I think you wouldn't argue with this a plus B plus C and notice right now I don't have any right superscript here so I'm not actually trying to express this vector in this coordinate frame yet I'm just saying from a vector addition perspective you just have these these vectors a plus B plus C if you add them tip the tail you'll end up with a vector P here right okay now this thing is gonna get a little bit ugly so tell you what let's just draw this in only the XY viewpoint right let's just draw it in the XY plane so let's let's redraw in the X hat our Y hat our plane okay so we - copy that diagram here so what we're gonna end up with here is let's let's draw this here so I got X whoops I mean I want this to be straight up and vertical so let me try not to be sloppy here so here's here is my X hat R and then I've got maybe let's make this a little bit bigger because this is actually gonna take up some space here and be important in a second here okay so here's Y hat our ok and then let's draw the vector P it's gonna look a little bit something like this here right so we're gonna have a P here's my vector my red vector P here and now I guess here if I want to draw some of these dashed lines here right so that here's a dashed line that comes like this here's the dashed line that goes like this here all right and then I can draw the vector a which was basically the projection of this vector onto this x-axis here right so here's my vector a ok here's vector a and then here's vector B down here and vector C is going into the page here right so here's uh here's why I guess yeah C is like that here I guess we should also write that Z hat R is going into the page here right ok great ok ok so again this is the same picture here but it's just looking at in the XY plane here ok so you can think about this this vector P it's tilted into the board here right it has some component along the z hat our direction right so it's going down here but obviously I can't draw this in a two-dimensional view so what I want to do now here is let's go ahead and say that this distance here right the length of this vector a here along the X hat our direction let's call this thing alpha here so I'm going to draw it like this just to show like this distance here right let's call this alpha units here right let's now call it beta units of in is the length of the vector B here right so this length here let's draw it like this in blue here this is going to be beta units okay and then similarly the length of the C vector I guess I can't really draw it here but let's call this thing gamma units so you got alpha beta gamma here right that's the numerical values here are the lengths of these vectors okay so the reason I want to do that here is because now what we can do is let's consider expressing p in FR okay so in other words what i wanted right here is I want to say P in R right that's well we said this is a plus B plus C here but if I want to add these things numerically they all have to be in the same coordinate frame right so I need to put superscript ours on all of these right so if I want to add them all together and make the numerical values match here they all better be in the exact same coordinate system here right okay so let's think about this here okay what is this thing here so let's look at each vector come each component one at a time a and our here so this is the vector a expressed in frame R so what we're trying to do here is I need three numbers here the first number tells you if I want to describe this vector a how far do I go in X hat r's direction then how far do I go in X hat wise direction and then how far are sorry sorry maybe it's all right let me write this down this is the X hat our component right this is the Y hat our component and this is the z hat our component here right so this first numerical value is how far do I walk in the X our direction X hat our directions well we just said right here you walk alpha units in that direction here how far do you go in the Y direction well lucky for us at zero and it's zero down here as well right okay great so here's how you would express this vector a in the frame F our component right let's do the same thing for BR so BR right it's the exact same thing the vector B here expression frame army is how far do you walk in X how far do you walk and why and how far do you walk in Z well just from the geometry of the picture I think you'll agree that this is 0 beta 0 right similarly for see in our this is going to be zero zero gamma right so let's just put that in here for the left hand side here right so I basically just have alpha 0 0 + 0 beta 0 + 0 0 gamma right so at the end of the day what we end up with here is alpha beta gamma this is how you get or how you would describe this red vector P if you wanted to describing numerically using frame F R here right it says you go alpha units in X hat R then you walk beta units in Y hat R and then you walk gamma units and Z hat R and that will get you from the base of the vector to the tip of the vector here right okay that's great here so let's box this up and save it here maybe let's um maybe what we should do here is uh let's move this over here this is going to be actually a little bit useful later here so let's write that like write down our result here so p + r is going to be alpha beta gamma okay so let's save that here and then what's erase the rest of the board here well not the rest of the board i want to erase these calculations here and now what i want to do is let's consider now a second frame here okay so instead of these this frame are here let's now consider another frame here let's call this frame f1 how about okay so frame F 1 here is obtained is obtained by rotating FR through right handed angle sy about the z hat r which is also going to be the z hat 1 axis so what that means here is i want to take this picture here the the the the red sorry the black lines here right which represent my reference frame and I'm going to wrote about the z-axis which is in a right handed sense it's through the board so this whole thing is going to tilt here alright so maybe let me just draw it instead of me talking about it here so let me just draw this here so this now so this x-axis right is just gonna rotate through angle this is positive side right and this now becomes X hat one right this is the x-axis of frame one here right similarly the y axis here is going to rotate through that same angle here right so down here here is positive side alright and now this is becomes Y hat one right and I guess the Z hat stay the same right these two are common here because all we've done is we've rotated about the z axis here right so now I've got this new frame called f1 here right and we can ask ourselves the exact same question now is this this this vector P hasn't changed right it's the exact same vector but now I want to express it in frame 1 instead of frame our here right so in this case what I'd like to do here is I want to express P in f1 here right so in other words I want to have this vector P here which earlier we said P was a plus B plus C here right but now I want to express this in frame 1 here right so again in order to make the left hand side numerically equal to the right hand side I got to put 1 superscripts on all of these other components here right because what I want is I want to now describe all of these from the one perspective here right ok so the question now becomes just like we did earlier here what is a1 right so it's question mark question mark question mark there's three numbers I got to stick in here again what the first number here in in this vector means it's the component now of how far do you have to walk along X hat ones ones axis right the second component is how far do you have to walk along Y hat one's axis and the third component is how far do you have to walk along z hat one's axis in order to go from the base of the vector to tip of the vector here right so this is the three numbers that we need to compute here right okay so if you think about this long enough let's think about this a here where is the vector a it's this green line here right so I got to ask myself how do from the origin here or the base of this green line here to get to the tip of this here but I want to describe that in the one frame here right so you can actually draw a couple of right triangles in this picture here so maybe let's do this in blue here so I'm gonna have a right angle coming off like such here so this here is a right angle alright and then similarly down here I got another right angle here like this so if you look at this thing long enough right so again I'm trying to describe let's just focus on a I just want to get to this tip right up here okay so you see actually there's a hypotenuse of this right triangle here with hypotenuse alpha here right so I think everyone would agree that this distance here isn't this just gonna be alpha cosine sigh right and then this distance here is alpha sine sigh would everyone agree right so coming back to our question over here of how do I go from the base of this a vector to the tip of the a vector well first off I got to ask how many units do I walk along the x hat one axis here right so if you look at this well you have to walk apparently alpha cosine sigh units in that direction let me let me make this a little bit bigger so I have a little bit more space sorry let's do this right okay so the first one I walk alpha cosine sigh units in the X hat One Direction that brings me to here now the only thing I got to be a little bit careful of is how far do I walk now in the Y hat One Direction I walk this distance here that's the magnitude but notice I'm actually walking you have to go in the opposite of the Y hat wander rection here so this is actually minus alpha sine sigh again pay real close attention to this minus sign I guarantee you the number one place people screw things up in rotation matrices is this minus sign that that shows up here with this sign and this is exactly where the minus sign comes from right is I'm here and now instead of walking in the positive y-direction here I'm gonna walk in the negative y-direction to get to the tip here right and then how far do I walk in the Z direction well that's zero right for this component all right okay great so I think we nailed this thing for a 1 here let's also do this now for what is b1 here right so again b1 it asks us how far do I walk in to get here now I'm talking about the vector B this Green Line here right this one's on a green line I got to figure out how far do I walk in the x-direction how far do I walk in the y1 direction so ok so again let's look at this triangle here against the right triangle here this right triangle now has a hypotenuse of beta here right so I think everyone would agree that this distance down here this is beta cosine sy right and this distance here is beta sine sy right okay so let's let's do it here so how far do I go in the x1 direction here to get to this tip well I go I go this direction right so here's ya from here up to here right so I go beta sine sy in that direction right and then how far do I go in the Y direction here the Y 1 here so that is this distance right I go beta cosine sigh all right and then I go zero down here perfect and then lastly I think the C component is actually pretty easy c1 here because the C component didn't change right the z axis here didn't change so C is actually pretty darn simple right this is just gonna be 0 0 and gamma all right great okay so let's just plug these three expressions in here for the right-hand side here so if you write this down here you end up with well let me see you get alpha cosine Phi plus beta sigh and then - alpha sine sy + beta cosine sy and then you get gamma down here right okay great you know what let's pull out alpha beta and gamma in other words what I could do is we can rewrite this whole thing in a matrix form here of something that looks like I'm gonna pull off alpha beta and gamma over here and now what this matrix looks like it's this 3x3 here where I got what I got cosine sy and then we got sine sorry and then a zero and then you got minus sine Phi cosine sy zero and then a zero zero one here right and again what's the left hand side the left hand side is this up here right this is the vector P expressed in the one frame here right now what is this vector over here alpha beta gamma here right well that's what we boxed up and saved earlier here right so if you look at this alpha beta gamma that's the vector P expressed in our here right so this whole thing over here this vector here this is P expressed in R and what this matrix here this 3 by 3 matrix here this is referred to as your rotation matrix because it's a matrix if you look at this the interpretation long enough right if this matrix is going to allow you to take a vector that's expressed in frame R and it will do something and basically it will output the vector expressed in frame 1 here right so let's write that down here maybe I think I think we're done with we're done with this picture so either we can get rid of this so the end of the day what we end up with here is we can write here the vector P expressed in frame 1 here is going to be this 3 by 3 rotation matrix which a lot of times is denoted with a see here this C here is a function of sy here and there's gonna be a couple of subscripts down here so give me a second here and this thing gets multiplied by the vector P expressed in frame are here right so this is a rotation matrix which we see goes from frame our to frame one here so the notation that we're going to use here is the subscript where it's something like this R or there's something like this here right c1 with respect to R is a function of sy times the vector here expression frame are here right so in this case here c1 r sy here this is a rotation matrix this is also sometimes you might hear this called a direction cosine matrix Direction cosines matrix or a DCM right but this roommate rotation matrix goes from F R to frame F 1 here alright so again we got to be a little bit careful here again the probably the second most common place that people will mix this up here is they'll either flip-flop these indices here and they won't keep track of this rotation matrix does it go from frame 1 to frame or RS the does it go from frame our to frame 1 or vice versa here right so the way we're going to keep this straight here is if you notice here the direction cosine matrix of the rotation matrix it always is sort of multiplied on the left of the vector here and now our notation here is going to save us because we notice here that the way we're going to keep this straight ear is this this subscript which is kind of closer to the right it has to sort of match this subscript here right so this these sub / super scripts should match right that will tell you that okay this rotation matrix is expecting to be multiplied here right next to something in the frame alright so this R matches what this are and the result it's going to kick out something of that exact same vector but now expressed in the one frame here right or the other frame so these two indices are these sub and super scripts should match all right okay so this is our rotation matrix and again I guess maybe we should write that that's exactly down here right so this rotation matrix again it's a three by three here right all right where it looks like cosign of sigh sine Phi 0 minus sine Phi cosine Phi zero and then a zero zero one here all right great so this is our rotation matrix it has tons of special properties is really really helpful um let's talk about a couple of these interesting properties here so first off I think we're all did I want to erase that picture yeah I think we can erase this picture here you guys all have it hopefully in your notes or you can just rewind the video here to get this this diagram again so no biggie okay but a couple of the interesting properties here so rotation matrices are orthogonal so if you remember what that basically meant is every single row and column here not only are they linearly independent here but every row and column RR are normal to every other row and column here so what what's special about an orthogonal matrix here is one of the consequences here of an orthogonal matrix here is that basically the inverse is just the transpose here so this is a rotation matrix are orthogonal therefore the inverse is simply the transpose so this is really really helpful so for example here you know we had this thing c1 with respect to R of sy here right if I wanted to calculate its inverse here right that is actually there's no point in doing a full on 3x3 inverse and paying all that computational power to do the determinant and do all this kind of stuff here instead you just take this matrix and just switch the rows and the columns here right and if you think about this long enough let's come what's up here to this notation here if you look at what this is doing here right so you said we had this rotation matrix C 1 R of sy here times P R here right what if I want you to take the left multiply both sides by the inverse here right so in other words I could turn this thing into C 1 R sy inverse P 1 is equal to P or whatever won't agree that's the exact same thing and now we said that alright this is this is great here this inverse is the same thing as the transpose so I could just switch this with the transpose right now if you think about what this is doing here what is this matrix here this this this whole thing maybe I should I should circle this whole thing right this whole thing c1 R sine transpose here this is now some other rotation matrix let's call it C here right which takes a vector expressed in frame 1 and turns it into a vector express and frame are here right so in other words this thing is is C 1 I guess R / one like that alright times P 1 is equal to P R right so again the this index matches with this index and then this index will tell you what the result is here right so this is really really cool here so we basically see that ok the transpose or the inverse of a road of a rotation matrix it's basically the same thing as flipping the order of the indices here so you could write this thing as C R 1 of sign right so here's a nice property here of these rotation matrices so first off never ever bothered throwing you know calculating a full on inverse you're just wasting computational power just take the transpose and again what that physically is doing here is it's just flipping the indices of the rotation matrix so physically you get another rotation matrix where all that's gonna do is take you from the frame - back to the original frame right or vice versa all I'll let you guys figure that out right you can see clearly what's going on here right so that's super cool here all right ok what else is really interesting about these rotation matrices well if you remember does everyone remember what what what an eigen value of a matrix did here right so let's consider how about values of this sea let's let's use our perspective see one RSI here right this rotation matrix that we hooked up right if you remember right eigen values were that they gave you an idea of sort of the maximum amplification or attenuation that that a matrix is going to do if you had something like Y is equal to ax right the eigen values of a are going to tell you um how much could this matrix a amplify or stretch or shrink this vector X in order to get a vector Y here right now if you think about this this this this rotation matrix what if a was a rotation matrix physically we see that this thing should not be stretching or shrinking that vector at all right because what we did is all this is doing is its changing the perspective of how we express that exact same vector here right so what we better Excel it better be true and we hope that the eigenvalues of this of this rotation matrix or in fact for any rotation matrix right there magnitude better be one exactly right because that's going to basically say that no matter what vector you put in and you you transform using the this rotation matrix it will not stretch or shrink that nature right so if you want to go over to Mathematica here and actually go ahead and do this right go ahead and say I ghen values and you pass it c1 R of Saia right just pass it that three by three matrix here right and see what this spits out right so let's call this on a no vowels right if you stew this here mathematic is going to say okay the eigenvalues of this thing are you get a lambda one here of one a lambda two here of cosine sy + sine sy times I imagine a number and then lambda three here so it's a three by three better have three eigenvalues here right so this is cosine of sy plus sign or sorry sorry this was your number - it doesn't matter which order one of them's - one of them is plus here alright so you quickly see by inspection here yeah magnitude one this thing here is yeah magnitude one right because here's the real part here is the imaginary part if I Square this add it to the square of this square root the thing I get a 1 all right cosine squared plus sine squared is 1 same thing down here so all magnitudes are one so great that passes are our idiot check here so I think that's that's that's very refreshing here right ok great tell you what let's let's look at an example of applying this how about so let's see here yeah sure let's erase all this I think we don't need any of this any longer and we'll consider an example here of again I'm an aerospace engineer so I like to look at aircraft so let's uh let's look at trying to describe like the wing tip of an airplane or something like that so let's look at it a very simple example here ok so let's say let's call this thing describing a wingtip location okay so what I want to do here is let's just draw ourselves an airplane here you know I'm a horrible artists you're gonna have to excuse me here top view of an aircraft here right so here's the wing maybe here's a cockpit something like that let's say the center of mass of the aircraft is somewhere like here okay yeah this is a horrible CG picture it let's do it a little bit better ok there's a CG it of the aircraft ok so what I can do here is let's go ahead and attach a reference frame to this aircraft so it's very common to have what's called the body frame attached to the aircraft so the origin here is that the center of mass of the aircraft the x-axis comes out the nose here so let's call this X hat body right the y-axis comes out the right wing tip or close to the right wing tip here well I had body here you know if it's if the wing is swept like this you see it doesn't really exactly nail the wing tip but you get the rough idea right and the z-axis goes to creates a right handed system with this so in this case it goes through the floor here right so Z pad body goes into the floor all right something like that right ok so that's a body frame now let's think about what we might want to do here is what if I wanted to describe the location of the of the right wing tip here right so or maybe how to tell you what let me draw a point here like like maybe not exactly the right wing tip how about this point right here on the wing here right so again we can draw this in a red vector here it kind of looks like this and there's probably some component in or out of the board right because the aircraft probably has you know has has probably has dihedral or anhedral or something like that so the wings are probably tilted up or down to some component here right so let's call this vector here this vector is our wing wing tip okay so what we might want to do now here is can I describe this vector here right so I want it to numerically write down how do I go from the origin here the center mass of the aircraft to get to the to this wing tip well it's very easily expressed here in the body frame here right so what I mean by that is okay I've got this vector here but if I want to write down and express this in the body frame I could say here now I need just three numbers so this number the first number is how far do you walk again in the X hat body direction to get to the tip the Y the second component is how far do you go in the Y and the third component is how far you go on the z in the body frame here so in this case you might see okay X's is zero here right because it's exactly aligned with sort of this Y axis and then the y axis I don't know let's let's make up some number how about you know 1.7 6 meters or something that is is is the the semi span of the of the aircraft here and then the z axis is yeah maybe there's some some component here I don't know let's make it up 0.12 so I guess in this case we're saying the aircraft has a little bit of anhedral so the wing tips are a little bit kind of downward canted like such because you barely have to walk you know 0.12 meters down or into the page in order to get to the to the wing tip right so great this is perfect this describes where that wing tip is but it's relative to this body frame right now let's attach a second coordinate frame to this here so let's say north is this direction here right so here's north and here is east and then down as yeah I guess the third axis of this northeast down coordinate system is just into the page here right so this is this down here right so let's make the second frame the Northeast down frame so this here is the x-axis in the Northeast down frame this is the y-axis in the Northeast down frame and this is the z-axis in the Northeast down frame which is shared with the body frame both of them are pointing down here in this situation so now what I'd like to do here is let's say that these things are now canted over and a lot misaligned by this angle side here right so this is the magnitude of the rotation between the body and the Northeast down frame here all right so from last time from what we just arrived from what we derived right we showed that okay the rotation matrix here to go we got to be real careful what we did earlier right earlier we stood we got the rotation matrix from the north east down frame to the body frame over angle sigh here right this was given by cosine sigh sign sigh zero minus sine acai cosine Phi zero zero zero one here right so this is the rotation matrix we had earlier now what I want to do here is I want to describe this this wingtip here but how many meters north and how many meters east and how many meters down do I have to go so I want to express this in the northeast down frame here so what I want here is I want the position vector of this wingtip here right but I want to express this in the north east down frame here right okay well we see that all right I have the position vector of the wingtip expressed in the body frame here now this is where we see that our indices are going to save our bacon here right you might be tempted to just say okay why don't I take this matrix here and jam it in here so this is C be with respect to North East down sigh right and multiply those two things together but you're gonna get the exact wrong answer in this case right because we see this subscript does not match this sub this this superscript here right so these don't match so clearly what I need to do is I need to flip these indices here right so we can use the property we talked about earlier that flipping the indices is actually the same thing as taking the inverse or for our orthogonal matrix it's just taking the transpose here right so this is really the operation I have to do here right in order to make all of this work out right okay so great if you basically plug that in and I think let's use a numerical example just for giggles here let's use a sigh of 45 degrees here so let's assume that psy is 45 degrees here all right so all you got to do here is run over to Mathematica and plug all this in so what you end up with here is well we got our wingtip in the Northeast down frame so let's do this first thing here so this I need to take this thing and they take its transpose here so what we end up with here is I end up with a matrix here where it's cosine of 45 degrees how do I want to do this 45 times how about PI over 180 let's do it like that here right let me maybe make this a little bit bigger okay this 3x3 is this is what I want here right okay cosine now this is actually what it's minus sine of 45 times pi over 180 right and is zero so because I'm taking the transpose okay and then I got sine of 45 times pi over 180 and then cosine of 45 times pi over 180 and then 0 0 0 1 and then I multiply this thing by the the vector here expressed in the body frame right x 0 0 one point seven six and zero point one two great ok so again this matrix here is C from the body to the northeast down over the angle 45 times pi over 180 right that's what this matrix is so again here's that here's again the probably the number one place that you're going to screw things up or or get tripped up with these rotation matrices is dealing with these transposes dealing with these indices where is the minus sign here and all of these here it might assign si n right sides that's a weird double whatever like vocabulary thing right I'm talking about the sign si GN of the sign of the S well anyway you get what I'm saying just be real careful about these indices if you use R this this subscript and this is this notation where we make sure that these indices match so this B matches with this vector it's expression the B and it yields me a vector expressing the any D I think everything should be fine so you do all this math you run over to Mathematica you plug in the numbers here and you end up with what what does this come out to be it's something like minus 1.24 for 1.2 for 4 and 0.12 so I make that so here's the wingtip in the northeast down frame here right and the other the interesting thing to note here is only the X and the y components change right the Z component doesn't change because like we talked about the Z the Z axes are the exact same in these in this situation here right so here's how you would describe that wingtip here if you are in the Northeast down direction so you actually go this many units north so it looks like actually you go south you go south by 1.2 meters you go east by 1.2 meters and you go down by 0.12 meters to get there here all right okay so um I think we're this is pretty much where we like to end it the thing I'd like to note here is just make a note here and remember here we did all of this derivation for rotation about the z axis right so we looked at deriving a rotation matrix where the two frames were separated by a common were rotated about a common z axis right you could go through this entire derivation here using a common x axis or a common y axis the the analysis is virtually identical all that change is going to changes the structure of this of this rotation matrix this one is going to move to different locations here and the sign that signs will be spread out of around here but otherwise the format is gonna be the same it's just gonna be a whole bunch of cosines and sines and ones and zeros here in your rotation matrix and you just need to be careful of where the negative sign the negative s IGN here shows up here and we're actually going to be taking a look at this a little bit later on down the road where we see how can I actually combine multiple rotations here successively one after the other here about both the XY and z axes in order to move forward here when we look at oiler angles for an aircraft here so I think that's where we want to leave it here I think this is a good spot to stop here so again I hope you enjoyed the video here please stick with us because this is actually one of a large series of discussions here on kinematics and rigid body dynamics here where we're going to be looking at position and acceleration a position velocity and acceleration and rotating reference frame in the context of developing a rigid body simulation for an aircraft here so if you like the video please subscribe to the channel it really does help me continue producing these videos here and leave a comment here I'd like to see what you guys think here if there are things that could be improved in the future so with that being said I hope to catch you at one of these future videos bye
Info
Channel: Christopher Lum
Views: 15,318
Rating: undefined out of 5
Keywords: Rotation matrix, vectors in different coordinate frames, vectors in different reference frames, rotation matrices, expressing vectors in coordinate frames
Id: TODDZnOT3ro
Channel Id: undefined
Length: 45min 38sec (2738 seconds)
Published: Wed Dec 26 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.