﻿1
00:00:00,480 --> 00:00:09,990
‫And now let's leave the polls in the X dimension alone and let's take the Y dimension and let's see

2
00:00:09,990 --> 00:00:11,400
‫what we're going to have here.

3
00:00:11,730 --> 00:00:20,370
‫Let's change this minus one to plus zero point zero one and let's see what's going to happen.

4
00:00:21,440 --> 00:00:24,470
‫So the drone starts following the trajectory.

5
00:00:25,570 --> 00:00:33,130
‫It seems doing pretty well, so from here, it seems that it was able to track the trajectory quite

6
00:00:33,130 --> 00:00:33,660
‫well.

7
00:00:34,300 --> 00:00:37,420
‫But let's look at the dimensions separately.

8
00:00:38,170 --> 00:00:45,850
‫So the X dimension went very well and well, if you look at the Y dimension, then you see that in the

9
00:00:45,850 --> 00:00:49,840
‫end there is a small difference that is growing.

10
00:00:49,840 --> 00:00:56,400
‫Here is just you haven't had enough time to let this difference grow.

11
00:00:56,650 --> 00:00:58,830
‫But you see it is starting to grow here.

12
00:00:59,590 --> 00:01:08,020
‫And the reason is because you have a very weak, positive poll here, but then a very strong negative

13
00:01:08,020 --> 00:01:08,860
‫poll here.

14
00:01:09,470 --> 00:01:13,780
‫So how about if I make this minus zero point five?

15
00:01:13,930 --> 00:01:21,490
‫Let's see what happens then so you can see that you already have some problems here.

16
00:01:22,450 --> 00:01:26,110
‫The tracking is not nearly as good as it was before.

17
00:01:26,920 --> 00:01:28,830
‫The extermination is fine.

18
00:01:29,920 --> 00:01:33,340
‫However, the Y dimension is not fine.

19
00:01:33,340 --> 00:01:39,400
‫You see now the distance is getting bigger here and it's already visible.

20
00:01:40,430 --> 00:01:49,220
‫And now let's go back to our minus one and minus two polls and let's run another trajectory, which

21
00:01:49,220 --> 00:01:50,360
‫is my favorite one.

22
00:01:51,430 --> 00:01:55,210
‫I call it the crown, the crown trajectory.

23
00:01:56,230 --> 00:02:03,880
‫It's not actually that hard to do if you look at your X and Y dimension, then they're just your cosine

24
00:02:03,880 --> 00:02:05,140
‫and sine functions.

25
00:02:05,770 --> 00:02:11,320
‫The only difference is that now the Z dimension is also oscillating.

26
00:02:12,340 --> 00:02:18,070
‫So as your drone goes in the circle, it also goes up and down.

27
00:02:19,060 --> 00:02:20,920
‫You see, that's how it looks like.

28
00:02:21,960 --> 00:02:23,790
‫That's the X dimension.

29
00:02:24,970 --> 00:02:26,620
‫That's the Y dimension.

30
00:02:27,760 --> 00:02:33,430
‫And that's the Z dimension you see now, Z dimension is also sinusoidal.

31
00:02:34,460 --> 00:02:44,060
‫Before our drone was following a Z trajectory, that was a straight line, which means that your drone

32
00:02:44,060 --> 00:02:50,230
‫would go up steadily, but now it just goes up and down in a sinusoidal way.

33
00:02:51,170 --> 00:02:56,870
‫And these are the angles here and the control inputs and then the omega's.

34
00:02:58,000 --> 00:03:08,560
‫What happens if for the Z dimension, Paul, I'm going to put here plus zero point zero one so you can

35
00:03:08,560 --> 00:03:17,290
‫see that something is not going well at all, it is able to follow the X dimension and then the Y dimension.

36
00:03:17,300 --> 00:03:28,570
‫But because we changed the poles in the Z dimension and we made one pole positive, then now the error

37
00:03:28,570 --> 00:03:29,760
‫seems to be growing.

38
00:03:30,760 --> 00:03:34,530
‫So it has gone past the ground already actually.

39
00:03:34,540 --> 00:03:35,640
‫So it's under the ground.

40
00:03:36,580 --> 00:03:39,040
‫So as you can see, didn't go very well.

41
00:03:39,850 --> 00:03:41,350
‫That's your X dimension.

42
00:03:42,350 --> 00:03:51,800
‫That's your y dimension and then the Z dimension again, you see the positive pole is messing things

43
00:03:51,800 --> 00:03:52,230
‫up.

44
00:03:53,210 --> 00:04:01,130
‫So remember, to get the errors to grow, both poles need to be negative.

45
00:04:01,580 --> 00:04:08,990
‫And if you have some kind of system where you have 10 poles, so you have some kind of tenth order differential

46
00:04:08,990 --> 00:04:12,860
‫equation, then all those 10 poles need to be negative.

47
00:04:13,930 --> 00:04:24,760
‫But now I want to make this poll zero and then this poll zero and then also the same thing for the wider

48
00:04:24,760 --> 00:04:28,010
‫mention this one and this one.

49
00:04:28,960 --> 00:04:31,710
‫Now, my polls still are not complex.

50
00:04:31,720 --> 00:04:33,880
‫They are still real polls.

51
00:04:34,180 --> 00:04:39,190
‫I don't have an imaginary part here, but I've made everything zero.

52
00:04:40,240 --> 00:04:49,950
‫And now I've gone back to our spiral trajectory so you can see that something is not going quite right.

53
00:04:50,320 --> 00:04:54,010
‫So the drone is failing in the end.

54
00:04:54,010 --> 00:04:55,830
‫This is how the drone goes.

55
00:04:55,840 --> 00:05:00,610
‫This is what it was supposed to do in blue, and this is what it actually did.

56
00:05:01,610 --> 00:05:11,140
‫You see, when polls are zero and I mean completely zero, both the real and imaginary part are zero,

57
00:05:11,420 --> 00:05:15,500
‫then it's kind of like a special situation.

58
00:05:16,400 --> 00:05:23,300
‫You really need to start looking at the initial conditions then, because, for example, here in this

59
00:05:23,660 --> 00:05:31,280
‫case, you have this initial condition, two meters, the air, the blue line, minus the red line.

60
00:05:31,850 --> 00:05:41,450
‫At the beginning, when time equals zero, your error is two meters and your error dot, which is this

61
00:05:41,570 --> 00:05:51,860
‫blue X dot reference line minus this red true X dot line at time equals zero seconds.

62
00:05:52,070 --> 00:05:55,720
‫Their difference is zero meters per second.

63
00:05:56,210 --> 00:05:59,450
‫So the error dot is zero meters per second.

64
00:06:00,320 --> 00:06:09,590
‫Now if you choose your lump, the one to be zero and lump the two to be zero, then if you put them

65
00:06:09,890 --> 00:06:13,940
‫inside the equations that you had previously derived.

66
00:06:14,930 --> 00:06:24,090
‫Then you will find that your Q1 and Q2 will be zero as well, both of them will be zero.

67
00:06:24,950 --> 00:06:36,650
‫So if your Q1 and Q2 are zeros, then what will be your use, OpEx and use of WI if all these constants

68
00:06:36,650 --> 00:06:38,190
‫here are zeros.

69
00:06:39,170 --> 00:06:39,890
‫Of course.

70
00:06:40,940 --> 00:06:50,300
‫Use of ax and use of Y will also be zeroes, which means that your error double dot X will be zero and

71
00:06:50,300 --> 00:06:53,530
‫error double dot Y will be zero.

72
00:06:54,440 --> 00:07:04,790
‫And so earlier we talked that our error double dot influences the error dot and then the error that

73
00:07:04,790 --> 00:07:07,100
‫influences the error rate.

74
00:07:07,400 --> 00:07:08,540
‫So it's like a chain.

75
00:07:09,320 --> 00:07:15,990
‫So if this is always zero, then that means that this guy here never changes.

76
00:07:16,580 --> 00:07:23,060
‫So in this X dimension case, if your error that is zero at the beginning.

77
00:07:24,310 --> 00:07:36,490
‫Then theoretically, it should stay zero, and that means that if your error at the beginning is two

78
00:07:36,490 --> 00:07:45,190
‫metres, then it will stay two metres, because since you're Eridani equals zero, that means that your

79
00:07:45,640 --> 00:07:47,610
‫error will stay the same.

80
00:07:47,620 --> 00:07:52,110
‫It will not change because error that is the change of error with respect to time.

81
00:07:52,870 --> 00:07:58,540
‫And that's why you see that essentially your error here is zero.

82
00:07:59,080 --> 00:08:06,250
‫Well, theoretically it should be zero, but then in practice you have numerical errors.

83
00:08:06,250 --> 00:08:13,720
‫And then in real life, of course, you never have pure theoretical results.

84
00:08:14,680 --> 00:08:18,250
‫But you see these two lines are pretty much aligned with each other.

85
00:08:19,330 --> 00:08:28,090
‫And since they're almost zero, OK, there is a small difference here, but the error is almost zero

86
00:08:28,120 --> 00:08:29,470
‫and it doesn't change.

87
00:08:30,010 --> 00:08:38,310
‫And because of that, since your error at the beginning is two metres, it will stay being two metres.

88
00:08:38,710 --> 00:08:40,950
‫You see, it doesn't change.

89
00:08:41,800 --> 00:08:43,630
‫How about the Y dimension, though?

90
00:08:44,500 --> 00:08:52,810
‫You see with the Y dimension is different because here you also have an initial error, but now there

91
00:08:52,810 --> 00:08:54,790
‫is also a difference in error.

92
00:08:54,790 --> 00:09:05,440
‫Dot again, since your constants here are zeros because your poles are zeros, then that means that

93
00:09:05,440 --> 00:09:10,850
‫your error double dot y will be zero.

94
00:09:11,830 --> 00:09:14,440
‫All this was about the X dimension.

95
00:09:14,440 --> 00:09:14,950
‫All right.

96
00:09:15,460 --> 00:09:17,680
‫And now you're erodable.

97
00:09:17,680 --> 00:09:23,740
‫That Y is zero, which means that your error dot will not change.

98
00:09:24,640 --> 00:09:27,390
‫But now your error, that is not zero.

99
00:09:27,550 --> 00:09:37,450
‫Now there is a difference here and the difference here is something like zero point three one four meters

100
00:09:37,450 --> 00:09:38,310
‫per second.

101
00:09:38,620 --> 00:09:42,070
‫In other words, it's pie over ten.

102
00:09:42,580 --> 00:09:43,420
‫That's what it is.

103
00:09:43,420 --> 00:09:44,650
‫It's pie over ten.

104
00:09:45,520 --> 00:09:49,120
‫So it's three point fourteen divided by ten.

105
00:09:50,090 --> 00:09:59,150
‫Now, because of this thing, this thing will not change, it will keep being over 10, but since the

106
00:09:59,150 --> 00:10:08,210
‫error itself depends on error dot, that means that this error that will keep changing, this error

107
00:10:08,570 --> 00:10:12,690
‫and this error will change all the time like this at the beginning.

108
00:10:12,860 --> 00:10:14,870
‫The error is one meter.

109
00:10:15,170 --> 00:10:15,740
‫All right.

110
00:10:16,490 --> 00:10:23,480
‫So the distance here is one meters because this blue line starts at zero meters.

111
00:10:23,480 --> 00:10:33,780
‫And then the real Y position of the drone at time equals zero seconds is minus one meters in the Y dimension.

112
00:10:33,800 --> 00:10:36,530
‫So the error is one meter.

113
00:10:37,340 --> 00:10:38,780
‫So that's at the beginning.

114
00:10:39,080 --> 00:10:46,670
‫But then you have your error dot, and then since it's not zero, you have to multiply it by time.

115
00:10:47,360 --> 00:11:01,070
‫So remember your error, that is your d e divided by d t so your error here is one plus dí over deti

116
00:11:01,610 --> 00:11:03,420
‫times time.

117
00:11:04,280 --> 00:11:07,810
‫In other words, your error in the Y dimension.

118
00:11:08,120 --> 00:11:11,780
‫And remember now we're talking about the Y dimension.

119
00:11:12,290 --> 00:11:19,760
‫You're error here now is one plus so pi over 10 times time.

120
00:11:20,610 --> 00:11:30,990
‫And so this difference here between the blue line and the red line is growing according to this function

121
00:11:30,990 --> 00:11:31,460
‫here.

122
00:11:32,220 --> 00:11:35,280
‫So I have graphed the error function here.

123
00:11:35,490 --> 00:11:39,030
‫Here in green, you have this error function.

124
00:11:39,750 --> 00:11:41,070
‫It's this one here.

125
00:11:41,370 --> 00:11:47,190
‫Error as a function of time equals one plus pi over ten times T.

126
00:11:48,250 --> 00:11:50,620
‫So that's the one in green.

127
00:11:51,710 --> 00:12:00,410
‫And so when you make your polls zero, then you have to be extra careful and pay attention to these

128
00:12:00,410 --> 00:12:01,360
‫kind of things.

129
00:12:02,300 --> 00:12:10,400
‫But of course, in control engineering, your objective is to minimize the errors so it doesn't make

130
00:12:10,400 --> 00:12:14,870
‫sense for you to choose polls that are positive or Xeros.

131
00:12:15,620 --> 00:12:21,300
‫You always want negative polls because you want your errors to become zero.

132
00:12:21,950 --> 00:12:24,610
‫That's your objective as a control engineer.

133
00:12:25,340 --> 00:12:30,880
‫And now I want to play a little bit with complex polls.

134
00:12:31,220 --> 00:12:33,230
‫I want to see what's going to happen then.

135
00:12:34,200 --> 00:12:43,890
‫So we're going to comment about the real polls and we're going to uncommented the complex polls, so

136
00:12:43,890 --> 00:12:51,750
‫as you can see here, when we talk about complex polls, then the real part is the same for all of them,

137
00:12:51,990 --> 00:13:01,200
‫minus zero point one here and minus zero point one here, minus zero point zero one here and minus zero

138
00:13:01,200 --> 00:13:02,700
‫point zero one here.

139
00:13:03,640 --> 00:13:10,300
‫And then the imaginary parts are the conjugates plus zero point three times and minus zero point three

140
00:13:10,300 --> 00:13:20,410
‫times, Jay, if I put here plus one point three times, Jay, I have to put here minus one point three

141
00:13:20,410 --> 00:13:21,310
‫times, Jay.

142
00:13:32,970 --> 00:13:42,120
‫Let's for a moment have real X and Y dimension polls and then for the Z dimension, let's have complex

143
00:13:42,120 --> 00:13:42,690
‫polls.

144
00:13:43,740 --> 00:13:52,530
‫And now I'm going to make my real polls here like this minus zero point one and also here minus zero

145
00:13:52,530 --> 00:13:53,670
‫point one.

146
00:13:54,540 --> 00:14:05,580
‫And so I've taken out another trajectory and we're going to see how it follows this straight line trajectory.

147
00:14:06,180 --> 00:14:09,170
‫So, as you can see, it's not being very successful.

148
00:14:09,540 --> 00:14:14,220
‫If you look at this, the Z dimension, it seems to be oscillating.

149
00:14:15,120 --> 00:14:17,640
‫So that's how it followed the trajectory.

150
00:14:18,360 --> 00:14:28,890
‫You can see that since the Z dimension is up and since we had complex polls, but still a small negative

151
00:14:28,890 --> 00:14:37,680
‫real number because of that, the drone oscillated in the Z dimension, but it damped itself out.

152
00:14:38,550 --> 00:14:47,730
‫That's because our Lumb the one was minus zero point one plus eight times zero point three and then

153
00:14:47,880 --> 00:14:55,120
‫LAMDA two was minus zero point one minus eight times zero point three.

154
00:14:55,920 --> 00:15:06,150
‫So these ones give you oscillation and this one here damps this oscillation out.

155
00:15:07,220 --> 00:15:13,580
‫You see, it's like this, you don't really have that in the X dimension because you had real polls

156
00:15:13,580 --> 00:15:22,280
‫there, no imaginary parts, the same thing for the Y dimension, but your Z dimension did oscillate

157
00:15:22,940 --> 00:15:24,650
‫before it became stable.

158
00:15:25,400 --> 00:15:26,420
‫And you can see this.

159
00:15:26,420 --> 00:15:34,010
‫You want control input, which is mainly responsible for tracking the altitude because the propellers

160
00:15:34,010 --> 00:15:39,830
‫give you the thrust upwards and you want is your thrust control input.

161
00:15:40,580 --> 00:15:44,840
‫And you see there is also some oscillation in this.

162
00:15:44,840 --> 00:15:46,370
‫You want control input.

