﻿1
00:00:00,510 --> 00:00:01,380
‫Welcome back.

2
00:00:02,130 --> 00:00:13,410
‫So now you know, the logic behind the control law, e double dot equals K one times E, which error

3
00:00:13,680 --> 00:00:22,200
‫plus key two times the E dot, which is the time derivative of the error.

4
00:00:22,980 --> 00:00:32,100
‫The same control law is applied for controlling and driving the error to zero in the X, Y and Z dimension,

5
00:00:32,880 --> 00:00:35,760
‫essentially by choosing the right pulls.

6
00:00:36,240 --> 00:00:46,740
‫So in our case, Lunda one equals minus one and Lunda two equals minus two, and in our case for all

7
00:00:46,740 --> 00:00:48,480
‫X, Y, Z dimensions.

8
00:00:49,350 --> 00:00:53,660
‫By choosing those polls, we computed our key values.

9
00:00:54,000 --> 00:01:03,060
‫So our K one ended up being minus two and key two was minus three.

10
00:01:03,900 --> 00:01:13,770
‫And so that means that our control law became like this error double dot equals now K one was minus

11
00:01:13,770 --> 00:01:26,070
‫two, so minus two times the error plus and then Katou was minus three, so minus three times the error

12
00:01:26,070 --> 00:01:26,590
‫dot.

13
00:01:27,510 --> 00:01:30,540
‫So in the end you can write it down like this.

14
00:01:31,600 --> 00:01:44,560
‫And so through this control law, you found an E double that that drives the error and the error dot

15
00:01:44,860 --> 00:01:49,310
‫to zero as time goes to infinity.

16
00:01:50,170 --> 00:02:00,310
‫So whatever your E and E dot are, the E double that that you find with your K one and K two values.

17
00:02:01,280 --> 00:02:10,070
‫This error double derivative with respect to time will drive your error and the first derivative of

18
00:02:10,070 --> 00:02:17,000
‫your error with respect to time to zero in this error, double that, it can do it because it influences

19
00:02:17,000 --> 00:02:17,510
‫both.

20
00:02:18,260 --> 00:02:27,680
‫Remember, it's a chain, the E double that influences the IDOT and then the E that influences the error

21
00:02:27,680 --> 00:02:28,400
‫itself.

22
00:02:29,210 --> 00:02:39,740
‫If your error is zero and then error that is zero and then error double dot is zero, then if you're

23
00:02:39,770 --> 00:02:48,620
‫error double that goes up, then also your error that goes up and then because of that your error will

24
00:02:48,620 --> 00:02:49,940
‫go up as well.

25
00:02:50,810 --> 00:02:58,100
‫So they are linked with each other like a chain because error that is a change of error with respect

26
00:02:58,100 --> 00:02:59,510
‫to time and error.

27
00:02:59,510 --> 00:03:04,040
‫Double that is a change of error dot with respect to time.

28
00:03:04,880 --> 00:03:06,400
‫And that's what you want, right?

29
00:03:06,560 --> 00:03:14,840
‫You want your error and error does not go to zero and you want it for your X, Y and Z dimensions,

30
00:03:15,170 --> 00:03:20,870
‫because then that actually means that your drone is tracking the trajectory.

31
00:03:21,620 --> 00:03:29,780
‫If the errors for all dimensions go to zero, then that means that you're doing very well in tracking

32
00:03:30,110 --> 00:03:31,360
‫what you need to track.

33
00:03:32,180 --> 00:03:42,650
‫And by the way, you need both error and error dot to go to zero, because if your error is zero but

34
00:03:42,650 --> 00:03:49,160
‫your error dot is not zero, then you are not going to stop at zero error.

35
00:03:49,730 --> 00:03:50,930
‫You will overshoot.

36
00:03:51,890 --> 00:03:57,310
‫You see, this is your reference line and then you're trying to track it.

37
00:03:58,100 --> 00:04:03,470
‫And right now your error is zero, but your error dot is not zero.

38
00:04:03,830 --> 00:04:06,920
‫So you will overshoot like this.

39
00:04:07,820 --> 00:04:15,820
‫You are not going to be able to steadily approach zero error if your so-called error velocity does not

40
00:04:15,890 --> 00:04:17,210
‫jump out as well.

41
00:04:18,220 --> 00:04:25,990
‫However, if both of your polls are negative, then your error and error that will both damp out.

42
00:04:26,980 --> 00:04:28,850
‫So is the problem solved now?

43
00:04:29,590 --> 00:04:30,730
‫Well, not quite.

44
00:04:31,090 --> 00:04:38,620
‫So far, the feedback lionization comptroller has produced error, double that in the X dimension,

45
00:04:39,070 --> 00:04:43,430
‫in the Y dimension and in the Z dimension.

46
00:04:44,290 --> 00:04:52,570
‫However, in order to actually physically achieve that, you need to have certain control, input values.

47
00:04:53,570 --> 00:05:04,280
‫You won you two, you three and you four, it's very cool to compute the necessary E double dots that

48
00:05:04,280 --> 00:05:07,480
‫would make your dream track the trajectory.

49
00:05:07,880 --> 00:05:16,760
‫However, now we need to find the necessary control inputs that will actually make it happen.

50
00:05:17,570 --> 00:05:25,520
‫And when you find your actual control inputs, then ultimately you also need to find the corresponding

51
00:05:25,520 --> 00:05:35,060
‫omega one, Omega to Omega three and Omega four, because ultimately these are the things that will

52
00:05:35,060 --> 00:05:46,460
‫physically move your drone and ultimately the Omega's, they will give you the necessary double dots.

53
00:05:47,560 --> 00:05:53,320
‫And so we already know how to compute our Omega's from our control inputs.

54
00:05:54,290 --> 00:05:58,520
‫And our feedback immunization controller computes you won.

55
00:05:59,580 --> 00:06:07,320
‫But you, too, you three and you four are computed by the model predictive controller, but for that,

56
00:06:07,440 --> 00:06:12,210
‫the NPC needs to get a reference your wangel.

57
00:06:13,440 --> 00:06:21,810
‫This is what it will get from the planner and then it also needs to get fi are and to are.

58
00:06:22,810 --> 00:06:26,660
‫And that will come from the feedback lionization controller.

59
00:06:27,580 --> 00:06:36,790
‫So in our controller, the E double dots, they are the intermediate variables, the end products of

60
00:06:36,790 --> 00:06:38,860
‫our feedback lionization controller.

61
00:06:39,340 --> 00:06:45,270
‫Are you one fi, r and Theta are.

62
00:06:46,240 --> 00:06:57,190
‫And that means that we have to find a relationship between our erodable dots and you one fire and see

63
00:06:57,190 --> 00:07:03,490
‫to r and so how to do that, how to find this relationship.

64
00:07:04,300 --> 00:07:14,900
‫Well we know that E double dot X equals X double dot the reference values.

65
00:07:14,950 --> 00:07:27,070
‫So the second derivative of our reference X values minus the true X double dot, which is the acceleration

66
00:07:27,490 --> 00:07:37,090
‫in the X dimension in the inertial frame, then e double that in the wider mentioned equals Y double

67
00:07:37,090 --> 00:07:50,050
‫dot reference values minus the true Y double dot and then E double dot in the Z dimension equals Z double

68
00:07:50,050 --> 00:07:56,480
‫that reference values minus the true Z double dot values.

69
00:07:57,490 --> 00:08:02,500
‫Remember these reference value, double derivatives, they come from the planner.

70
00:08:02,740 --> 00:08:12,880
‫We computed them in the planner and so we can rearrange these equations like this X double dot equals

71
00:08:13,330 --> 00:08:25,480
‫X double that R minus the error double dot in the X dimension then Y double dot equals Y double dot

72
00:08:26,110 --> 00:08:39,790
‫subha minus E double dot in the Y dimension and then Z double dot equals z double dot sub R minus E

73
00:08:39,790 --> 00:08:42,350
‫double dot in the Z dimension.

74
00:08:43,390 --> 00:08:51,120
‫So these terms here, they come from our control and these terms here, they come from our planner.

75
00:08:51,850 --> 00:08:57,810
‫So you automatically know what's your X double dot, y double date and Z double dot.

76
00:08:58,750 --> 00:09:07,720
‫But if you remember at the beginning of the section you derived some equations that related these X,

77
00:09:07,720 --> 00:09:11,920
‫Y and Z double dots with the variables that you need.

78
00:09:12,220 --> 00:09:29,200
‫You want fire and theta are so x double dot equals cosine five times sine theta times cosine psi and

79
00:09:29,200 --> 00:09:45,100
‫then plus sine five times sine psi and then all that you multiplied by you, one divided by the mass

80
00:09:45,130 --> 00:09:45,990
‫of the drone.

81
00:09:46,870 --> 00:09:49,930
‫So this equation was for the X dimension.

82
00:09:50,410 --> 00:09:57,600
‫This equation was your X double dot, your acceleration in the X dimension in the inertial frame.

83
00:09:58,360 --> 00:10:06,040
‫So this equation was your Y double dot, your acceleration in the Y dimension in the initial frame,

84
00:10:06,820 --> 00:10:14,980
‫and this was your acceleration in the Z dimension in the initial frame since you know, the double derivative

85
00:10:15,400 --> 00:10:25,570
‫of the reference values and the arrow double dots that were computed using the controller, this one

86
00:10:25,570 --> 00:10:31,720
‫here, thanks to that, you know, your X double that, Y double that and Z double that.

87
00:10:32,590 --> 00:10:36,910
‫In addition, you know what your CI is as well.

88
00:10:37,690 --> 00:10:41,320
‫That's your reference value from the planner.

89
00:10:42,220 --> 00:10:46,600
‫So here as well, you get this number from the planner.

90
00:10:47,500 --> 00:10:57,220
‫And so what you have is three equations and three unknowns and your unknowns are you one fire are and

91
00:10:57,220 --> 00:10:58,150
‫seats are.

92
00:10:59,100 --> 00:11:09,030
‫So from this equation, you need to find your you one, then you also need to find your files like this

93
00:11:09,810 --> 00:11:15,120
‫and you need to find your Cetus that are here.

94
00:11:16,110 --> 00:11:24,870
‫And using algebra, you can find them once you have found them, then your new one will go to the plant

95
00:11:25,800 --> 00:11:31,740
‫and then your Fi and Seeta, they will go to your NPC controller.

96
00:11:32,280 --> 00:11:40,350
‫And for the NPC controller, they will be your reference values, fire and Sittar, and that will be

97
00:11:40,350 --> 00:11:41,370
‫your exercise.

98
00:11:42,060 --> 00:11:53,610
‫Try to manipulate these equations in order to find your Fifita and you one, try to find them in terms

99
00:11:53,610 --> 00:11:54,820
‫of other variables.

100
00:11:55,140 --> 00:11:57,440
‫I'll give you a hint to get started.

101
00:11:58,450 --> 00:12:08,990
‫Put the equations in this form X double dot divided by Z, double dot plus G.

102
00:12:09,460 --> 00:12:16,090
‫So take this G and put it on the other side of the equation sine and then take this X, double that

103
00:12:16,090 --> 00:12:22,960
‫equation, this entire equation, and then divided by this equation.

104
00:12:23,860 --> 00:12:39,700
‫So if you're Z double dot plus G equals this cosine five times cosine theta times you one over the mass

105
00:12:40,810 --> 00:12:50,050
‫then you would take this entire equation here and then you would divide it by this thing here and then

106
00:12:50,050 --> 00:12:58,890
‫do the same thing with y double dot divided by Z, double dot plus G.

107
00:12:59,800 --> 00:13:05,620
‫So put your equations in this form here and then go from there.

108
00:13:06,750 --> 00:13:15,600
‫We're going to discuss the solutions in the next video, however, I first want to finish our schematics.

109
00:13:16,590 --> 00:13:24,870
‫OK, so this is our schematics and now let's finish it so you know how you get your error double dots

110
00:13:24,870 --> 00:13:26,900
‫in the X, Y and Z dimension.

111
00:13:27,810 --> 00:13:36,510
‫And now when we're going to do we're going to take our reference value second time derivatives out of

112
00:13:36,510 --> 00:13:37,570
‫our planner.

113
00:13:38,490 --> 00:13:49,350
‫So this here will be your Z double dot sub are this here will be your Y double dot subha and this here

114
00:13:49,350 --> 00:13:52,980
‫will be your X double dot subha.

115
00:13:53,880 --> 00:14:02,000
‫And remember we had to subtract our error double dots from our reference value double dots.

116
00:14:02,280 --> 00:14:10,800
‫So we're going to have plus here and plus here and plus here and then we're going to have minus here,

117
00:14:11,250 --> 00:14:14,490
‫minus here and minus here.

118
00:14:15,150 --> 00:14:22,890
‫Because essentially what you need, you need X double dot sub R minus E double dot sub X.

119
00:14:22,890 --> 00:14:23,250
‫Right.

120
00:14:23,260 --> 00:14:24,120
‫That's what you need.

121
00:14:24,300 --> 00:14:26,730
‫And the same thing for the Y and Z dimension.

122
00:14:27,650 --> 00:14:37,920
‫And so here in this box, you have these three equations that we had X, double dot Y and Z double dot.

123
00:14:39,080 --> 00:14:41,060
‫So these equations here.

124
00:14:42,030 --> 00:14:45,130
‫These are the equations that you have in this box here.

125
00:14:46,020 --> 00:14:57,270
‫And so if you have your X double dot sub R minus E, double dot, sub X, then you will have your X

126
00:14:57,270 --> 00:15:00,660
‫double dot here that will go into this box.

127
00:15:01,560 --> 00:15:04,100
‫And the same thing happens here.

128
00:15:04,920 --> 00:15:13,610
‫You get your Y double dot, if you take your Y double dose of R and then you subtract E double Dunstable

129
00:15:13,800 --> 00:15:15,360
‫Y from it.

130
00:15:16,170 --> 00:15:20,750
‫And then the same thing happens here as well.

131
00:15:21,660 --> 00:15:31,010
‫You get your Z double dot in the same way, Z double dot, sub R minus E, double dot subs Z.

132
00:15:31,800 --> 00:15:44,970
‫And then as an exercise you will find your fi, r and fita r that will go into your NPC controller and

133
00:15:44,970 --> 00:15:52,200
‫then you will also find the you want control inputs that will go directly into your plant.

134
00:15:53,220 --> 00:16:00,900
‫So that's your exercise, these are your equations, and just try doing it yourself.

135
00:16:01,080 --> 00:16:06,840
‫Try doing some algebra and then we'll see the solutions in the next video.

136
00:16:06,960 --> 00:16:07,800
‫Thank you very much.

