‫Welcome back.
‫Let's now derive that transfer matrix in the last video, we saw that when we had our inertial frame
‫in white in our body frame, which was attached to the drone in red, then I showed you how you go from
‫the inertial frame configuration or from the inertial frame orientation to the body frame orientation.
‫What you do, you first take the body frame and you completely align it with the inertia frame.
‫And then according to our convention, we first rotate about the body frame Z axis by an angle psi.
‫Then we rotate about the body frame Y axis by an angle theta, and then we rotate about the body frame
‫x axis by an angle phi.
‫And that's how we reach our body frame, which is the same thing that we have here, which is attached
‫to the drone.
‫And now our job is to find this transfer matrix that connects the angular velocities about the body
‫frame, access to the time derivative of our oilor angles.
‫Now earlier we defined that the rotation about the body frame x axis has an angular velocity of P radians
‫per second.
‫However, in our last rotation, when we rotated about the body frame x2 axis at an angle phi, then
‫that had an angle of velocity of phi that radians per second.
‫And that is the time change of one of our oilor angles.
‫But now look, x2 equals x b and this means that the angular velocity P equals phi dot radians per second.
‫In other words, the angular velocity about the body frame x b axis is the same that the time derivative
‫of the phi oilor angle.
‫And that's true only in this convention because we rotated about the moving frame x axis last.
‫Now you can write it down like this or like this and you will see later why I wrote it down like this.
‫Now things are different when we look at angular velocity Q radians per second, which is the rotation
‫of the drone above the body frame y b axis.
‫And if we also look at the time derivative of the oilor angle, theta or theta, that radians per second,
‫whose rotation happens about the body frame y two axis.
‫So it's here theta that radians per second.
‫Now, the Y two axis is not equal to Y b axis, and therefore Q cannot be equal to see date.
‫So how do we connect them?
‫Well, in order to get from Y to to Y B, what did you do now?
‫If you look at it, then you could take this picture out of context and you could pretend that this
‫frame in green X to Y to Z two, you can treat it as an inertial frame, even though it's not.
‫But just for this specific case, you could pretend that this is the inertia frame and in that case,
‫the red frame X B will be in Zebb.
‫This is the rotated frame that you rotated by applying the rotation matrix R, sub X, and you could
‫do that, right?
‫If you take this thing out of context and you just pretend that X to Y two and Z two is the inertia
‫frame and you multiply this are sub X matrix by the red body frame, then you will get your inertial
‫frame.
‫In other words, if you measure something in the body frame and then you multiply this R sub X matrix
‫by it, then whatever you're measuring you will have it in this green x2, y2 and Z to frame.
‫And if you forget about everything else, then you could pretend that this is your inertia frame.
‫But the point is that the rotation matrix R sub X is the connection between these two frames and you
‫can also write it down like this.
‫And now we can apply this logic to our situation because our goal was to connect CU with Theta Dot and
‫we can do it like this.
‫This is our rotation matrix, our sub X, and you know that it's our sub X because it has the angle
‫phi in it which is here, and the x axis of both frames are equal, which is why you have one here.
‫So that's why you know that it's our sub X and so we can multiply this matrix by CU, which is here
‫in this red reference frame so we can write it down like this zero Q zero.
‫And if we multiply this matrix by this red vector then we will get zero theta dot inside that.
‫So now you see why I wrote these variables in this form.
‫And of course we can write it down like this as well, where we just use this abbreviation instead of
‫this entire matrix.
‫And suppose that you want to go back and you have information about theta that radians per second,
‫then you very simply take the R X matrix and you take the inverse of it and then you multiply it by
‫this green vector and that's how you get this vector here.
‫And now finally, how about R, which is the angular velocity of the drone about the Zebb axis?
‫How would we connect our to the time derivative of the oil angle.
‫BPCI how do we connect are with BPCI Dots and remember sai that is what happens here according to our
‫convention and I will leave it to you as an exercise.
‫Try doing it yourself and then you will see the solutions in the next video.
‫Thank you very much and see you there.