﻿1
00:00:00,590 --> 00:00:01,310
‫Welcome back.

2
00:00:02,240 --> 00:00:10,420
‫So what about this BPCI, our angle, how does it look like in this entire story here?

3
00:00:11,270 --> 00:00:14,960
‫I have a reader on the axis here and this is your angle.

4
00:00:15,920 --> 00:00:25,160
‫And even though the Passi are is provided by the planner and not by this feedback legalization controller,

5
00:00:25,700 --> 00:00:35,690
‫it is still served to the NPC controller in the same way you have five data points from zero up until

6
00:00:35,690 --> 00:00:37,430
‫zero point four seconds.

7
00:00:38,330 --> 00:00:40,040
‫And these data points are equal.

8
00:00:41,050 --> 00:00:45,760
‫So even though your BPCI are comes from the planner.

9
00:00:46,870 --> 00:00:52,750
‫It is given to the NPC controller when the outer loop happens.

10
00:00:53,790 --> 00:01:03,120
‫So this is your BPCI are one and then your side true, your true, your angle will adjust itself like

11
00:01:03,120 --> 00:01:03,540
‫this.

12
00:01:04,680 --> 00:01:10,890
‫And so when the next outer loop happens, then the planner will give another batch of information to

13
00:01:10,890 --> 00:01:12,660
‫the NPC controller.

14
00:01:13,720 --> 00:01:22,060
‫And the NPC will start working to produce a response like this, for example, and that would be your

15
00:01:22,100 --> 00:01:30,970
‫BPCI are two and then a new outflux happens and you have your BPCI are three.

16
00:01:32,220 --> 00:01:41,430
‫And the embassy will do its magic in zero point one second intervals, which would be the simple time

17
00:01:41,430 --> 00:01:42,070
‫interval.

18
00:01:42,960 --> 00:01:49,940
‫And so here you can see the drone in action trying to follow this trajectory.

19
00:01:50,460 --> 00:02:00,030
‫And here you have the reference X dimension, then you have the reference Y dimension and then you have

20
00:02:00,030 --> 00:02:02,400
‫the reference Z dimension.

21
00:02:03,060 --> 00:02:06,990
‫You can see that the trajectory has some kind of initial height.

22
00:02:07,110 --> 00:02:13,410
‫So even though your drone starts at the altitude of zero meters, then the trajectory starts at the

23
00:02:13,410 --> 00:02:14,860
‫altitude of five meters.

24
00:02:15,120 --> 00:02:19,940
‫So the drone needs to catch the altitude of the trajectory as well.

25
00:02:20,700 --> 00:02:23,730
‫And then these are the angles here.

26
00:02:23,910 --> 00:02:31,710
‫So sirtf the reference, your angle comes from the planner, but then fire off and then theatric.

27
00:02:31,980 --> 00:02:35,520
‫They are calculated by the feedback lionization controller.

28
00:02:36,360 --> 00:02:40,370
‫And so I want to zoom in on these angles here.

29
00:02:40,980 --> 00:02:49,060
‫And so in blue you have the reference values and then in red you have the true values.

30
00:02:49,500 --> 00:02:54,470
‫So essentially the red line is trying to catch the blue line.

31
00:02:54,990 --> 00:03:00,760
‫In other words, your drone is trying to catch the blue reference values.

32
00:03:01,590 --> 00:03:07,590
‫And so, for example, if you know, zoom in, let's take this section here.

33
00:03:08,370 --> 00:03:15,300
‫So you see, this is what I have been talking about, the outer loop, the feedback mineralisation controller

34
00:03:15,690 --> 00:03:25,290
‫gives you a reference value for zero point four seconds, which is a constant value here, a straight

35
00:03:25,290 --> 00:03:26,880
‫line in this section.

36
00:03:27,660 --> 00:03:32,960
‫But then the NPC controller is trying to catch up.

37
00:03:32,970 --> 00:03:43,890
‫It's trying to reach this blue reference line in four iterations where one iteration lasts for zero

38
00:03:43,890 --> 00:03:45,240
‫point one seconds.

39
00:03:46,230 --> 00:03:52,060
‫So we can also try to zoom in this part here and here as well.

40
00:03:52,620 --> 00:04:01,900
‫So this would be, for example, K plus one K plus two K plus three and then K plus four.

41
00:04:02,730 --> 00:04:08,030
‫Now here I showed you that when you're outer loop finishes.

42
00:04:08,310 --> 00:04:10,640
‫So this is your K plus four here.

43
00:04:10,950 --> 00:04:14,580
‫Then from here you start with your K.

44
00:04:15,410 --> 00:04:24,020
‫However, Python doesn't plot too values for the same time, so for zero point four seconds is just

45
00:04:24,020 --> 00:04:26,840
‫going to plot this lower point.

46
00:04:27,260 --> 00:04:32,000
‫And then the next point that it will plot, it will be here.

47
00:04:32,150 --> 00:04:34,790
‫So it will skip this one here.

48
00:04:35,300 --> 00:04:41,720
‫So you will have a line from this point here up until this point here.

49
00:04:41,930 --> 00:04:42,520
‫All right.

50
00:04:43,400 --> 00:04:45,750
‫And that's what you see here.

51
00:04:45,800 --> 00:04:50,800
‫So this is keep us four and then here you would have your back.

52
00:04:51,050 --> 00:04:52,340
‫But Python doesn't plot.

53
00:04:52,370 --> 00:05:00,800
‫It is just going to put K plus one here and you have a line here and then the NPCs trying to catch up.

54
00:05:01,790 --> 00:05:05,720
‫By moving the drone angles closer to the reference values.

55
00:05:06,650 --> 00:05:13,340
‫And then the true drone angles are represented with these red lines here.

56
00:05:14,430 --> 00:05:21,500
‫And then, of course, we have other trajectories here as well, like, for example, this spiral trajectory

57
00:05:21,990 --> 00:05:26,830
‫and again, the spiral trajectory has an initial height of five meters.

58
00:05:27,660 --> 00:05:29,840
‫And so here you have the angles.

59
00:05:30,240 --> 00:05:34,620
‫And if we zoom them in, then you can see the same thing.

60
00:05:34,800 --> 00:05:40,670
‫You see, for example, let's take this area here and that's how it looks like.

61
00:05:41,340 --> 00:05:41,970
‫And then.

62
00:05:42,940 --> 00:05:52,420
‫The same thing here, and let's take this area so you see for each outer loop here, you have one,

63
00:05:52,900 --> 00:05:57,010
‫two, three and four inner loops.

64
00:05:57,190 --> 00:05:57,850
‫All right.

65
00:05:59,010 --> 00:06:01,420
‫So that's the story with the angle.

66
00:06:02,430 --> 00:06:09,570
‫In addition, the feedback in ization controller will also need something else from the planner.

67
00:06:10,110 --> 00:06:28,080
‫It will need the time derivative of X or Y and Z are so X, dot R, then Y, dot R and then Z dot R.

68
00:06:28,950 --> 00:06:35,790
‫And even that is not all because it will also need the second derivative of the reference value.

69
00:06:36,180 --> 00:06:51,180
‫So X double dot R then Y double dot R and then Z double dot R and you will see Y when we start covering

70
00:06:51,480 --> 00:06:52,650
‫this feedback.

71
00:06:52,660 --> 00:06:54,040
‫Lionization controller.

72
00:06:54,930 --> 00:07:01,510
‫Now this bpci r it served as a reference value for the NPC controller.

73
00:07:02,400 --> 00:07:08,000
‫Now the feedback lionization controller will also need BPCI are.

74
00:07:08,850 --> 00:07:15,690
‫However, the difference now is that here the PCR is not a reference value.

75
00:07:16,530 --> 00:07:24,570
‫The feedback lionization controller will not need to find some kind of input to reach this BPCI our

76
00:07:24,840 --> 00:07:25,920
‫reference value.

77
00:07:26,190 --> 00:07:28,440
‫That's the job of the NPC controller.

78
00:07:29,440 --> 00:07:39,130
‫However, in order to find you one by ah and then theater, you will have equation's there in which

79
00:07:39,130 --> 00:07:41,470
‫you will also have BPCI.

80
00:07:41,470 --> 00:07:47,660
‫Ah so the feedback plenary session controller doesn't need PCEHR as a reference value.

81
00:07:47,950 --> 00:07:57,010
‫However, it does need it because it needs this value in some of its equations in order to find you

82
00:07:57,010 --> 00:07:58,930
‫one firer and Sittar.

83
00:07:59,170 --> 00:08:06,880
‫And again, once we start covering this part, you will see exactly how it works.

84
00:08:07,750 --> 00:08:19,100
‫And in order to find X or Y or Z that are and also the double dot values, the procedure is very easy.

85
00:08:19,450 --> 00:08:28,360
‫Let's, for example, take a spiral in order to achieve a spiral in three D, the equations for the

86
00:08:28,570 --> 00:08:36,040
‫X Dimension, Y dimension and Z dimension are the following.

87
00:08:36,730 --> 00:08:41,420
‫X equals the radius of the spiral.

88
00:08:42,160 --> 00:08:52,810
‫So if you look at the spiral from the top, then that would be your radius here times cosine and then

89
00:08:52,810 --> 00:08:59,030
‫you have two pi, then the frequency of the rotation times time.

90
00:08:59,710 --> 00:09:08,920
‫So this F here, this is in Hertz, two pi is in radians and then time is in seconds.

91
00:09:09,520 --> 00:09:19,700
‫So the units would be like this, two pi would be radians and let's say radians per one round.

92
00:09:20,020 --> 00:09:24,340
‫So two pi radians is one full circle.

93
00:09:24,640 --> 00:09:29,880
‫Right then frequency would be rounds per second.

94
00:09:30,340 --> 00:09:40,120
‫So cycles per second, which is Hertz so round per second and then time would be second.

95
00:09:41,160 --> 00:09:48,000
‫So in the end, of course, you will cancel out the rounds and then the seconds, and that means that

96
00:09:48,420 --> 00:09:54,780
‫inside this cosine parenthesis you will have radiance as you should.

97
00:09:55,700 --> 00:10:04,370
‫However, the larger your F, the larger your frequency, the larger your rounds per second.

98
00:10:05,340 --> 00:10:15,540
‫The faster you rotate, so here you can see the spiral and then you can see it's three dimensions here.

99
00:10:16,110 --> 00:10:20,280
‫So the next dimension, why dimension and then the Z dimension.

100
00:10:20,940 --> 00:10:22,920
‫And here you can see the X dimension.

101
00:10:22,930 --> 00:10:28,080
‫It has an amplitude three two pi times zero point five hertz times.

102
00:10:29,190 --> 00:10:36,500
‫So you can see that in 10 seconds it is able to do five rotations.

103
00:10:36,990 --> 00:10:38,790
‫So this is third rotation.

104
00:10:39,720 --> 00:10:41,420
‫This is the fourth rotation.

105
00:10:42,030 --> 00:10:44,480
‫And then this is the fifth rotation.

106
00:10:45,360 --> 00:10:53,610
‫But what happens if I increase this frequency, the zero point five, so I have a code here and then

107
00:10:53,970 --> 00:10:59,130
‫I'm going to increase the frequency for the X dimension instead of zero point five hertz.

108
00:10:59,130 --> 00:11:05,220
‫I'm going to put one hertz and I'm going to do the same thing for the Y dimension.

109
00:11:05,640 --> 00:11:09,170
‫So I'm going to replace zero point five with one.

110
00:11:09,990 --> 00:11:18,260
‫And now you can see that in 10 seconds it will make more rotations, 10 to be exact.

111
00:11:18,330 --> 00:11:26,100
‫So you see in 10 seconds it is able to make more rotations because you have increased your frequency

112
00:11:26,520 --> 00:11:28,630
‫in your equations here.

113
00:11:28,650 --> 00:11:31,570
‫Now it's one hertz here and then here.

114
00:11:32,550 --> 00:11:37,560
‫So this is the equation for the examination, for the Y dimension.

115
00:11:37,740 --> 00:11:46,470
‫The equation is R times sine to pi frequency times time.

116
00:11:47,190 --> 00:11:51,540
‫And then for the Z dimension, we want to have a straight line function.

117
00:11:51,840 --> 00:12:01,950
‫So you will have the initial height of the trajectory plus the final height of the trajectory, minus

118
00:12:02,280 --> 00:12:14,700
‫the initial height of the trajectory divided by the entire time that it takes you to perform the maneuver

119
00:12:15,360 --> 00:12:18,590
‫and then you multiply that by time.

120
00:12:19,410 --> 00:12:25,740
‫So you can see that here you have the Z dimension and you have a straight line function here.

121
00:12:25,860 --> 00:12:31,200
‫However, the difference here is that here I didn't have an initial height.

122
00:12:31,950 --> 00:12:36,810
‫I assumed that my initial height starts from zero meters.

123
00:12:37,170 --> 00:12:43,050
‫However, in the drone case, we will have some kind of initial height.

124
00:12:43,710 --> 00:12:53,550
‫And so again, these are the equations for the spiral for X or Y, R and R, and now to find their time

125
00:12:53,550 --> 00:13:02,460
‫derivatives, you just take the derivatives of these equations with respect to time and then you will

126
00:13:02,460 --> 00:13:05,910
‫also take the second derivative of those equations.

127
00:13:06,880 --> 00:13:09,990
‫And so I will leave it to you as an exercise.

128
00:13:10,530 --> 00:13:17,970
‫Try to find the derivatives of these equations the first and then the second derivatives, and then

129
00:13:17,970 --> 00:13:20,280
‫you will see the solutions in the next video.

130
00:13:20,670 --> 00:13:21,570
‫Thank you very much.

