﻿1
00:00:00,490 --> 00:00:12,340
‫But what will happen if I make my imaginary parts a zero like this and like this, let's see what's

2
00:00:12,340 --> 00:00:13,200
‫going to happen.

3
00:00:13,960 --> 00:00:22,530
‫And so you can see that even though the tracking is very slow, but there is no oscillation.

4
00:00:23,350 --> 00:00:25,060
‫So this is the Z dimension.

5
00:00:25,780 --> 00:00:36,040
‫You see, you don't have any oscillation, but you track the Z dimension very slowly y well because

6
00:00:36,370 --> 00:00:38,430
‫you don't have any imaginary parts.

7
00:00:38,440 --> 00:00:46,080
‫So you cannot have oscillation, but your real part is very small.

8
00:00:46,090 --> 00:00:48,040
‫So it's minus zero point one.

9
00:00:48,850 --> 00:00:58,570
‫And now let's go back to our complex polls and now let's make the real poll not minus zero point one,

10
00:00:58,960 --> 00:01:04,290
‫but plus zero point zero one.

11
00:01:05,080 --> 00:01:10,990
‫So a positive number, but 10 times smaller, zero point zero one.

12
00:01:11,800 --> 00:01:13,640
‫And let's see what's going to happen.

13
00:01:14,680 --> 00:01:20,850
‫So the drone oscillates in the Z dimension and this oscillation is growing.

14
00:01:21,820 --> 00:01:26,530
‫You see this constellation is growing in the Z dimension.

15
00:01:27,590 --> 00:01:34,910
‫And the reason for that is because you have complex polls here, imaginary parts give you a solution

16
00:01:35,120 --> 00:01:42,470
‫and then you have a small, positive, real part that will increase your error.

17
00:01:43,500 --> 00:01:45,640
‫And now I want to show you something else.

18
00:01:46,260 --> 00:01:51,400
‫How about if I put zero here and zero here?

19
00:01:52,260 --> 00:02:02,790
‫So now you can imagine that you think you would oscillate and your amplitude wouldn't change and, well,

20
00:02:02,940 --> 00:02:04,210
‫that's the result.

21
00:02:04,530 --> 00:02:07,950
‫However, as you can see, the amplitude does change.

22
00:02:08,850 --> 00:02:17,190
‫So this is the Z dimension and you can see that the amplitude grows even though your real part is zero.

23
00:02:17,280 --> 00:02:18,840
‫And why is it like that?

24
00:02:19,560 --> 00:02:26,700
‫Well, the explanation that I can give you is the following, that theoretically it shouldn't grow,

25
00:02:27,600 --> 00:02:38,970
‫because what happens is that your lump, the one equals zero plus I times zero point three and then

26
00:02:39,180 --> 00:02:46,800
‫your lump, the two equals zero minus eight times zero point three.

27
00:02:47,730 --> 00:02:50,250
‫That's for your Z dimension, right?

28
00:02:50,250 --> 00:02:52,300
‫For your use of Z.

29
00:02:53,100 --> 00:03:00,630
‫And so your K one value here would be minus zero point zero nine.

30
00:03:00,750 --> 00:03:07,980
‫I know that because I looked it up and then K two would be zero.

31
00:03:08,850 --> 00:03:13,620
‫So in your Z dimension differential equation, you OK?

32
00:03:13,650 --> 00:03:18,570
‫One would have this value and your K two would have this value.

33
00:03:19,550 --> 00:03:26,840
‫And so if you calculate your error as a function of time, then you will have an expression that only

34
00:03:26,840 --> 00:03:35,090
‫consists of cosigns and signs and you will not have something like this where you have the oil and no

35
00:03:35,600 --> 00:03:41,870
‫to the power of their real part of the polls times time.

36
00:03:42,440 --> 00:03:46,590
‫You will not have that because this one will be zero.

37
00:03:46,610 --> 00:03:48,760
‫So this entire thing will be won.

38
00:03:49,670 --> 00:03:52,750
‫So the amplitude of the oscillation shouldn't grow.

39
00:03:53,660 --> 00:03:56,000
‫This shouldn't grow, but it does.

40
00:03:56,840 --> 00:04:07,910
‫Well, the reason for that is that these key values here, they will give you the right e double dot

41
00:04:08,510 --> 00:04:16,190
‫in the Z dimension so that your error would simply oscillate, but so that its amplitude wouldn't change.

42
00:04:17,060 --> 00:04:28,730
‫But then this error, double dot needs to be converted to Phi R, Theta R and you won.

43
00:04:29,770 --> 00:04:37,780
‫And not only this, of course, in the end, all your three erodable dots will need to be converted

44
00:04:38,230 --> 00:04:51,760
‫into PHY are, Seeta are and you won and then you one will go to plant and then fire and Sittar, they

45
00:04:51,760 --> 00:04:57,540
‫will go to the NPC controller and one happens in the NPC controller.

46
00:04:58,270 --> 00:05:02,520
‫These values are your reference values, right.

47
00:05:03,490 --> 00:05:08,770
‫But then the true PHY and Seeta values.

48
00:05:08,980 --> 00:05:12,310
‫Right phy true and feet are true.

49
00:05:12,310 --> 00:05:14,460
‫These are the values that belong to the drone.

50
00:05:15,070 --> 00:05:20,170
‫These are the values that need to catch these phy are and Setara values.

51
00:05:21,070 --> 00:05:28,900
‫They do track your fly are and Setara values, but they might not track them perfectly.

52
00:05:29,650 --> 00:05:34,690
‫And because of this imperfection, your error here still grows.

53
00:05:35,410 --> 00:05:40,270
‫So at least that's how I see it, because at the beginning I was surprised by it.

54
00:05:40,510 --> 00:05:42,190
‫But then I thought about it.

55
00:05:42,760 --> 00:05:44,470
‫And I think that that's the reason.

56
00:05:45,400 --> 00:05:55,390
‫If I put here a very small negative, real number minus zero point zero one and then minus zero point

57
00:05:55,600 --> 00:06:02,590
‫zero one, then you can see that your amplitude is not changing, at least it's not visible.

58
00:06:02,590 --> 00:06:04,980
‫Maybe it's changing a little bit, but it's not visible.

59
00:06:05,950 --> 00:06:07,810
‫You see, this is your Z dimension.

60
00:06:08,470 --> 00:06:14,260
‫It's not very visible that your Z dimension is changing, maybe only a little bit.

61
00:06:15,210 --> 00:06:19,660
‫Well, in fact, yes, it is changing a little bit here.

62
00:06:19,660 --> 00:06:22,720
‫The distance is a little bit bigger than, for example, here.

63
00:06:23,680 --> 00:06:31,360
‫But my point is that if you put a small, negative, real number here, then it might cancel out this

64
00:06:31,720 --> 00:06:35,890
‫imperfection, this one here that we talked about.

65
00:06:36,640 --> 00:06:46,990
‫And now let's make our Z dimension poles just real numbers, minus one and minus two, and let's make

66
00:06:46,990 --> 00:06:52,060
‫our X dimension poles complex and let's see what's going to happen then.

67
00:06:53,010 --> 00:07:00,420
‫You can see that now you have oscillation and then damping out, but in the X dimension.

68
00:07:01,420 --> 00:07:03,700
‫You see now this is your X dimension.

69
00:07:04,570 --> 00:07:10,680
‫You don't have that in the Y dimension and you don't have that in the Z dimension because now you have

70
00:07:10,690 --> 00:07:13,570
‫strong, negative, real pulse.

71
00:07:14,550 --> 00:07:18,990
‫And these are the angles here, the control inputs and the omega's.

72
00:07:19,950 --> 00:07:28,280
‫And now let's do the same thing, but let's give complex pause to Y dimension.

73
00:07:29,190 --> 00:07:35,090
‫So we're going to comment at the X dimension and we're going to give complex pause to the Y dimension.

74
00:07:35,610 --> 00:07:36,990
‫So let's see what's going to happen.

75
00:07:37,860 --> 00:07:40,220
‫Well, it seems to track it pretty well.

76
00:07:41,160 --> 00:07:46,620
‫You do have oscillation in the Y dimension, but it damps out pretty quickly.

77
00:07:47,790 --> 00:07:53,360
‫And now let's give all palls complex pause.

78
00:07:53,410 --> 00:08:02,250
‫OK, let's make sure that the X, Y and Z dimension, all of them have a negative real value and some

79
00:08:02,250 --> 00:08:05,080
‫kind of imaginary value as well.

80
00:08:05,100 --> 00:08:06,480
‫Let's see what's going to happen.

81
00:08:07,490 --> 00:08:16,100
‫So the drone is starting to follow the trajectory and you can see that in the Z dimension, it has some

82
00:08:16,100 --> 00:08:17,300
‫kind of oscillation.

83
00:08:18,440 --> 00:08:26,510
‫But it's approaching the trajectory, so in the end, you have this kind of tracking, you have oscillation

84
00:08:26,510 --> 00:08:33,460
‫in the X dimension, but it damps itself out thanks to negative real numbers.

85
00:08:34,310 --> 00:08:41,600
‫You have the same thing in the Y Dimension Oscillation, but it disappears and you have the same thing

86
00:08:41,600 --> 00:08:48,980
‫with the Z dimension where you have a little bit of oscillation and then it damps itself out thanks

87
00:08:48,980 --> 00:08:49,460
‫to.

88
00:08:50,530 --> 00:09:01,300
‫The negative real numbers here that are minus one and minus one, values are here quite big, so they

89
00:09:01,300 --> 00:09:04,030
‫cancel out this oscillation here pretty quickly.

90
00:09:04,960 --> 00:09:12,520
‫But now what happens if I put here minus 10 and also here minus 10?

91
00:09:12,730 --> 00:09:13,930
‫What's going to happen?

92
00:09:14,350 --> 00:09:23,040
‫The real number in the Z dimension, now it's minus 10 and now I'm going to run the code and look,

93
00:09:23,680 --> 00:09:25,670
‫the code stops running.

94
00:09:26,230 --> 00:09:26,900
‫So what is it?

95
00:09:26,900 --> 00:09:31,750
‫Say you can't take a square root of a negative number.

96
00:09:32,320 --> 00:09:38,460
‫The problem might be that the trajectory is too chaotic or it might have large discontinues jumps.

97
00:09:38,980 --> 00:09:42,370
‫Try to make a smoother trajectory without discontinuous jumps.

98
00:09:43,000 --> 00:09:50,590
‫Are the possible causes might be values for variables such as the sample time interval or horizon period

99
00:09:50,800 --> 00:09:53,950
‫or other variables here, including poles.

100
00:09:54,490 --> 00:09:56,360
‫So they might be problematic.

101
00:09:56,980 --> 00:10:01,370
‫So in our case, the problem is Poles.

102
00:10:01,990 --> 00:10:04,420
‫So what has happened?

103
00:10:05,140 --> 00:10:06,370
‫Well, this has happened.

104
00:10:06,370 --> 00:10:11,440
‫You cannot take a square root of a negative number if you remember.

105
00:10:11,830 --> 00:10:24,400
‫Then in the end of the third chapter, you had to compute your omega one, Omega to Omega three and

106
00:10:24,400 --> 00:10:25,840
‫Omega four.

107
00:10:26,810 --> 00:10:37,520
‫And so you ended up with equations that had square root of something, a one for Megahed, two for Omega

108
00:10:37,520 --> 00:10:43,310
‫three and four Megafaun, so that was the end of Chapter three.

109
00:10:44,150 --> 00:10:50,040
‫So the program stops working when you have negative numbers under the square root here.

110
00:10:50,750 --> 00:10:52,450
‫So what does it mean physically?

111
00:10:53,180 --> 00:11:02,540
‫It means that the controllers tell you that in order to perform a maneuver at the given time, you need

112
00:11:02,540 --> 00:11:04,190
‫to have control inputs.

113
00:11:04,880 --> 00:11:11,150
‫You one, you to use three and you four.

114
00:11:12,200 --> 00:11:17,450
‫You need to have certain values for them calculated by the controller.

115
00:11:18,170 --> 00:11:28,040
‫But then the model that we have derived tells you that there is no combination of Omega one, omega

116
00:11:28,040 --> 00:11:37,460
‫two, omega three and Omega four that the drone can produce to achieve the required.

117
00:11:37,850 --> 00:11:42,410
‫You won you to use three and you four.

118
00:11:43,370 --> 00:11:47,760
‫That's why you have negative numbers under the square root.

119
00:11:48,260 --> 00:11:57,770
‫It means that there is no real solution for the Omega's that usually happens when your trajectory changes

120
00:11:57,770 --> 00:12:07,880
‫very abruptly or if you give the controller very strong pulls, forcing the ovei to do two sharp maneuvers

121
00:12:07,880 --> 00:12:09,250
‫that it cannot handle.

122
00:12:10,040 --> 00:12:17,780
‫So your trajectory must be smooth enough and the polls need to stay within a certain area in the Laplanche

123
00:12:17,780 --> 00:12:18,400
‫domain.

124
00:12:19,010 --> 00:12:21,950
‫So this is your plus domain.

125
00:12:23,110 --> 00:12:31,480
‫And you need to make sure that your polls don't go very far away from this origin, because even if

126
00:12:31,480 --> 00:12:40,690
‫they are negative but they are very far away from this origin point, then you might force your drone

127
00:12:40,690 --> 00:12:48,790
‫to perform very aggressive maneuvers and then your controller will tell you that, OK, I need this.

128
00:12:48,790 --> 00:12:52,120
‫You want this, you to do this, you three and this you four.

129
00:12:52,510 --> 00:12:59,530
‫But then the model will tell you that, sorry, man, I cannot give you the omega one and two and three

130
00:12:59,530 --> 00:13:07,270
‫and four that will allow you to achieve your required.

131
00:13:07,270 --> 00:13:10,350
‫You want you to use three and you four.

132
00:13:11,260 --> 00:13:22,810
‫So the conclusion is, have your trajectories be smooth, don't have big poles, be in the negative

133
00:13:22,810 --> 00:13:28,330
‫region if you want your errors to approach zero.

134
00:13:29,480 --> 00:13:37,850
‫And if you don't want oscillation, then be on the negative side and on this real number line, don't

135
00:13:37,850 --> 00:13:40,410
‫go into the imaginary area.

136
00:13:41,120 --> 00:13:41,540
‫Right.

137
00:13:42,780 --> 00:13:51,240
‫OK, so you want your error and error not to go to zero for that, you chose the appropriate lump the

138
00:13:51,240 --> 00:13:57,150
‫one and lump the two, you computed the right key one and key to values.

139
00:13:57,450 --> 00:14:08,130
‫And that gave you the error double dot that will then make error and error dot approach zero.

140
00:14:08,430 --> 00:14:09,770
‫But this error doubled.

141
00:14:09,780 --> 00:14:12,000
‫That is just a required value.

142
00:14:12,390 --> 00:14:19,410
‫In order to achieve this error double dot, you need to have the right you one you to use three and

143
00:14:19,410 --> 00:14:21,510
‫you four control inputs.

144
00:14:22,140 --> 00:14:34,440
‫And so that means that you need to find a connection between error dot and then you one by R and FITA

145
00:14:34,440 --> 00:14:41,460
‫are, which are the control inputs of this feedback lionization controller.

146
00:14:41,970 --> 00:14:51,660
‫And then you one will go straight to the plant and then fire and theatergoer along with your cirE will

147
00:14:51,660 --> 00:14:54,210
‫go into your NPC controller.

148
00:14:54,540 --> 00:15:01,410
‫That will give you the remaining you two, three and four control inputs.

149
00:15:01,840 --> 00:15:09,870
‫And so in the next video, we're going to learn how to make a connection between your required E double

150
00:15:09,870 --> 00:15:14,370
‫dot and then you one fire.

151
00:15:14,640 --> 00:15:17,100
‫And Sittar, thank you very much.

