‫Welcome back.
‫So now let's finalise our discussion about this rotation matrix conventions by doing what we did in
‫the last video.
‫But for this convention, again, we assume that the physical rotation of the drone is this purple vector.
‫This is a rotation vector.
‫So if my rotation vector is like this, then according to the right hand rule, it means that your object
‫is rotating like this as shown in green, but then the rotation vector is perpendicular to the plane
‫of the rotation.
‫And so if my drone rotates with this purple vector, let's say at five radians per second, then it
‫means that this drone rotates like shown in green at five radians per second.
‫And of course, you can decompose this rotation vector like this.
‫And so, for example, completely unrelated to this convention.
‫If this is my body frame axis, this is my y body frame axis and then this is my body frame axis, then
‫this would be my P, this would be my cue and this would be my arm.
‫So I have decomposed my rotation matrix into three components because then it's convenient for me to
‫keep track of them in the vector form.
‫So that's how we measure rotations using these rotation vectors.
‫OK, let's go back to our R x, y x convention.
‫The physical rotation of the drone is still this as shown with this purple rotation vector.
‫That doesn't change because we changed our convention.
‫But if we rotate our body frame with respect to the inertial frame using this convention and then these
‫are my angles, then the first thing that I need to find out is how my body frame is oriented with respect
‫to the initial frame.
‫So this is the beginning when our body frame completely overlaps with the initial frame and now you
‫rotate piver to radians about the inertial x axis.
‫Right?
‫You first rotate about the inertial x axis.
‫So your body frame ends up in this configuration, then you rotate power to radians about the inertial
‫y axis like this.
‫So you will end up in this configuration.
‫And finally you rotate about the inertia from X axis again by PI over to radians and it will be like
‫this.
‫So this is your inertial frame and this will be your body frame.
‫So if you compare this orientation with this orientation, then you can see that it's different right
‫here.
‫You had X be here, y be here and zib here and now you have X be here, ybe here and Zib here.
‫Well let's see what it means.
‫The rotation vector still has three components in the same direction, so the angular velocity vector
‫is still the same.
‫Is this one here.
‫You see the rotation of the drone hasn't changed, not in terms of its magnitude nor in terms of its
‫direction.
‫The Vector or Hormiga B is exactly the same.
‫However, now we have to rename our components in the case of X, Y, Z convention.
‫This component was P because it was in the direction of body frame X, but now this component is in
‫the direction of body frame Z.
‫So now we have to rename this component and we have to say that this component is R then in the case
‫of the X, Y, Z convention, this was our Q component because it was in the body frame Y direction.
‫But now this component is the same component physically.
‫This component it's the same.
‫But now in this new convention, this component points in the body frame X direction.
‫So now we have to call it P.
‫And in the original case this component was R, but now the same component in the new convention needs
‫to have a different name.
‫So it's.
‫Q So because of the fact that we changed our convention, we have to rename our.
‫And so what would be the body frame coordinates of this vector in this convention, X, Y, X?
‫Well, it will be very simply one one, one, just like in this case, actually.
‫However, the difference is that now the components have different names.
‫So in this case, in the X, Y, Z case, this one that you have here, the first one, which is P,
‫since it's the same component, it's the last one.
‫If this R component had been, let's say, three times longer, not one, but three, then in this X,
‫Y, Z convention, this three would be the first number.
‫But in the X, Y, X convention, it would have been the last number.
‫So in the X, Y, Z convention, it would have been three one one provided that the other components
‫stayed the same.
‫And then in this convention it would have been like that.
‫And so now this is the rotation matrix for this X, Y, X convention.
‫And last substitute all the angles with poverty, radiance.
‫You know that whenever there is a cosine, it means zero.
‫So that means that in this first column you will have zero one and zero like this.
‫Then the second column you will have one here and then zero and zero.
‫So one zero and zero.
‫And then finally you will have zero here.
‫You will have zero here.
‫And then you see that you will have minus one here.
‫So zero zero and minus one.
‫And so to compute the coordinates of this properly vector in the inertia frame, we take this matrix
‫and then we multiplied by the coordinates in the body frame.
‫And as you expect it, you will get one, one and minus one.
‫But now let's really assume that this R component is three times longer.
‫So this component is still one, this component is one, but then the R component is three.
‫Then if we use this convention are X, Y, X, then your angular velocity vector would be one, one
‫and three.
‫So you see P, Q, R would be one one and three.
‫And I really need to project this purple vector down here.
‫So this purple vector, it comes from the origin.
‫And so by inspection you can see that in the inertial frame.
‫The coordinates of this vector are one one minus three.
‫If we take this rotation matrix that came from R, X, Y, X, and then we multiplied by this vector
‫one, one and three, then we'll get one one and minus three as expected.
‫But now if we choose another convention, if we choose R, X, Y, Z, which is in this case, then
‫the purple vector in this convention would be three, one and one.
‫Right.
‫Because you're three now this longer component, it's in the body frame X direction and then the other
‫components are still one.
‫And now if we still want to get the inertial frame coordinates for this purple vector, then we need
‫to get the rotation matrix for this convention.
‫And this rotation matrix was this one here.
‫Right.
‫And so I have it here.
‫And then I multiplied by this vector.
‫Remember, this matrix is for the X, Y, Z convention, and also this vector is for the X, Y, Z convention.
‫And then what I will get is one, one and minus three.
‫As you can see, the same thing, the math works out.
‫So remember, you have a fixed inertial frame.
‫The physical motion of your object doesn't change, but when you change your rotation matrix convention,
‫then two things change your rotation matrix and your body frame coordinates.
‫But in the end, all the.
‫Conventions, if you do it right, we'll give you the right inertial frame coordinates now, you know
‫that if you have information in your body frame.
‫In other words, if you have body frame coordinates and you want to find those coordinates in the inertial
‫frame, then you use the rotation matrix.
‫But if you want to go the other way around, let's say you have information in your inertial frame,
‫but you don't know your body frame coordinates, then you need to take the inverse of your rotation
‫matrix and then you will find your coordinates in the body frame.
‫So how about we test that theory?
‫If we take our convention, which is R, X, Y, Z, and then we rotated power to radians about all
‫the inertial axis, then this was our rotation matrix and then these were the different coordinates
‫when we used this convention and these coordinates here, they were my inertial frame coordinates.
‫So let's assume that I don't know my body frame coordinates.
‫I only have my inertial frame coordinates.
‫In that case, this would be my inertia frame coordinates.
‫Then this here, this would be my inverse of the rotation matrix and here I should have my body frame
‫coordinates.
‫So what would be the inverse of this rotation matrix?
‫Well, since rotation matrices are also normal matrices, then the inverse of these matrices are the
‫transpose of these matrices.
‫In that case, the first row here is zero zero one.
‫It would be the first column here.
‫The second row here would be the second column here, and then the third row here would be the third
‫column here.
‫And so if I performed this matrix vector multiplication, then I will have three, one and one, just
‫as we expected, three one one.
‫If we had used another convention, for example, are X, Y, X, then remember, two things changed
‫the rotation matrix and then the body frame coordinates.
‫So let's take this one here, which follows the convention are X, Y, X again, we assume that we don't
‫know the body frame coordinates.
‫We only know the initial frame coordinates.
‫And this is the rotation matrix that came from this convention, x, y, x, since rotation matrices
‫are also normal, therefore it is very easy to take their inverse.
‫You simply take their transpose.
‫And the transpose of this matrix is this one.
‫This is the R x, y x rotation matrix inverse, which is actually the same matrix like the original
‫rotation matrix.
‫So if you take the transpose of this matrix, then it will be the same matrix.
‫And I guess that has to do with the fact that we have this interesting convention here, X, Y, X.
‫We rotated two times about the inertial X axis.
‫But anyway, these are our coordinates in the inertia frame.
‫So we put them here and as a result we get our body frame coordinates one, one and three.
‫And that's what we have for our R, X, Y, X convention.
‫So the math works out.
‫And of course, as mentioned before, in this course, we will use this rotation matrix that could be
‫applied to two conventions, the fixed angle approach and then the oilor moving frame approach.
‫In this course we will be using the convention are sub Z, Y, X.
‫These are small letters, so meaning that we are rotating about the body frame axis.
‫So we are using the oilor angle approach, meaning that we will first rotate about the body frame Z
‫axis, then we will rotate about the body frame Y axis and then about the body frame x axis.
‫And that's it about these rotation matrix conventions.
‫I hope that this extra explanation about these conventions has been helpful.
‫Thank you very much.