﻿1
00:00:00,330 --> 00:00:01,200
‫Welcome back.

2
00:00:01,650 --> 00:00:10,290
‫Let's now derive that transfer matrix in the last video, we saw that when we had our inertial frame

3
00:00:10,500 --> 00:00:19,290
‫in white in our body frame, which was attached to the drone in red, then I showed you how you go from

4
00:00:19,290 --> 00:00:26,760
‫the inertial frame configuration or from the inertial frame orientation to the body frame orientation.

5
00:00:27,180 --> 00:00:32,970
‫What you do, you first take the body frame and you completely align it with the inertia frame.

6
00:00:33,240 --> 00:00:41,870
‫And then according to our convention, we first rotate about the body frame Z axis by an angle psi.

7
00:00:42,540 --> 00:00:49,650
‫Then we rotate about the body frame Y axis by an angle theta, and then we rotate about the body frame

8
00:00:49,650 --> 00:00:52,230
‫x axis by an angle phi.

9
00:00:52,710 --> 00:01:00,630
‫And that's how we reach our body frame, which is the same thing that we have here, which is attached

10
00:01:00,630 --> 00:01:01,380
‫to the drone.

11
00:01:02,190 --> 00:01:10,230
‫And now our job is to find this transfer matrix that connects the angular velocities about the body

12
00:01:10,230 --> 00:01:14,610
‫frame, access to the time derivative of our oilor angles.

13
00:01:15,540 --> 00:01:23,760
‫Now earlier we defined that the rotation about the body frame x axis has an angular velocity of P radians

14
00:01:23,760 --> 00:01:24,540
‫per second.

15
00:01:25,200 --> 00:01:34,320
‫However, in our last rotation, when we rotated about the body frame x2 axis at an angle phi, then

16
00:01:34,320 --> 00:01:41,700
‫that had an angle of velocity of phi that radians per second.

17
00:01:42,030 --> 00:01:46,500
‫And that is the time change of one of our oilor angles.

18
00:01:47,340 --> 00:02:00,810
‫But now look, x2 equals x b and this means that the angular velocity P equals phi dot radians per second.

19
00:02:01,290 --> 00:02:11,580
‫In other words, the angular velocity about the body frame x b axis is the same that the time derivative

20
00:02:11,790 --> 00:02:14,130
‫of the phi oilor angle.

21
00:02:14,730 --> 00:02:24,180
‫And that's true only in this convention because we rotated about the moving frame x axis last.

22
00:02:24,630 --> 00:02:31,630
‫Now you can write it down like this or like this and you will see later why I wrote it down like this.

23
00:02:32,640 --> 00:02:40,620
‫Now things are different when we look at angular velocity Q radians per second, which is the rotation

24
00:02:40,620 --> 00:02:44,360
‫of the drone above the body frame y b axis.

25
00:02:45,120 --> 00:02:54,420
‫And if we also look at the time derivative of the oilor angle, theta or theta, that radians per second,

26
00:02:54,960 --> 00:03:00,540
‫whose rotation happens about the body frame y two axis.

27
00:03:00,870 --> 00:03:05,160
‫So it's here theta that radians per second.

28
00:03:06,160 --> 00:03:19,330
‫Now, the Y two axis is not equal to Y b axis, and therefore Q cannot be equal to see date.

29
00:03:19,810 --> 00:03:21,320
‫So how do we connect them?

30
00:03:22,150 --> 00:03:28,900
‫Well, in order to get from Y to to Y B, what did you do now?

31
00:03:28,900 --> 00:03:37,180
‫If you look at it, then you could take this picture out of context and you could pretend that this

32
00:03:37,300 --> 00:03:45,690
‫frame in green X to Y to Z two, you can treat it as an inertial frame, even though it's not.

33
00:03:45,880 --> 00:03:54,400
‫But just for this specific case, you could pretend that this is the inertia frame and in that case,

34
00:03:54,400 --> 00:03:58,290
‫the red frame X B will be in Zebb.

35
00:03:58,810 --> 00:04:08,260
‫This is the rotated frame that you rotated by applying the rotation matrix R, sub X, and you could

36
00:04:08,260 --> 00:04:09,160
‫do that, right?

37
00:04:09,670 --> 00:04:16,750
‫If you take this thing out of context and you just pretend that X to Y two and Z two is the inertia

38
00:04:16,750 --> 00:04:25,810
‫frame and you multiply this are sub X matrix by the red body frame, then you will get your inertial

39
00:04:25,810 --> 00:04:26,230
‫frame.

40
00:04:27,010 --> 00:04:36,010
‫In other words, if you measure something in the body frame and then you multiply this R sub X matrix

41
00:04:36,430 --> 00:04:44,730
‫by it, then whatever you're measuring you will have it in this green x2, y2 and Z to frame.

42
00:04:45,100 --> 00:04:50,790
‫And if you forget about everything else, then you could pretend that this is your inertia frame.

43
00:04:51,190 --> 00:04:59,410
‫But the point is that the rotation matrix R sub X is the connection between these two frames and you

44
00:04:59,410 --> 00:05:01,030
‫can also write it down like this.

45
00:05:01,840 --> 00:05:10,780
‫And now we can apply this logic to our situation because our goal was to connect CU with Theta Dot and

46
00:05:10,780 --> 00:05:12,030
‫we can do it like this.

47
00:05:12,460 --> 00:05:20,410
‫This is our rotation matrix, our sub X, and you know that it's our sub X because it has the angle

48
00:05:20,680 --> 00:05:29,560
‫phi in it which is here, and the x axis of both frames are equal, which is why you have one here.

49
00:05:29,860 --> 00:05:39,100
‫So that's why you know that it's our sub X and so we can multiply this matrix by CU, which is here

50
00:05:39,100 --> 00:05:47,260
‫in this red reference frame so we can write it down like this zero Q zero.

51
00:05:47,980 --> 00:05:58,030
‫And if we multiply this matrix by this red vector then we will get zero theta dot inside that.

52
00:05:58,300 --> 00:06:02,950
‫So now you see why I wrote these variables in this form.

53
00:06:03,250 --> 00:06:10,240
‫And of course we can write it down like this as well, where we just use this abbreviation instead of

54
00:06:10,240 --> 00:06:11,460
‫this entire matrix.

55
00:06:12,310 --> 00:06:19,450
‫And suppose that you want to go back and you have information about theta that radians per second,

56
00:06:19,900 --> 00:06:27,190
‫then you very simply take the R X matrix and you take the inverse of it and then you multiply it by

57
00:06:27,190 --> 00:06:31,710
‫this green vector and that's how you get this vector here.

58
00:06:32,260 --> 00:06:41,600
‫And now finally, how about R, which is the angular velocity of the drone about the Zebb axis?

59
00:06:42,100 --> 00:06:48,700
‫How would we connect our to the time derivative of the oil angle.

60
00:06:49,160 --> 00:06:59,710
‫BPCI how do we connect are with BPCI Dots and remember sai that is what happens here according to our

61
00:06:59,710 --> 00:07:03,490
‫convention and I will leave it to you as an exercise.

62
00:07:03,910 --> 00:07:08,860
‫Try doing it yourself and then you will see the solutions in the next video.

63
00:07:09,280 --> 00:07:11,670
‫Thank you very much and see you there.

