﻿1
00:00:00,760 --> 00:00:01,630
‫Welcome back.

2
00:00:02,260 --> 00:00:11,800
‫So now let's finalise our discussion about this rotation matrix conventions by doing what we did in

3
00:00:11,800 --> 00:00:12,790
‫the last video.

4
00:00:13,420 --> 00:00:22,490
‫But for this convention, again, we assume that the physical rotation of the drone is this purple vector.

5
00:00:22,540 --> 00:00:24,040
‫This is a rotation vector.

6
00:00:24,520 --> 00:00:33,130
‫So if my rotation vector is like this, then according to the right hand rule, it means that your object

7
00:00:33,130 --> 00:00:42,250
‫is rotating like this as shown in green, but then the rotation vector is perpendicular to the plane

8
00:00:42,280 --> 00:00:43,410
‫of the rotation.

9
00:00:43,960 --> 00:00:52,090
‫And so if my drone rotates with this purple vector, let's say at five radians per second, then it

10
00:00:52,090 --> 00:00:59,440
‫means that this drone rotates like shown in green at five radians per second.

11
00:01:00,010 --> 00:01:06,790
‫And of course, you can decompose this rotation vector like this.

12
00:01:07,390 --> 00:01:11,640
‫And so, for example, completely unrelated to this convention.

13
00:01:12,280 --> 00:01:21,610
‫If this is my body frame axis, this is my y body frame axis and then this is my body frame axis, then

14
00:01:21,610 --> 00:01:26,430
‫this would be my P, this would be my cue and this would be my arm.

15
00:01:26,950 --> 00:01:34,780
‫So I have decomposed my rotation matrix into three components because then it's convenient for me to

16
00:01:34,780 --> 00:01:37,860
‫keep track of them in the vector form.

17
00:01:38,320 --> 00:01:43,690
‫So that's how we measure rotations using these rotation vectors.

18
00:01:44,470 --> 00:01:48,670
‫OK, let's go back to our R x, y x convention.

19
00:01:49,300 --> 00:01:55,720
‫The physical rotation of the drone is still this as shown with this purple rotation vector.

20
00:01:56,290 --> 00:01:59,470
‫That doesn't change because we changed our convention.

21
00:02:00,040 --> 00:02:07,150
‫But if we rotate our body frame with respect to the inertial frame using this convention and then these

22
00:02:07,150 --> 00:02:16,990
‫are my angles, then the first thing that I need to find out is how my body frame is oriented with respect

23
00:02:16,990 --> 00:02:18,080
‫to the initial frame.

24
00:02:18,550 --> 00:02:26,410
‫So this is the beginning when our body frame completely overlaps with the initial frame and now you

25
00:02:26,410 --> 00:02:30,910
‫rotate piver to radians about the inertial x axis.

26
00:02:31,390 --> 00:02:31,770
‫Right?

27
00:02:31,790 --> 00:02:34,540
‫You first rotate about the inertial x axis.

28
00:02:34,990 --> 00:02:41,980
‫So your body frame ends up in this configuration, then you rotate power to radians about the inertial

29
00:02:41,980 --> 00:02:44,380
‫y axis like this.

30
00:02:44,890 --> 00:02:47,200
‫So you will end up in this configuration.

31
00:02:47,740 --> 00:02:56,140
‫And finally you rotate about the inertia from X axis again by PI over to radians and it will be like

32
00:02:56,140 --> 00:02:56,720
‫this.

33
00:02:57,250 --> 00:03:01,500
‫So this is your inertial frame and this will be your body frame.

34
00:03:02,020 --> 00:03:08,890
‫So if you compare this orientation with this orientation, then you can see that it's different right

35
00:03:09,430 --> 00:03:09,760
‫here.

36
00:03:09,760 --> 00:03:19,270
‫You had X be here, y be here and zib here and now you have X be here, ybe here and Zib here.

37
00:03:19,930 --> 00:03:21,360
‫Well let's see what it means.

38
00:03:21,820 --> 00:03:29,590
‫The rotation vector still has three components in the same direction, so the angular velocity vector

39
00:03:29,950 --> 00:03:31,240
‫is still the same.

40
00:03:31,840 --> 00:03:33,070
‫Is this one here.

41
00:03:33,070 --> 00:03:41,710
‫You see the rotation of the drone hasn't changed, not in terms of its magnitude nor in terms of its

42
00:03:41,710 --> 00:03:42,460
‫direction.

43
00:03:43,030 --> 00:03:47,500
‫The Vector or Hormiga B is exactly the same.

44
00:03:48,040 --> 00:03:54,970
‫However, now we have to rename our components in the case of X, Y, Z convention.

45
00:03:55,630 --> 00:04:03,970
‫This component was P because it was in the direction of body frame X, but now this component is in

46
00:04:03,970 --> 00:04:05,970
‫the direction of body frame Z.

47
00:04:06,520 --> 00:04:14,110
‫So now we have to rename this component and we have to say that this component is R then in the case

48
00:04:14,110 --> 00:04:22,570
‫of the X, Y, Z convention, this was our Q component because it was in the body frame Y direction.

49
00:04:23,200 --> 00:04:27,640
‫But now this component is the same component physically.

50
00:04:28,090 --> 00:04:29,890
‫This component it's the same.

51
00:04:30,490 --> 00:04:36,660
‫But now in this new convention, this component points in the body frame X direction.

52
00:04:37,150 --> 00:04:39,160
‫So now we have to call it P.

53
00:04:39,760 --> 00:04:49,840
‫And in the original case this component was R, but now the same component in the new convention needs

54
00:04:49,840 --> 00:04:51,130
‫to have a different name.

55
00:04:51,700 --> 00:04:52,150
‫So it's.

56
00:04:52,660 --> 00:04:59,770
‫Q So because of the fact that we changed our convention, we have to rename our.

57
00:05:00,990 --> 00:05:08,850
‫And so what would be the body frame coordinates of this vector in this convention, X, Y, X?

58
00:05:09,540 --> 00:05:16,780
‫Well, it will be very simply one one, one, just like in this case, actually.

59
00:05:17,370 --> 00:05:22,630
‫However, the difference is that now the components have different names.

60
00:05:23,040 --> 00:05:31,920
‫So in this case, in the X, Y, Z case, this one that you have here, the first one, which is P,

61
00:05:32,550 --> 00:05:36,090
‫since it's the same component, it's the last one.

62
00:05:36,660 --> 00:05:47,250
‫If this R component had been, let's say, three times longer, not one, but three, then in this X,

63
00:05:47,250 --> 00:05:51,890
‫Y, Z convention, this three would be the first number.

64
00:05:52,530 --> 00:05:57,310
‫But in the X, Y, X convention, it would have been the last number.

65
00:05:57,870 --> 00:06:05,070
‫So in the X, Y, Z convention, it would have been three one one provided that the other components

66
00:06:05,670 --> 00:06:06,710
‫stayed the same.

67
00:06:07,320 --> 00:06:10,990
‫And then in this convention it would have been like that.

68
00:06:11,520 --> 00:06:16,860
‫And so now this is the rotation matrix for this X, Y, X convention.

69
00:06:17,400 --> 00:06:20,910
‫And last substitute all the angles with poverty, radiance.

70
00:06:21,540 --> 00:06:24,860
‫You know that whenever there is a cosine, it means zero.

71
00:06:25,470 --> 00:06:31,730
‫So that means that in this first column you will have zero one and zero like this.

72
00:06:32,250 --> 00:06:38,020
‫Then the second column you will have one here and then zero and zero.

73
00:06:38,580 --> 00:06:40,850
‫So one zero and zero.

74
00:06:41,430 --> 00:06:44,520
‫And then finally you will have zero here.

75
00:06:45,030 --> 00:06:46,440
‫You will have zero here.

76
00:06:46,680 --> 00:06:50,450
‫And then you see that you will have minus one here.

77
00:06:50,970 --> 00:06:53,610
‫So zero zero and minus one.

78
00:06:54,210 --> 00:07:02,070
‫And so to compute the coordinates of this properly vector in the inertia frame, we take this matrix

79
00:07:02,400 --> 00:07:06,630
‫and then we multiplied by the coordinates in the body frame.

80
00:07:07,200 --> 00:07:11,890
‫And as you expect it, you will get one, one and minus one.

81
00:07:12,510 --> 00:07:19,170
‫But now let's really assume that this R component is three times longer.

82
00:07:19,680 --> 00:07:28,000
‫So this component is still one, this component is one, but then the R component is three.

83
00:07:28,700 --> 00:07:38,730
‫Then if we use this convention are X, Y, X, then your angular velocity vector would be one, one

84
00:07:38,940 --> 00:07:39,850
‫and three.

85
00:07:40,410 --> 00:07:44,810
‫So you see P, Q, R would be one one and three.

86
00:07:45,360 --> 00:07:50,140
‫And I really need to project this purple vector down here.

87
00:07:50,730 --> 00:07:53,240
‫So this purple vector, it comes from the origin.

88
00:07:53,880 --> 00:07:59,040
‫And so by inspection you can see that in the inertial frame.

89
00:07:59,580 --> 00:08:05,360
‫The coordinates of this vector are one one minus three.

90
00:08:05,970 --> 00:08:13,800
‫If we take this rotation matrix that came from R, X, Y, X, and then we multiplied by this vector

91
00:08:14,430 --> 00:08:22,250
‫one, one and three, then we'll get one one and minus three as expected.

92
00:08:22,770 --> 00:08:36,210
‫But now if we choose another convention, if we choose R, X, Y, Z, which is in this case, then

93
00:08:36,210 --> 00:08:43,530
‫the purple vector in this convention would be three, one and one.

94
00:08:44,190 --> 00:08:44,790
‫Right.

95
00:08:44,790 --> 00:08:51,750
‫Because you're three now this longer component, it's in the body frame X direction and then the other

96
00:08:51,750 --> 00:08:53,180
‫components are still one.

97
00:08:53,790 --> 00:09:00,840
‫And now if we still want to get the inertial frame coordinates for this purple vector, then we need

98
00:09:00,840 --> 00:09:03,630
‫to get the rotation matrix for this convention.

99
00:09:04,200 --> 00:09:06,630
‫And this rotation matrix was this one here.

100
00:09:06,630 --> 00:09:07,040
‫Right.

101
00:09:07,590 --> 00:09:10,080
‫And so I have it here.

102
00:09:10,650 --> 00:09:15,090
‫And then I multiplied by this vector.

103
00:09:15,730 --> 00:09:27,060
‫Remember, this matrix is for the X, Y, Z convention, and also this vector is for the X, Y, Z convention.

104
00:09:27,600 --> 00:09:34,380
‫And then what I will get is one, one and minus three.

105
00:09:35,040 --> 00:09:38,500
‫As you can see, the same thing, the math works out.

106
00:09:39,090 --> 00:09:42,330
‫So remember, you have a fixed inertial frame.

107
00:09:42,960 --> 00:09:49,680
‫The physical motion of your object doesn't change, but when you change your rotation matrix convention,

108
00:09:50,370 --> 00:09:57,020
‫then two things change your rotation matrix and your body frame coordinates.

109
00:09:57,600 --> 00:09:59,460
‫But in the end, all the.

110
00:09:59,520 --> 00:10:08,060
‫Conventions, if you do it right, we'll give you the right inertial frame coordinates now, you know

111
00:10:08,060 --> 00:10:12,380
‫that if you have information in your body frame.

112
00:10:12,410 --> 00:10:18,290
‫In other words, if you have body frame coordinates and you want to find those coordinates in the inertial

113
00:10:18,290 --> 00:10:21,610
‫frame, then you use the rotation matrix.

114
00:10:21,890 --> 00:10:27,200
‫But if you want to go the other way around, let's say you have information in your inertial frame,

115
00:10:27,830 --> 00:10:33,620
‫but you don't know your body frame coordinates, then you need to take the inverse of your rotation

116
00:10:33,620 --> 00:10:37,670
‫matrix and then you will find your coordinates in the body frame.

117
00:10:38,240 --> 00:10:40,760
‫So how about we test that theory?

118
00:10:41,390 --> 00:10:49,310
‫If we take our convention, which is R, X, Y, Z, and then we rotated power to radians about all

119
00:10:49,310 --> 00:10:58,070
‫the inertial axis, then this was our rotation matrix and then these were the different coordinates

120
00:10:58,460 --> 00:11:05,270
‫when we used this convention and these coordinates here, they were my inertial frame coordinates.

121
00:11:05,510 --> 00:11:09,020
‫So let's assume that I don't know my body frame coordinates.

122
00:11:09,440 --> 00:11:11,780
‫I only have my inertial frame coordinates.

123
00:11:12,170 --> 00:11:15,850
‫In that case, this would be my inertia frame coordinates.

124
00:11:16,370 --> 00:11:24,350
‫Then this here, this would be my inverse of the rotation matrix and here I should have my body frame

125
00:11:24,350 --> 00:11:25,010
‫coordinates.

126
00:11:25,610 --> 00:11:28,520
‫So what would be the inverse of this rotation matrix?

127
00:11:28,970 --> 00:11:37,910
‫Well, since rotation matrices are also normal matrices, then the inverse of these matrices are the

128
00:11:37,910 --> 00:11:41,110
‫transpose of these matrices.

129
00:11:41,630 --> 00:11:45,470
‫In that case, the first row here is zero zero one.

130
00:11:46,100 --> 00:11:47,960
‫It would be the first column here.

131
00:11:48,590 --> 00:11:56,210
‫The second row here would be the second column here, and then the third row here would be the third

132
00:11:56,210 --> 00:11:57,030
‫column here.

133
00:11:57,560 --> 00:12:07,670
‫And so if I performed this matrix vector multiplication, then I will have three, one and one, just

134
00:12:07,670 --> 00:12:10,310
‫as we expected, three one one.

135
00:12:10,940 --> 00:12:19,040
‫If we had used another convention, for example, are X, Y, X, then remember, two things changed

136
00:12:19,490 --> 00:12:23,130
‫the rotation matrix and then the body frame coordinates.

137
00:12:23,480 --> 00:12:30,860
‫So let's take this one here, which follows the convention are X, Y, X again, we assume that we don't

138
00:12:30,860 --> 00:12:32,510
‫know the body frame coordinates.

139
00:12:32,900 --> 00:12:35,060
‫We only know the initial frame coordinates.

140
00:12:35,390 --> 00:12:42,860
‫And this is the rotation matrix that came from this convention, x, y, x, since rotation matrices

141
00:12:42,860 --> 00:12:47,660
‫are also normal, therefore it is very easy to take their inverse.

142
00:12:48,260 --> 00:12:50,060
‫You simply take their transpose.

143
00:12:50,480 --> 00:12:54,260
‫And the transpose of this matrix is this one.

144
00:12:54,860 --> 00:13:03,080
‫This is the R x, y x rotation matrix inverse, which is actually the same matrix like the original

145
00:13:03,080 --> 00:13:04,190
‫rotation matrix.

146
00:13:04,700 --> 00:13:09,830
‫So if you take the transpose of this matrix, then it will be the same matrix.

147
00:13:10,310 --> 00:13:17,660
‫And I guess that has to do with the fact that we have this interesting convention here, X, Y, X.

148
00:13:18,260 --> 00:13:23,120
‫We rotated two times about the inertial X axis.

149
00:13:23,660 --> 00:13:27,850
‫But anyway, these are our coordinates in the inertia frame.

150
00:13:28,460 --> 00:13:35,720
‫So we put them here and as a result we get our body frame coordinates one, one and three.

151
00:13:36,260 --> 00:13:41,270
‫And that's what we have for our R, X, Y, X convention.

152
00:13:41,780 --> 00:13:43,340
‫So the math works out.

153
00:13:43,790 --> 00:13:51,320
‫And of course, as mentioned before, in this course, we will use this rotation matrix that could be

154
00:13:51,320 --> 00:14:00,320
‫applied to two conventions, the fixed angle approach and then the oilor moving frame approach.

155
00:14:00,950 --> 00:14:10,370
‫In this course we will be using the convention are sub Z, Y, X.

156
00:14:11,150 --> 00:14:16,670
‫These are small letters, so meaning that we are rotating about the body frame axis.

157
00:14:17,090 --> 00:14:24,800
‫So we are using the oilor angle approach, meaning that we will first rotate about the body frame Z

158
00:14:24,800 --> 00:14:33,470
‫axis, then we will rotate about the body frame Y axis and then about the body frame x axis.

159
00:14:34,010 --> 00:14:38,650
‫And that's it about these rotation matrix conventions.

160
00:14:39,080 --> 00:14:44,490
‫I hope that this extra explanation about these conventions has been helpful.

161
00:14:45,050 --> 00:14:45,920
‫Thank you very much.

