﻿1
00:00:00,560 --> 00:00:07,730
‫So this is the code here, and by the way, in the next section, I'm going to explain the code to you

2
00:00:07,730 --> 00:00:09,460
‫in a more detailed way.

3
00:00:09,830 --> 00:00:17,780
‫However, right now, I just want to show you how the drone behaves when I play around with my polls

4
00:00:18,680 --> 00:00:25,730
‫so I can choose my polls here, polls for the extermination, polls for the why dimension and also polls

5
00:00:25,730 --> 00:00:26,950
‫for the Z dimension.

6
00:00:27,680 --> 00:00:32,750
‫And so my Lunda one is going to be minus one in my lamda.

7
00:00:32,750 --> 00:00:37,430
‫Two is going to be minus two for all three dimensions.

8
00:00:38,510 --> 00:00:46,930
‫And you can see that the drone is able to track the trajectory quite well.

9
00:00:48,150 --> 00:00:53,080
‫So here you have the X dimension, Y dimension and then the Z dimension.

10
00:00:53,100 --> 00:00:59,520
‫So the blue is the reference trajectory and then the red is the true value.

11
00:01:00,650 --> 00:01:07,410
‫And then here you have the fly and then the Seeta and BPCI angles.

12
00:01:07,940 --> 00:01:13,910
‫So, again, Blue is the reference trajectory and then the red is the true trajectory.

13
00:01:14,520 --> 00:01:18,650
‫So you can see the drone is able to follow the trajectory quite well.

14
00:01:19,940 --> 00:01:22,070
‫So this is the examination here.

15
00:01:22,550 --> 00:01:29,600
‫You can see how the drone was able to follow specifically the X dimension and also the X dot dimension.

16
00:01:29,780 --> 00:01:36,190
‫So this is the time derivative of the X dimension and you can see how it is able to follow that as well.

17
00:01:36,920 --> 00:01:40,280
‫The same thing for why and why dot values.

18
00:01:40,940 --> 00:01:42,350
‫You can see the tracking.

19
00:01:43,320 --> 00:01:47,040
‫And here you have Z and then the Z dot values.

20
00:01:48,130 --> 00:01:55,630
‫Here you have the angles and then here you have the control, he puts you one, you to you three and

21
00:01:55,630 --> 00:02:03,790
‫then you four, and then here you have the Omega Omega one, omega two, omega three and Omega four.

22
00:02:05,140 --> 00:02:13,450
‫And now let's look at a more complicated trajectory, but still with these polls, you can see that

23
00:02:13,450 --> 00:02:17,290
‫the drone is able to track the trajectory quite well.

24
00:02:18,190 --> 00:02:23,490
‫This is the X dimension here, the Y dimension and then the Z dimension.

25
00:02:23,980 --> 00:02:25,930
‫And these are the angles.

26
00:02:27,310 --> 00:02:35,500
‫So you can see that the feedback lionization controller is constantly feeding different angles to the

27
00:02:35,620 --> 00:02:42,490
‫NPC controller as reference values, and then the NPC controller is trying to track that.

28
00:02:43,330 --> 00:02:50,500
‫But those reference values, what the feedback lionization controller gives to the NPC controller,

29
00:02:51,310 --> 00:02:59,710
‫they originate from the polls that we have chosen, Lunda one minus one and then Lunda two minus two.

30
00:03:00,490 --> 00:03:05,980
‫And that will, of course, make your K one value in your differential equation.

31
00:03:06,970 --> 00:03:15,340
‫This K one value for X, Y and Z dimension minus two, and then K two values will be minus three.

32
00:03:16,600 --> 00:03:17,950
‫And so that's how it is.

33
00:03:18,920 --> 00:03:23,920
‫So that's how it has been able to track the entire trajectory quite well.

34
00:03:25,010 --> 00:03:26,750
‫That's your X dimension.

35
00:03:27,810 --> 00:03:29,670
‫That's your y dimension.

36
00:03:30,720 --> 00:03:35,580
‫That's your Z dimension, and these are your angles here.

37
00:03:36,730 --> 00:03:44,830
‫You see, if you zoom in, then you will see that the inner loop is running at a faster rate at the

38
00:03:44,830 --> 00:03:53,290
‫higher frequency, so the red line changes several times compared to the blue line, which is the reference

39
00:03:53,290 --> 00:04:05,440
‫values given to the NPC controller by the feedback controller that originated from our choice with regards

40
00:04:05,440 --> 00:04:06,580
‫to our polls.

41
00:04:07,570 --> 00:04:15,950
‫And, of course, the Passi reference angle, well, that's generated by the planner, but the finance

42
00:04:15,950 --> 00:04:21,580
‫and Seeta reference angles, they're generated by the feedback lionization controller.

43
00:04:22,580 --> 00:04:29,570
‫And well, here you have your control inputs, you one year to Q3 and Q4, and here you have Omega's

44
00:04:30,080 --> 00:04:31,550
‫radians per second.

45
00:04:32,620 --> 00:04:45,040
‫But now let's do something else, let's take this poll in the X dimension and let's say that the two

46
00:04:45,070 --> 00:04:54,880
‫still equals minus two, but let's make Lumb the one zero point zero one.

47
00:04:55,850 --> 00:05:03,650
‫So a very small, positive poll and let's see what's going to happen so you can see that it is starting

48
00:05:03,650 --> 00:05:06,260
‫to track the reference line.

49
00:05:06,870 --> 00:05:09,020
‫Well, however.

50
00:05:10,120 --> 00:05:18,010
‫The red line is getting further apart from the blue line in this dimension, you see, it's not doing

51
00:05:18,010 --> 00:05:18,670
‫so well.

52
00:05:19,390 --> 00:05:25,250
‫The Y dimension is doing well, the Z dimension is doing well, but not the X dimension.

53
00:05:26,110 --> 00:05:27,430
‫And look at the result.

54
00:05:28,030 --> 00:05:29,790
‫The difference is growing.

55
00:05:30,670 --> 00:05:32,860
‫You see, that's your X dimension here.

56
00:05:33,400 --> 00:05:40,330
‫And you can see that the error, which is the difference between the blue line and the red line, because

57
00:05:40,330 --> 00:05:46,990
‫the blue line is the reference value and then the red line is the true value that belongs to the real

58
00:05:46,990 --> 00:05:47,560
‫drawn.

59
00:05:48,720 --> 00:05:52,050
‫You see that this error is growing.

60
00:05:53,300 --> 00:05:58,020
‫So if you give it a lot more time, then this error is going to grow a lot.

61
00:05:59,000 --> 00:06:03,500
‫You don't have that problem in the Y dimension nor in the Z dimension.

62
00:06:04,880 --> 00:06:09,480
‫And the controller is also doing a good job in.

63
00:06:10,720 --> 00:06:18,280
‫Tracking the reference values that the feedback Latinization controller gives it, however, when it

64
00:06:18,280 --> 00:06:27,100
‫comes to the extent mentioned in the feedback, lionization controller gives bad reference values to

65
00:06:27,100 --> 00:06:28,300
‫the NPC controller.

66
00:06:29,490 --> 00:06:36,210
‫Those reference values are not enabling the drone to follow its trajectory in the X dimension.

67
00:06:37,340 --> 00:06:41,180
‫And these are your control inputs and your omega's.

68
00:06:42,390 --> 00:06:45,870
‫And the reason is what we have talked about before.

69
00:06:47,000 --> 00:06:55,700
‫So if this is your general solution here, then, yes, you have a big negative Lunda, too, you have

70
00:06:55,700 --> 00:06:56,290
‫it here.

71
00:06:56,300 --> 00:06:59,060
‫That's your minus two here.

72
00:06:59,780 --> 00:07:03,830
‫However, you have a small positive Lunda, one zero point zero one.

73
00:07:04,870 --> 00:07:13,610
‫And because of that, when your time goes to infinity, then over time this term will approach zero.

74
00:07:14,200 --> 00:07:23,980
‫But this term will approach infinity and so you will have infinity, plus zero will be infinity.

75
00:07:24,280 --> 00:07:34,030
‫So your total error or the distance between the blue and the red line, that's your error here.

76
00:07:34,390 --> 00:07:42,430
‫Error as a function of time from this equation, you see that it's going to grow up until infinity as

77
00:07:42,430 --> 00:07:44,620
‫your time goes to infinity.

78
00:07:45,070 --> 00:07:53,140
‫In other words, in real life, it means that this error is going to grow and it's going to grow until

79
00:07:53,140 --> 00:07:54,290
‫your drone crashes.

80
00:07:55,300 --> 00:08:03,980
‫So you see even a small positive lambda can mess up this big negative other Londa.

81
00:08:04,840 --> 00:08:07,720
‫So both Londis need to be negative.

