﻿1
00:00:00,750 --> 00:00:01,620
‫Welcome back.

2
00:00:02,160 --> 00:00:12,120
‫So now that we have covered the three conventions and derived the rotation matrix for them now, I think

3
00:00:12,120 --> 00:00:21,390
‫it's a good idea to finalize our discussion about these conventions by going back to this exercise here.

4
00:00:21,960 --> 00:00:28,050
‫And I think after this video, your intuition about these conventions will be much better.

5
00:00:28,530 --> 00:00:39,540
‫So in the last videos, we derived rotation matrices for X, Y, Z, Z, Y, X and X, Y, X.

6
00:00:40,200 --> 00:00:48,210
‫In each case, the final rotation matrix is different because you multiply different matrices together,

7
00:00:48,870 --> 00:00:55,950
‫or if you use the same matrices, then you simply multiply them together in a different order.

8
00:00:56,580 --> 00:01:05,160
‫For example, here it's our Z times are Y times R, X, and then here are X, times are Y, times are

9
00:01:05,160 --> 00:01:05,440
‫Z.

10
00:01:05,880 --> 00:01:08,730
‫So obviously these matrices are different.

11
00:01:09,290 --> 00:01:19,500
‫OK, so some videos ago we chose a convention are X, Y, Z, and then we said that all the angles,

12
00:01:20,010 --> 00:01:23,970
‫Fifita and Passi, they were all power to radians.

13
00:01:24,450 --> 00:01:30,360
‫And because of this convention, our body frame ended up in this configuration.

14
00:01:30,900 --> 00:01:42,300
‫And then we said that our drone had this angular velocity, its p q r components were all one radians

15
00:01:42,300 --> 00:01:46,140
‫per second in each body frame dimension.

16
00:01:46,710 --> 00:01:55,260
‫And then we found out that if we take this matrix, our Z times are Y times R X, which is essentially

17
00:01:55,530 --> 00:02:00,080
‫this matrix here because you see the same convention, X, Y, Z.

18
00:02:00,720 --> 00:02:11,100
‫And if we substitute all the angles with PI over to Radians, then this big matrix here will boil down

19
00:02:11,490 --> 00:02:13,150
‫to this matrix here.

20
00:02:13,710 --> 00:02:20,910
‫And so you took the components of your purple vector in the body frame that where one, one, one.

21
00:02:21,570 --> 00:02:30,660
‫And once you multiplied this three by three matrix by it, you found the coordinates of the drones angular

22
00:02:30,660 --> 00:02:33,430
‫velocity vector in the inertia frame.

23
00:02:33,930 --> 00:02:41,250
‫So in the inertial frame, which is this white one, which is fixed in this frame, this purple vector

24
00:02:41,850 --> 00:02:52,260
‫has a value of one in the X direction, a value of one in the Y direction and a value of minus one in

25
00:02:52,260 --> 00:02:53,310
‫the Z direction.

26
00:02:53,790 --> 00:03:01,560
‫And by inspection, you could verify that it's true because if all your angles are pi over two radians,

27
00:03:02,190 --> 00:03:05,450
‫then it's very easy to visually inspect all this.

28
00:03:06,060 --> 00:03:14,160
‫But what would happen if instead of this convention, I used this convention here, Zwick's.

29
00:03:14,700 --> 00:03:25,980
‫What if I had taken this matrix here, this rotation matrix, and used this one to multiply by this

30
00:03:25,980 --> 00:03:27,740
‫green one one one vector?

31
00:03:28,320 --> 00:03:34,720
‫Well, your intuition should tell you that you would get a wrong answer, but we can verify it.

32
00:03:35,310 --> 00:03:45,510
‫Let's take this rotation matrix here and substitute all the angles with PI over to so our Phi Theta

33
00:03:45,510 --> 00:03:47,850
‫and PSI, they're all pi over to radians.

34
00:03:48,180 --> 00:03:53,940
‫Or if we choose to name those angles, gamma, beta and alpha still pi over to radians.

35
00:03:54,390 --> 00:04:01,560
‫The good thing about power to Radians is that whenever you see a cosine then you know that that term

36
00:04:01,560 --> 00:04:02,040
‫is zero.

37
00:04:02,090 --> 00:04:05,430
‫So for example here you know it will be zero.

38
00:04:06,000 --> 00:04:09,290
‫Then here you have a cosine here and you have a cosine here.

39
00:04:09,840 --> 00:04:17,190
‫So this element will also be zero and here you will have two sides and then here you have cosines.

40
00:04:17,710 --> 00:04:20,930
‫So this part will be one and then this part will be zero.

41
00:04:21,480 --> 00:04:24,720
‫So you will have zero zero and one.

42
00:04:25,410 --> 00:04:26,880
‫Then here you have a cosine.

43
00:04:26,880 --> 00:04:30,650
‫So zero then here you have to cosine zero.

44
00:04:30,990 --> 00:04:37,890
‫But then here you have sine so you will have one with a minus sign and then here you will have zero

45
00:04:38,220 --> 00:04:42,470
‫and then here you will have zero as well because you have cosigns here.

46
00:04:42,960 --> 00:04:46,580
‫So you will have a zero minus one and zero.

47
00:04:47,160 --> 00:04:51,770
‫And finally you have a sign here and here and here you have cosines.

48
00:04:52,140 --> 00:04:56,270
‫So these two elements will be Xeros, but here you will have one.

49
00:04:56,790 --> 00:04:59,730
‫So you will have one zero and zero.

50
00:05:00,310 --> 00:05:06,910
‫So now if you take this matrix and multiply it by this peak, you are matrix, then you will get one

51
00:05:06,910 --> 00:05:08,500
‫minus one and one.

52
00:05:09,100 --> 00:05:14,420
‫So you should have positive X, negative Y and then positive Z.

53
00:05:15,040 --> 00:05:21,120
‫Obviously, it's not true because you have positive X and positive Y and negative Z.

54
00:05:21,700 --> 00:05:30,820
‫And it makes sense because this body frame, it's in this orientation because we followed the X, Y,

55
00:05:30,820 --> 00:05:39,070
‫Z convention, we first rotated power to radians about the inertial X axis, then pi over to radians

56
00:05:39,280 --> 00:05:45,000
‫about the inertial y axis and then power to Radians about the inertial Z axis.

57
00:05:45,460 --> 00:05:49,830
‫And that's why your body frame ended up in this configuration.

58
00:05:50,380 --> 00:05:58,060
‫And so when you have your drone's angular velocity, then you measure this omega B in the body frame,

59
00:05:58,600 --> 00:06:00,650
‫which is in this configuration.

60
00:06:01,240 --> 00:06:08,170
‫Now what you need to understand is that your drone's angular velocity vector does not depend on which

61
00:06:08,170 --> 00:06:09,440
‫convention you choose.

62
00:06:09,880 --> 00:06:16,660
‫In this sense that if this vector points in this direction, then it will point in this direction,

63
00:06:16,840 --> 00:06:20,500
‫regardless of which convention you choose.

64
00:06:20,980 --> 00:06:29,230
‫So, for example, if this is my x axis and this is my Y axis and let's say that I'm walking in this

65
00:06:29,230 --> 00:06:36,070
‫direction, then that means that I'm walking in the positive X direction and then the Y dimension is

66
00:06:36,070 --> 00:06:37,570
‫not affected at all.

67
00:06:38,200 --> 00:06:46,960
‫But now, if I all of a sudden decide to change my convention, then I'm still walking in this direction.

68
00:06:47,540 --> 00:06:50,400
‫If this is my home, then I want to go home.

69
00:06:50,950 --> 00:06:53,880
‫And that means that I have to walk in this direction.

70
00:06:54,430 --> 00:06:59,690
‫So if I change my convention, I will still walk towards my home.

71
00:07:00,250 --> 00:07:09,940
‫I'm not going to change the direction of my motion just because all of a sudden the convention changed.

72
00:07:10,510 --> 00:07:18,160
‫No, I will still keep walking towards my home no matter what is just if I use this convention, then

73
00:07:18,160 --> 00:07:26,230
‫I'm walking in the positive X direction and then if I change my convention, then all that means is

74
00:07:26,230 --> 00:07:33,940
‫that now I'm walking in the negative X direction and the same thing with the angular velocity of the

75
00:07:33,940 --> 00:07:34,360
‫drone.

76
00:07:35,020 --> 00:07:43,870
‫If that's the vector of the angle of velocity of the drone, if that's how fast the drone rotates and

77
00:07:43,870 --> 00:07:51,790
‫if that's the direction of the drones rotation, then that's how this vector will be, regardless of

78
00:07:51,970 --> 00:07:53,590
‫which convention I choose.

79
00:07:54,100 --> 00:08:00,580
‫So if I all of a sudden want to change my convention and let's say that I want to use this convention,

80
00:08:00,580 --> 00:08:08,980
‫Tsewang X will, then first of all, I need to understand how this body frame will be oriented with

81
00:08:08,980 --> 00:08:10,630
‫respect to the initial frame.

82
00:08:11,290 --> 00:08:17,750
‫If I use that convention and I rotate power to radiance about all my inertial axis.

83
00:08:18,250 --> 00:08:28,570
‫So this here, the lower one, this is my Zwi X convention, so I first rotate power to Radians about

84
00:08:28,570 --> 00:08:37,570
‫the inertial Z axis, then I rotate power to radiance about the inertial Y axis and then power to radians

85
00:08:37,570 --> 00:08:39,100
‫about the inertial x axis.

86
00:08:39,640 --> 00:08:48,790
‫So if I use the R, Z, Y, X convention, then my body frame will be in this orientation.

87
00:08:49,450 --> 00:08:56,830
‫If I rotate about all the inertial axis by pi over to radians, if the angles are different, then of

88
00:08:56,830 --> 00:09:00,870
‫course this body frame will be oriented differently.

89
00:09:01,450 --> 00:09:10,330
‫But in case of power to radians using the R, Z, Y, X convention, my body frame will be oriented

90
00:09:10,930 --> 00:09:19,370
‫in this way, not in this way that we had for R, X, Y, Z, but in this way our Zywiec.

91
00:09:20,140 --> 00:09:29,200
‫So this is my inertial frame and now our body frame is in this configuration because we used this convention

92
00:09:29,830 --> 00:09:33,190
‫and all our angles were pyra to radians.

93
00:09:33,790 --> 00:09:45,090
‫You see, it's like here, here you have X, B then Y be and then A Zebb XP, Y, B and Zebb.

94
00:09:45,670 --> 00:09:55,210
‫But like I said, the drone itself physically will not start rotating differently just because you went

95
00:09:55,210 --> 00:09:59,350
‫from R, X, Y, Z to R, Z, Y, X.

96
00:10:00,180 --> 00:10:10,170
‫The angular velocity vector of this drone is still like this, just like it's here in this picture.

97
00:10:10,770 --> 00:10:13,550
‫Its components are still in the same direction.

98
00:10:14,070 --> 00:10:22,440
‫And this is your Omega B, but because of the fact that you changed your convention, then you have

99
00:10:22,440 --> 00:10:25,220
‫to make some modifications to your components.

100
00:10:25,590 --> 00:10:28,880
‫So, OK, this is your body frame x axis.

101
00:10:28,920 --> 00:10:36,170
‫So that means that this component is still your P, then this is your body frame Y axis.

102
00:10:36,690 --> 00:10:40,590
‫So this is your Q and this is your body from Z axis.

103
00:10:41,130 --> 00:10:42,370
‫So this is your arm.

104
00:10:42,900 --> 00:10:50,760
‫So if you compare these two situations, then you can see that you have P here and then you also call

105
00:10:50,770 --> 00:10:57,680
‫this P, then you have Q here and you also call this Q and then you have your R here.

106
00:10:58,290 --> 00:11:01,640
‫And in this case your R is also here.

107
00:11:02,100 --> 00:11:06,340
‫So you did not have to rename your components.

108
00:11:06,750 --> 00:11:15,210
‫However, there is something different in this case, X, Y, Z, which was our original case, this

109
00:11:15,210 --> 00:11:21,110
‫purple vector, it's coordinates in the body frame where one one one.

110
00:11:21,690 --> 00:11:31,590
‫But since we changed our convention, now the coordinates of our angular velocity vector in the body

111
00:11:31,590 --> 00:11:35,010
‫frame is not one one one anymore.

112
00:11:35,580 --> 00:11:44,640
‫Now you see that your P is minus one because it's in the opposite direction to the positive body frame

113
00:11:44,640 --> 00:11:45,480
‫x axis.

114
00:11:46,020 --> 00:11:53,010
‫Then the same thing with Q it's also minus one and then your R is positive one.

115
00:11:53,580 --> 00:12:02,580
‫Since you changed your convention, the drone still continues to rotate as it had rotated when you used

116
00:12:02,580 --> 00:12:03,590
‫this convention.

117
00:12:04,200 --> 00:12:07,920
‫So the physical emotional of the drone hasn't changed.

118
00:12:08,430 --> 00:12:16,530
‫But since you changed your convention, you now describe this physical motion in your body frame differently

119
00:12:17,130 --> 00:12:18,280
‫in this convention.

120
00:12:18,990 --> 00:12:22,290
‫This motion is this minus one, minus one and one.

121
00:12:22,890 --> 00:12:30,600
‫And now if we take this matrix that corresponds to this convention, why X?

122
00:12:31,140 --> 00:12:40,350
‫And then we multiply it by the coordinates of the angular velocity vector in the body frame that corresponds

123
00:12:40,530 --> 00:12:49,980
‫to this convention, then you will get one here, one here and minus one here.

124
00:12:50,520 --> 00:12:56,070
‫And these are your inertial frame coordinates and you see now you get the right stuff.

125
00:12:56,580 --> 00:13:05,820
‫Now this purple vector indeed has a positive X component, positive Y component and the negative Z component

126
00:13:05,820 --> 00:13:07,050
‫in the inertia frame.

127
00:13:07,590 --> 00:13:12,150
‫And we got the same result when we use this X, Y, Z convention.

128
00:13:12,810 --> 00:13:20,160
‫It's just in the case of X, Y, Z, the body frame coordinates of this purple vector where one, one,

129
00:13:20,160 --> 00:13:29,010
‫one, and then the corresponding rotation matrix for this convention provided that all the angles are

130
00:13:29,010 --> 00:13:31,530
‫pi over to radians was this.

131
00:13:32,130 --> 00:13:37,740
‫And that's how you found out the inertia from coordinates for this purpose vector.

132
00:13:38,340 --> 00:13:46,320
‫But now since we changed our convention, then our matrix changed and our body frame coordinates changed.

133
00:13:46,800 --> 00:13:53,130
‫But if we stick to the convention that we choose, we will still get the right inertia frame coordinates.

134
00:13:53,460 --> 00:14:00,240
‫So you see, when you move from one convention to another, your inertia friend coordinates do not change.

135
00:14:00,900 --> 00:14:07,470
‫What do change are your rotation matrix and your body frame coordinates.

136
00:14:07,890 --> 00:14:13,920
‫And now to really solidify this understanding, let's go through the same thing.

137
00:14:13,920 --> 00:14:17,820
‫But for this convention are X, Y, X.

138
00:14:18,390 --> 00:14:20,170
‫Let's do that in the next video.

139
00:14:20,760 --> 00:14:21,630
‫Thank you very much.

