﻿1
00:00:00,330 --> 00:00:01,170
‫Welcome back.

2
00:00:01,530 --> 00:00:07,610
‫Let's see now how we can connect R and Cidade radians per second.

3
00:00:07,890 --> 00:00:17,580
‫So if you look at how we went from side that to R, then you can see that BPCI that rotates about the

4
00:00:17,580 --> 00:00:23,070
‫inertia Z axis, which is equal to small Z one axis.

5
00:00:23,580 --> 00:00:30,300
‫Then from Z one we went to Z two and then from Z two we went to Z B.

6
00:00:30,870 --> 00:00:37,350
‫Now we already know how to connect the green and then the red reference frame and now we need to figure

7
00:00:37,350 --> 00:00:41,550
‫out how we connect the purple and the green reference frame here.

8
00:00:42,610 --> 00:00:50,290
‫Again, you can pretend that this purple reference frame is the inertial reference frame, even though

9
00:00:50,290 --> 00:00:57,700
‫it's not in the global picture, but if we take this small picture out of the context, then what you

10
00:00:57,700 --> 00:01:04,690
‫see is that you see that the purple reference frame is addressed and then the green reference frame

11
00:01:04,690 --> 00:01:05,680
‫is rotating.

12
00:01:05,920 --> 00:01:12,610
‫With respect to the purple reference frame, if that's the case, then we can apply a rotation matrix

13
00:01:12,610 --> 00:01:12,920
‫here.

14
00:01:13,420 --> 00:01:21,430
‫Now you can see that we are rotating at an angle, Seeta and if we pretend that the purple reference

15
00:01:21,430 --> 00:01:28,840
‫frame is the inertial reference frame, then that means that this Y one, we are pretending that it's

16
00:01:28,840 --> 00:01:35,220
‫an inertial y axis and then we're like rotating about the inertial y axis.

17
00:01:35,950 --> 00:01:45,850
‫It means that we are taking this are sub y rotation matrix and we are multiplying it by this green reference

18
00:01:45,850 --> 00:01:47,980
‫frame which is here.

19
00:01:48,430 --> 00:01:54,520
‫And then whatever we are measuring in the green reference frame, we're getting this quantity in the

20
00:01:54,520 --> 00:02:01,020
‫purple reference frame, as you can see here, and you can write it down like that as well.

21
00:02:01,030 --> 00:02:09,700
‫Of course, this is the R sub Y matrix and we already know how to connect the green reference frame

22
00:02:10,090 --> 00:02:11,580
‫with the red reference frame.

23
00:02:11,590 --> 00:02:11,960
‫Right.

24
00:02:12,610 --> 00:02:16,240
‫It's like this, just like we saw it in the last video.

25
00:02:16,750 --> 00:02:25,450
‫But that also means that I can connect the purple reference frame and the red reference frame like this.

26
00:02:25,930 --> 00:02:31,210
‫And this part here, it's this one is the green reference frame.

27
00:02:31,570 --> 00:02:38,110
‫But we could write our green reference frame in terms of our red reference frame, which is actually

28
00:02:38,110 --> 00:02:40,170
‫connected to the drone like this.

29
00:02:40,660 --> 00:02:42,340
‫And so we can just substitute it.

30
00:02:42,880 --> 00:02:50,470
‫And now we have an equation that connects our purple reference frame with our red reference frame.

31
00:02:50,980 --> 00:02:59,520
‫So our rotation matrices now connect this red reference frame with this purple reference frame.

32
00:02:59,890 --> 00:03:09,930
‫And that's what we need because the rotation happens about the red reference frame Z axis inside.

33
00:03:09,940 --> 00:03:16,210
‫That happens about the purple reference frame, the Z axis.

34
00:03:16,660 --> 00:03:24,910
‫That means that if you're on rotation happens in the red reference frame, which again is actually attached

35
00:03:24,910 --> 00:03:33,790
‫to the drone, then you can very simply connect them with these two rotation matrices like this.

36
00:03:34,300 --> 00:03:43,060
‫Or if you want to go back and you have your information on BPCI DOT will, then you very simply take

37
00:03:43,060 --> 00:03:45,370
‫their inverse and that's it.

38
00:03:46,270 --> 00:03:56,800
‫And now what we want to do, we want to write the vector P, Q, R, which are the rotational velocities

39
00:03:57,190 --> 00:04:04,530
‫about the red reference frame axis, which is the real body frame that is attached to the drone.

40
00:04:05,140 --> 00:04:07,030
‫We're going to write it out like this.

41
00:04:07,660 --> 00:04:08,690
‫And I can do that.

42
00:04:08,710 --> 00:04:09,100
‫Right.

43
00:04:09,490 --> 00:04:12,970
‫Linear algebra allows me to add vectors like that.

44
00:04:13,330 --> 00:04:22,060
‫However, if you recall, then this vector could be written like this and that's good because now we

45
00:04:22,060 --> 00:04:25,030
‫have an oilor angle time derivative here.

46
00:04:25,630 --> 00:04:26,830
‫So let's do that.

47
00:04:27,160 --> 00:04:34,420
‫Are sub X inverse times zero feet and that in zero.

48
00:04:34,900 --> 00:04:43,240
‫Now if you also recall then this vector here was equal to this vector here, which is again very good

49
00:04:43,240 --> 00:04:48,300
‫because we have another time derivative of one of our Euler angles.

50
00:04:48,910 --> 00:04:50,440
‫So let's write it here.

51
00:04:51,010 --> 00:04:53,920
‫Five dot zero and zero.

52
00:04:54,430 --> 00:05:03,020
‫And remember, the reason why they were equal was because here X2 and X B, they were in the same direction.

53
00:05:03,460 --> 00:05:12,610
‫And finally, this vector, if you recall, could be written like this, which is also very good because

54
00:05:12,610 --> 00:05:15,950
‫we have another oilor angle time derivative here.

55
00:05:16,480 --> 00:05:17,290
‫There you go.

56
00:05:17,290 --> 00:05:20,230
‫The multiplication of these two rotation matrices.

57
00:05:20,710 --> 00:05:28,180
‫And if you take an inverse of their product and multiply it by this purple vector, then you can get

58
00:05:28,180 --> 00:05:29,640
‫this vector.

59
00:05:30,010 --> 00:05:39,350
‫And so we can just add them together and we will have P, Q, R, which is the same like this one.

60
00:05:39,790 --> 00:05:40,810
‫And there you go.

61
00:05:41,290 --> 00:05:51,130
‫We have written our P Q R rotational velocities, in other words, the rotational velocities, but the

62
00:05:51,490 --> 00:06:02,080
‫body frame, X, Y, Z axis, we have written them in terms of our oilor angle changes with respect

63
00:06:02,080 --> 00:06:02,630
‫to time.

64
00:06:03,220 --> 00:06:11,650
‫So now we know how the oilor angle changes and the angular velocities about the drones axis, how they

65
00:06:11,650 --> 00:06:13,060
‫are related to each other.

66
00:06:14,270 --> 00:06:23,210
‫But this still is not our main goal, our main goal was to find this transfer matrix and the inverse

67
00:06:23,210 --> 00:06:33,140
‫of it so that we could conveniently switch between the body frame angular velocities and the oil angle

68
00:06:33,530 --> 00:06:35,400
‫changes with respect to time.

69
00:06:35,990 --> 00:06:43,130
‫We want the transfer matrix so that we could have these kind of relationships like we have here.

70
00:06:43,580 --> 00:06:47,350
‫And to get that, we still need to work on this equation.

71
00:06:47,900 --> 00:06:51,710
‫And essentially what we need to do, we keep the peak.

72
00:06:51,710 --> 00:06:53,240
‫You are vector the same.

73
00:06:53,700 --> 00:07:03,260
‫However, our oilor angle time derivatives have to be in this form, just like we saw before, to make

74
00:07:03,260 --> 00:07:04,360
‫the connection here.

75
00:07:04,370 --> 00:07:06,770
‫We need the inverse of the transfer matrix.

76
00:07:07,340 --> 00:07:14,990
‫And so this is the form that we want because this form allows us to find our transfer matrix inverse.

77
00:07:15,560 --> 00:07:24,320
‫And once we have our transfer matrix inverse, we just take the inverse of that and we get our transfer

78
00:07:24,320 --> 00:07:24,880
‫matrix.

79
00:07:25,520 --> 00:07:35,560
‫But in order to do that, you have to take this entire thing here and you have to put it into this form

80
00:07:36,200 --> 00:07:38,660
‫so that will test your mathematics skills.

81
00:07:39,080 --> 00:07:45,070
‫So I will leave it to you as an exercise and then you will see the solution in the next video.

82
00:07:45,500 --> 00:07:51,070
‫But try doing it yourself first and just challenge yourself, see if you can do it.

83
00:07:51,530 --> 00:07:55,020
‫If not, not a problem, but at least give it a try.

84
00:07:55,580 --> 00:07:58,490
‫So thank you very much and see you in the next video.

