﻿1
00:00:00,540 --> 00:00:01,330
‫Welcome back.

2
00:00:01,860 --> 00:00:06,410
‫So let's fill in the system now and let's start with the B matrix.

3
00:00:07,320 --> 00:00:15,630
‫If you look at these equations here, then in each equation you have your last term and these last terms

4
00:00:15,630 --> 00:00:16,230
‫here.

5
00:00:16,230 --> 00:00:18,960
‫They are relevant to our B matrix.

6
00:00:20,010 --> 00:00:28,110
‫So you have your control inputs here and your B matrix, and you have to be able to use them.

7
00:00:29,190 --> 00:00:36,710
‫To construct these terms here with you to Q3 and Q4 and to do that, it's quite easy.

8
00:00:37,320 --> 00:00:42,640
‫You can see that the control inputs, they are divided by the mass moments of inertia.

9
00:00:43,350 --> 00:00:53,260
‫And so if you take this last term in the first equation, for example, then you can put one over Isobar,

10
00:00:53,280 --> 00:00:58,260
‫X, X here and then you can have zero here and here.

11
00:00:59,130 --> 00:01:03,090
‫Then you would multiply one over, I suspect six.

12
00:01:03,180 --> 00:01:11,370
‫You would multiply that by you two and then you will have some other terms from here and then you will

13
00:01:11,370 --> 00:01:14,340
‫get your five double dots and there you go.

14
00:01:14,340 --> 00:01:23,490
‫You have your five double dot equals something plus you two over ice up X X four seater double knot.

15
00:01:24,120 --> 00:01:25,050
‫It's like this.

16
00:01:25,050 --> 00:01:33,390
‫You have zero here, one over I suppose Y y and then zero here.

17
00:01:34,080 --> 00:01:42,060
‫Now you would multiply this one over mass moment of inertia, but the body frame y axis, you would

18
00:01:42,060 --> 00:01:44,520
‫multiply by you three.

19
00:01:45,390 --> 00:01:55,200
‫And that's why you have this last term here like this and finally for Citable Dot, you have it like

20
00:01:55,200 --> 00:02:05,880
‫this one over I, sub Z and Z and that thing, you multiplied by four.

21
00:02:06,690 --> 00:02:10,200
‫And here is the last term of the last equation.

22
00:02:10,200 --> 00:02:16,460
‫EUFOR divided by the mass movement of inertia, but the body from Z axis.

23
00:02:17,340 --> 00:02:19,340
‫So the B matrix was easy.

24
00:02:19,350 --> 00:02:21,130
‫And how about the A matrix.

25
00:02:21,150 --> 00:02:21,480
‫Now.

26
00:02:22,450 --> 00:02:27,910
‫So the Matrix looks like this and let's analyze it a bit.

27
00:02:28,880 --> 00:02:38,570
‫You have your fi double dot equals and then you have these terms here and then the first two terms,

28
00:02:39,360 --> 00:02:41,550
‫they are relevant to the A matrix.

29
00:02:42,740 --> 00:02:52,160
‫So if you take this element here and then you multiply it by theta dot.

30
00:02:53,370 --> 00:02:57,360
‫Then you will get the second term here, right, this one.

31
00:02:58,330 --> 00:03:10,690
‫And then if you take this element here and then you multiply it by side that, well, then you get this

32
00:03:10,690 --> 00:03:12,630
‫first term here, right?

33
00:03:13,710 --> 00:03:21,930
‫Because that would be inside your state vector, but then everything else will be in the Matrix.

34
00:03:22,890 --> 00:03:29,500
‫And you can already see that it's a nonlinear system because, look, you have one state inside the

35
00:03:29,610 --> 00:03:30,690
‫Matrix as well.

36
00:03:31,530 --> 00:03:33,930
‫You had this setar dot here.

37
00:03:34,900 --> 00:03:43,300
‫And now if you take to double that equals and then you take this element here and you multiply it by

38
00:03:43,300 --> 00:03:52,150
‫five, that will then you get this term here right in this second equation, second term.

39
00:03:52,990 --> 00:03:55,180
‫And you see you have a minus sign here.

40
00:03:55,600 --> 00:03:59,570
‫And that's why you have a minus sign here as well.

41
00:04:00,460 --> 00:04:12,370
‫And then if you take this element here and you multiply it by side dot, then you will get this first

42
00:04:12,370 --> 00:04:18,820
‫term here in the second equation side that again, would be in the state vector and then everything

43
00:04:18,820 --> 00:04:20,530
‫else would be in the A matrix.

44
00:04:21,280 --> 00:04:26,000
‫So you see, you have a state inside the Matrix as well, this five dot.

45
00:04:26,860 --> 00:04:30,220
‫And finally, what are you going to do about the third equation here?

46
00:04:31,240 --> 00:04:35,430
‫Well, you can do it in several ways, but this is how I did it.

47
00:04:36,130 --> 00:04:47,950
‫I take this element here and then I multiply it by this one here, and then I take this element here,

48
00:04:48,490 --> 00:04:52,570
‫and then I multiply it by the state here.

49
00:04:53,320 --> 00:04:58,990
‫And you see you have your theta that state here in your file, that state here.

50
00:04:59,860 --> 00:05:01,510
‫And you can perfectly do it.

51
00:05:01,900 --> 00:05:03,990
‫If you write it out, then you will see why.

52
00:05:04,960 --> 00:05:07,570
‫So you're upside double dot equals.

53
00:05:08,600 --> 00:05:16,550
‫So this one is this element here, and I'm going to multiply by five dot, which is this one here.

54
00:05:17,530 --> 00:05:27,730
‫Plus, this element here, Times seat, that which is this one here, and then, of course, you take

55
00:05:27,730 --> 00:05:38,400
‫this element here, one over I up, and then you multiply it by your EUFOR, which would be here.

56
00:05:39,400 --> 00:05:46,890
‫Now you can see that the first and then the second term, they actually have a common denominator.

57
00:05:47,020 --> 00:05:47,530
‫Right.

58
00:05:47,890 --> 00:05:50,650
‫And then they also have the same states here.

59
00:05:50,650 --> 00:05:58,210
‫You have theatergoer and find that here and then fita that and find that here just in another order,

60
00:05:58,210 --> 00:05:59,130
‫which doesn't matter.

61
00:05:59,830 --> 00:06:06,570
‫And also in both terms you have X, X minus I y, y, so you have it here and here.

62
00:06:07,510 --> 00:06:13,000
‫So your numerator is also the same and that means that you can add them up.

63
00:06:13,970 --> 00:06:21,860
‫And so if you add them up the first and then the second term, you will have it like this, plus you

64
00:06:21,870 --> 00:06:26,860
‫for over, I sup Z and Z.

65
00:06:27,560 --> 00:06:33,920
‫And if you look at this form now, then it's exactly like your third equation here.

66
00:06:34,400 --> 00:06:36,760
‫BPCI double dot equals everything else.

67
00:06:37,580 --> 00:06:39,370
‫So that's how it looks like.

68
00:06:40,010 --> 00:06:43,670
‫But now again, is it an LTI form?

69
00:06:44,240 --> 00:06:56,960
‫Well, no, it's not because well the B matrix and also your C and D matrices, while they're all constant

70
00:06:57,770 --> 00:07:04,430
‫and you can see that your C matrix was constant, you only had ones and zeros there and inside the Matrix,

71
00:07:04,430 --> 00:07:05,750
‫you only had zeros there.

72
00:07:05,930 --> 00:07:07,270
‫So they are also constant.

73
00:07:08,060 --> 00:07:14,840
‫So while you're A, B, C and D matrices are constant, you're a matrix is not.

74
00:07:15,890 --> 00:07:25,580
‫You have variables, dot theta that and Omega inside the A Matrix and those things, they change.

75
00:07:26,490 --> 00:07:36,270
‫The Matrix is not even an LTV, linear time, varying system, you're a matrix does not directly depend

76
00:07:36,270 --> 00:07:37,020
‫on time.

77
00:07:38,010 --> 00:07:46,380
‫Your matrix has other states in it and then even a variable that we didn't classify as a state and all

78
00:07:46,380 --> 00:07:51,630
‫of them depend on time, so it is obviously a nonlinear system.

79
00:07:52,550 --> 00:08:01,910
‫And just to be clear, we don't have to specify all variables that change, like, for example, this

80
00:08:01,910 --> 00:08:02,490
‫Omega.

81
00:08:03,050 --> 00:08:06,290
‫We don't have to specify them all as states.

82
00:08:07,250 --> 00:08:17,120
‫Remember, in the previous course, I said that the states are the variables that change that you absolutely

83
00:08:17,120 --> 00:08:20,720
‫need to have in order to control the system.

84
00:08:21,590 --> 00:08:31,310
‫In other words, you can have many variables that change, but you don't have to classify them all as

85
00:08:31,310 --> 00:08:32,000
‫states.

86
00:08:32,240 --> 00:08:37,640
‫If you can, for example, classify some of them as states and you're able to control your system,

87
00:08:38,540 --> 00:08:39,470
‫then that's OK.

88
00:08:39,470 --> 00:08:44,920
‫And you can leave other variables B without classifying them as states.

89
00:08:45,440 --> 00:08:47,720
‫So that's what we have done here with an Omega.

90
00:08:48,530 --> 00:08:55,970
‫This variable changes, but we don't need to classify it as a state in order to be able to control our

91
00:08:55,970 --> 00:08:56,450
‫system.

92
00:08:57,260 --> 00:09:05,270
‫And that makes our lives easier because thanks to that, our state vector is smaller and our A and B

93
00:09:05,270 --> 00:09:06,710
‫matrices are smaller.

94
00:09:07,610 --> 00:09:16,040
‫But OK, so we have now established that we have a nonlinear system and we cannot have a small ÀNGEL

95
00:09:16,050 --> 00:09:25,160
‫approximation with Phi Dot or Setar that they are not going to be small values when the drone follows

96
00:09:25,160 --> 00:09:26,090
‫the trajectory.

97
00:09:27,200 --> 00:09:34,940
‫And there is no reason to believe that the omega value will be small as well, because especially if

98
00:09:34,940 --> 00:09:42,200
‫you have a huge difference between counterclockwise and clockwise, rather rotations, than this omega

99
00:09:42,200 --> 00:09:44,430
‫value will be quite large.

100
00:09:45,050 --> 00:09:49,940
‫So you cannot approximate it to be small or zero.

101
00:09:50,840 --> 00:09:57,350
‫So does that mean that we cannot use the NPC strategy that you learned in the previous course?

102
00:09:58,220 --> 00:10:02,530
‫Well, based on the information you have so far, no.

103
00:10:03,080 --> 00:10:11,450
‫However, in this course, you will learn that you, in fact, can use that easiest NPC strategy even

104
00:10:11,450 --> 00:10:11,940
‫here.

105
00:10:12,770 --> 00:10:14,800
‫Let's talk about it in the next video.

