‫But now, in the previous videos, I told you that we're going to derive something called a transfer
‫matrix, and I've also told you that if you use a convention are X, Y, Z for your rotation matrix,
‫then it has the same rotation matrix like this convention.
‫In this case, you rotate about the inertial frame axis and then here you rotate about the moving frame
‫axis.
‫Both of them use this rotation matrix consisting of these three matrices in this order.
‫But then I said that the transfer matrix is different for them.
‫The transfer matrix for this one is different from this one.
‫But what is a transfer matrix?
‫Well, the purpose of a transfer matrix is to connect the angle of velocities in the body frame to the
‫angular velocities in the inertia frame.
‫In other words, these are my angular velocities in the body frame.
‫PKU are what I want, however, is this.
‫And so if I take my transfer matrix and then I multiply it by peak, you are, then I will get my final
‫theater and play that.
‫But now if you think about it, then if we use this convention where we rotate about the inertial frame
‫axis, then your transfer matrix should be your rotation matrix.
‫Because remember what the rotation matrix did you have your inertial axis, then you have your body
‫frame axis somehow oriented with respect to the inertial frame.
‫And so when you had your angular velocity vector, then it had three components in the body frame.
‫Here you had P here you had Q, and then here you had R and then what this rotation matrix did.
‫It expressed this vector in the inertia frame.
‫It showed you the coordinates of this purple vector in the inertia frame.
‫It showed you what your inertial X was, what's your inertial Y was and then what your inertial Z was.
‫That's what this rotation matrix did.
‫But now we are so used to thinking that the axis here, X, Y, Z, that they have to be in meters,
‫that it's easy to forget, that they don't have to be in meters.
‫It depends on what you use your axis for.
‫If you use it to measure distance, then these axes are in meters like this.
‫But if you use them to measure your velocities, then your axes, they represent meters per second.
‫Their units measure velocities.
‫If your objective is to measure angular velocities in some kind of frame, then the units of that frame
‫are radians per second.
‫And that is our case right here.
‫If we use this convention, then that means that we first rotate about the inertial x axis, which really
‫means that our rotation vector in the direction of X is Ashrafi, that then we rotate about the inertial
‫y axis.
‫Then that means that the angular velocity vector in the Y direction is called theta dots.
‫And then the same thing when we rotate about the inertia Z axis, our side, that it's a rotation vector
‫and each direction is in the direction of the inertia axis.
‫That means that if in this green frame I measure my angle velocities, in other words, I measure my
‫angular velocity in the body frame.
‫SPQR If I want to know this vector in the inertia frame, if I want to know my FIDA theatergoer and
‫BPCI that, then I should use my rotation matrix to find it right.
‫I multiply my rotation matrix by EQR and then I get this, which means that for this convention they
‫should be equal.
‫When I rotate about the inertial axis, then my rotation matrix is my transfer matrix.
‫However, if I use this convention here, we.
‫Which is what we will use then we have a different transfer matrix and here is why.
‫So you have an inertia frame here and you also have a body frame that is attached to a drone.
‫We first rotate about the body frame, the Z axis, and we do it by BPCI Radiance.
‫And so here the body frame Z equals the inertial frame Z because both vectors are in the same direction.
‫And we're going to call this configuration like this.
‫So this will be small X sub one, small Y sub one and small Z sub one.
‫Because remember, this is still not a body frame.
‫We haven't reached our body frame orientation yet.
‫We're trying to reach it by rotating about three moving frame axis.
‫And so I've drawn this intermediate configuration here.
‫And now we're going to rotate about the body frame.
‫Why sub one axis like this?
‫If you rotated like this, then your thumb will point towards this small y sub one and that will be
‫the direction of your rotation.
‫And so if you rotate about this axis by theta radians, then your new configuration will be here in
‫green.
‫So this will be your small X up to this would be your small Y sop to and this will be your small rises
‫up to.
‫And in this case your small y sub one equals small Y up to.
‫As you can see, both vectors overlap with each other.
‫They're in the same direction.
‫And so this is your second intermediate configuration, and now finally, if you rotate about this axis
‫here, it's up to like this as shown in red, and if you do it by five radians, then you will finally
‫reach your original body frame orientation.
‫Now, this is the body frame that is attached to the drone.
‫This one in red.
‫So that's the orientation of the drone, which means that this axis here will be small X and let's put
‫it be then this will be small Y Subi and this will be small Z Subi.
‫So that's the body frame that is attached to the drone.
‫And in order to reach this orientation from your inertial frame, we went through this sequence of rotations.
‫And so I have redrawn this final configuration here.
‫And by the way, here, these two directions are the same, so small except two equals small like Subi.
‫Now, if you rotate about the body frame, X, Y and Z axis, then it happens at some kind of radians
‫per second rate.
‫So you have some kind of angular velocity with respect to the body frame.
‫And we define that with this vector.
‫Smaller, mega superscript B in the body frame equals P, Q are radians per second.
‫And as you already know, P is the angular velocity about the body frame x axis.
‫Q about the body frame y axis and are about the body frame Z axis.
‫However, if you have angular velocity about the body frame axis, then that also means that you're
‫oilor angles will change with respect to time.
‫In other words, you will have five that Seeta that imply that it means that we can also define the
‫following vector.
‫Let's call it theta dot arrow superscript e and it equals phi that theta that and that radians per second.
‫And don't confuse these two cetus here this theta that.
‫Here is how fast this angle changes.
‫And this one here is just how we call this entire vector.
‫So I will always write this vector like this with a superscript E, but remember it's still the same
‫vector.
‫It's your angular velocity vector.
‫If you take your R, X, Y, Z convention using fixed axis, then you take that vector and you decompose
‫it into three components that point in the inertial X, Y, Z axis.
‫And that's your file, that theta that implied that.
‫But when you take the other convention are Zwi X, then you take the same angular velocity vector,
‫but you decompose it differently.
‫Now the three components of that vector that you will obtain, they will point in the directions of
‫those intermediate moving frames and then these components will be your FIDA Theta that imply that.
‫So it's the same vector, but you simply decompose it differently and then you call those other components
‫as your father thought.
‫And that.
‫And so these three vector elements here are the change of your oilor angles with respect to time.
‫And the transfer matrix is the matrix that connects those two.
‫And so it looks like this.
‫And if instead you have the time derivative of the oilor angles and you want to find the angular velocities
‫in the body frame, then you simply need to take the inverse of your transfer matrix and then you can
‫find your angular velocity is in the body frame.
‫And now you might ask me, why would I do that?
‫Why would I choose a convention in which I'm forced to derive some kind of extra matrix?
‫Why can't I just choose this convention where I rotate about the inertial X, Y, Z axis and just use
‫my rotation matrices?
‫Why do all this extra work?
‫And that would be a great question.
‫And the answer is that there is a hidden value in this transfer matrix.
‫You see your rotation matrix, it has three angles in it.
‫Right?
‫Either you think in terms of Fifita and Passi or Gambetta and Alpha, you see that in this matrix you
‫have three angles.
‫So you're our Z times are Y, times are X that we can just call R.
‫It depends on Phi Theta and BPCI.
‫So you have to worry about three angles.
‫However, very soon we will derive this transfer matrix and this transfer matrix is valid for our convention,
‫our Zwick's movie frame axis.
‫And don't worry, I will show you exactly step by step how you will obtain this matrix.
‫But this is how it looks like.
‫And this one in blue, it's this transfer matrix inverse.
‫And by the way, this transfer matrix, it's not ortho normal, which means that if you want to find
‫the inverse of your transfer matrix, you cannot just take the transpose of it.
‫You either have to use those classical linear algebra techniques or some kind of symbolic mathematical
‫tool like Mathematica, or perhaps you have something in Matlab or in sci fi in Python.
‫But finding an inverse is just a well specified procedure that you learn in linear algebra.
‫But now this is your transfer matrix.
‫And if you look at it more closely, what do you see?
‫How many angles do you see in this transfer matrix?
‫You only see two angles, right?
‫You only see PHY and Seeta.
‫So your transfer matrix for this convention only depends on fire and Theta, which is already a good
‫news because now you are able to make a connection between your body frame, angular velocities and
‫inertial frame angular velocities.
‫Vidal theatergoer and decide that by only dealing with two angles so you can skip sci and the reason
‫why you only have two angles there is because, as you can see, the P component of your angular velocity
‫vector, which is the component in the body frame X direction, points in the same direction, like
‫the fire, that rotation vector.
‫And since P equals five dot, then that means that you only need angles to connect the other components
‫cu with Theta Dot and then R with side that.
‫And that's why using this convention you can get away with only two angles.
‫However, wait for it because it will get even better.
‫Not only you have two angles here, but these two angles are Fi and Seeta and that makes a big difference
‫when we design our NPC controller.