﻿1
00:00:00,730 --> 00:00:08,620
‫And now you have all the information you need in order to calculate your one, your predicted state

2
00:00:08,620 --> 00:00:11,830
‫vector one time step into the future.

3
00:00:12,490 --> 00:00:16,480
‫This predicted XB one, it will look like this.

4
00:00:17,110 --> 00:00:26,860
‫You have your new Phi Phi Don Theta on that and side that that will be here inside your X1 vector.

5
00:00:27,400 --> 00:00:33,760
‫And now you want to predict your future state vector two time steps into the future.

6
00:00:34,360 --> 00:00:42,430
‫And so this is the equation a one times X1 plus b times you won.

7
00:00:43,060 --> 00:00:49,120
‫Now this you want here, that's your second left over from the previous loop.

8
00:00:49,810 --> 00:00:53,530
‫That's this one here or in this loop.

9
00:00:54,130 --> 00:00:55,510
‫We named it like this.

10
00:00:56,140 --> 00:01:02,020
‫So your second left over you two from the previous loop in this loop, it's you one.

11
00:01:02,620 --> 00:01:06,790
‫And so this one here, then of course, the beam matrix.

12
00:01:07,450 --> 00:01:09,040
‫It's constant everywhere.

13
00:01:09,670 --> 00:01:14,110
‫Then this X1 vector here, it's this one here.

14
00:01:14,470 --> 00:01:18,100
‫Your future predicted state one time step into the future.

15
00:01:18,760 --> 00:01:22,420
‫And with that, you can now update your a matrix.

16
00:01:23,110 --> 00:01:33,610
‫Now, from here, you will take 5.1 and 3.1 from this X1 vector and you put it inside your A1 matrix,

17
00:01:34,270 --> 00:01:39,670
‫but you also need to update your omega inside your A1 matrix.

18
00:01:40,360 --> 00:01:43,810
‫Now this omega zero, here it was calculated.

19
00:01:44,410 --> 00:01:53,830
‫Using this you one control input from feedback notation box and using these you two use three and you

20
00:01:53,830 --> 00:01:58,000
‫for values that you apply to the plan in the previous loop.

21
00:01:58,570 --> 00:01:59,860
‫You see you one.

22
00:01:59,890 --> 00:02:05,980
‫It came from your feedback linear zation box, but then you to use three and you four.

23
00:02:06,670 --> 00:02:12,160
‫These are the values that you had applied to your plan box in the previous loop.

24
00:02:12,790 --> 00:02:15,670
‫And out of all that, you got your Omega.

25
00:02:16,240 --> 00:02:18,280
‫And that's how you got your omega zero.

26
00:02:18,880 --> 00:02:27,850
‫But now, in order to update our Omega and have some kind of omega one that would go inside your A1

27
00:02:27,850 --> 00:02:28,420
‫matrix.

28
00:02:28,930 --> 00:02:39,610
‫For that, we will use you to Q3 and Q4 values from here, from use of one in the previous loop or in

29
00:02:39,610 --> 00:02:41,860
‫other words, you sub zero in this loop.

30
00:02:42,490 --> 00:02:46,990
‫So Omega Zero was calculated using this information.

31
00:02:47,650 --> 00:02:51,970
‫Omega one will be calculated using this information.

32
00:02:52,570 --> 00:02:58,420
‫And don't forget we're talking about our global omega, the omega that we are talking about here.

33
00:02:59,050 --> 00:03:05,770
‫It's this one here, the omega that is composed of all this omega super water.

34
00:03:06,490 --> 00:03:13,870
‫And so if you look at this global control architecture, then you can see that your you one, it will

35
00:03:13,870 --> 00:03:22,180
‫be the same during all the inner loop iterations, you will get a new you one value only after you start

36
00:03:22,180 --> 00:03:29,350
‫with a new outer loop, but during your inner loop iterations, your U1 will stay the same.

37
00:03:29,950 --> 00:03:36,280
‫And so in order to calculate your omega one global, your you one will remain unchanged.

38
00:03:36,910 --> 00:03:46,120
‫But for you to use in Q4, you use these values here and then you just put them inside these formulas

39
00:03:46,120 --> 00:03:46,600
‫here.

40
00:03:47,230 --> 00:03:54,100
‫You get your omega one, two, three and four for smaller one, two, three and four, and then you

41
00:03:54,100 --> 00:04:00,640
‫add them together using this formula here and this one here that will be your omega one global.

42
00:04:01,210 --> 00:04:03,970
‫And so you're a matrix is now updated.

43
00:04:03,970 --> 00:04:05,110
‫We call it A1.

44
00:04:05,740 --> 00:04:12,010
‫It now contains 5.1 theta that one and omega one global.

45
00:04:12,610 --> 00:04:15,760
‫And now you can calculate your X2.

46
00:04:16,450 --> 00:04:23,560
‫This is your predicted state vector two time steps into the future, but now you want to predict your

47
00:04:24,220 --> 00:04:27,340
‫state vector three time steps into the future.

48
00:04:27,910 --> 00:04:36,820
‫And so for that, your equations will be a two times x two plus b times you two.

49
00:04:38,200 --> 00:04:40,780
‫And so you simply followed the same drill.

50
00:04:41,350 --> 00:04:42,850
‫You have this equation here.

51
00:04:43,600 --> 00:04:45,310
‫This you two here.

52
00:04:45,940 --> 00:04:50,680
‫That's your third and final leftover from the previous loop.

53
00:04:51,310 --> 00:04:54,460
‫It was you three in the previous loop.

54
00:04:55,120 --> 00:04:58,900
‫And now in this loop, it has become you two.

55
00:04:59,530 --> 00:05:04,510
‫And that's why here I call you to your Vector X2.

56
00:05:05,170 --> 00:05:06,250
‫It looks like this.

57
00:05:06,910 --> 00:05:08,100
‫And just like you took.

58
00:05:08,650 --> 00:05:15,160
‫Find out one and see to that one in order to update your image x here.

59
00:05:15,790 --> 00:05:18,970
‫Inform your A1 matrix the same thing.

60
00:05:18,970 --> 00:05:30,550
‫Here you're going to take your 5.2 and feet under two that comes from this x two state vector and you're

61
00:05:30,550 --> 00:05:33,550
‫going to update your a matrix.

62
00:05:34,030 --> 00:05:38,020
‫With these two variables, 5.2 and thethird are two.

63
00:05:38,650 --> 00:05:46,540
‫But of course, you also have to update your global omega inside your matrix in order to form your A2

64
00:05:46,540 --> 00:05:47,050
‫matrix.

65
00:05:47,680 --> 00:05:54,910
‫You need your omega to global, and in order to do that, you go back to these equations.

66
00:05:55,570 --> 00:06:03,040
‫Your you one will be the same because your new one will change only after you go through this feedback

67
00:06:03,100 --> 00:06:08,230
‫unionisation box again, but you two using your four, they will change.

68
00:06:08,860 --> 00:06:13,600
‫And so now you will take this sub vector here.

69
00:06:13,930 --> 00:06:22,450
‫Your second left over and you will use that together with your unchanged you one in order to calculate

70
00:06:22,450 --> 00:06:24,520
‫your omega to global.

71
00:06:25,120 --> 00:06:28,390
‫So this second left over, it's this one here.

72
00:06:29,020 --> 00:06:33,610
‫Or if you think in terms of a next loop, then it's this one here.

73
00:06:34,210 --> 00:06:42,250
‫And so you put all these used here inside your formula, you calculate your omega one, two, three

74
00:06:42,250 --> 00:06:50,470
‫and four for your model one, two, three and four, and then you form your global omega, which will

75
00:06:50,470 --> 00:06:55,930
‫be your omega to global that will also go inside this AA matrix.

76
00:06:56,560 --> 00:07:00,600
‫And so your A2 matrix is now complete and then you'll be.

77
00:07:00,610 --> 00:07:02,650
‫Matrix remains unchanged.

78
00:07:03,220 --> 00:07:11,920
‫And with all that, you can compute your EXP three, which is your predicted state vector three time

79
00:07:11,930 --> 00:07:13,300
‫steps into the future.

80
00:07:13,900 --> 00:07:22,750
‫And in order to predict for time steps into the future, you will have this equation a three times Exp

81
00:07:22,750 --> 00:07:26,920
‫three plus B times use of three.

82
00:07:27,550 --> 00:07:33,310
‫Now, the thing is that there is no left over left for your U3.

83
00:07:33,880 --> 00:07:36,070
‫We have used up all the use here.

84
00:07:36,700 --> 00:07:39,790
‫The first one went into the plant in the previous loop.

85
00:07:40,510 --> 00:07:45,100
‫Then in the next loop, your you one became your use zero and went here.

86
00:07:45,700 --> 00:07:52,240
‫Then you two became u one and went here and then your U3.

87
00:07:52,900 --> 00:07:55,240
‫It became you two and it went here.

88
00:07:55,840 --> 00:07:57,400
‫So you have no more use left.

89
00:07:57,910 --> 00:08:06,190
‫But that's OK because your main goal is not to calculate, except for your main goal is to update this

90
00:08:06,580 --> 00:08:18,730
‫matrix and get your A3 matrix and you get this A3 matrix updated by using information from Excerpt three.

91
00:08:19,270 --> 00:08:29,200
‫So my ace up is here and then from X up three, you will simply take five, three and three to the three

92
00:08:29,530 --> 00:08:34,060
‫because this is how your x three looks like transposed.

93
00:08:34,510 --> 00:08:38,470
‫And so you will take this one and this one.

94
00:08:39,100 --> 00:08:43,690
‫And now you also need to calculate your omega three global.

95
00:08:44,320 --> 00:08:52,930
‫And in order to do that, you take this final left over here that you had discarded in the previous

96
00:08:52,930 --> 00:08:53,350
‫loop.

97
00:08:53,980 --> 00:09:01,210
‫And you're going to use that to calculate your omega three global together with your unchanged you one

98
00:09:01,210 --> 00:09:08,650
‫value because again, you one only changes when your next outlook starts.

99
00:09:09,310 --> 00:09:16,900
‫And so you put all that inside your omega formulas, you calculate your global omega, which will be

100
00:09:16,900 --> 00:09:18,340
‫your omega three global.

101
00:09:18,970 --> 00:09:25,510
‫And with that, you update your a matrix and you will have your A3 matrix.

102
00:09:26,170 --> 00:09:30,700
‫And since our horizon period equals four, then this is where we stop.

103
00:09:32,050 --> 00:09:43,060
‫And so in the end, you have an eight zero matrix that depends on a 5.0 seat, the zero and omega zero

104
00:09:43,420 --> 00:09:54,280
‫global, then you have a one that is a function of find out one seat and at one and omega one, global

105
00:09:54,880 --> 00:10:02,020
‫A2 is a function of fine, a two seater that two and omega two global.

106
00:10:02,560 --> 00:10:05,020
‫And finally, a three.

107
00:10:05,680 --> 00:10:13,360
‫It's a function of fine, a three seater that three and omega three global.

108
00:10:13,960 --> 00:10:22,720
‫So even if you are inside your NPC box predicting your state vectors into the future internally, even

109
00:10:22,720 --> 00:10:25,540
‫then we are updating our matrices.

110
00:10:26,170 --> 00:10:35,950
‫So let's now put them in a global matrix vector form where you only need your use and your present state

111
00:10:35,950 --> 00:10:46,360
‫vector in order to compute your X1, X2, X3 and X4 in one go.

112
00:10:46,960 --> 00:10:48,670
‫Let's do that in the next video.

113
00:10:48,700 --> 00:10:49,570
‫Thank you very much.

