﻿1
00:00:00,740 --> 00:00:01,580
‫Welcome back.

2
00:00:02,120 --> 00:00:10,260
‫Let's now create a matrix vector form for the predicted states, you know, that X1 equals.

3
00:00:10,910 --> 00:00:18,920
‫And then this equation here, then you also know that X2 equals this equation here.

4
00:00:19,520 --> 00:00:25,790
‫But now what I can do, I can replace this X1 with all this.

5
00:00:26,450 --> 00:00:34,340
‫And because of that, I can rewrite this entire equation like this or like this.

6
00:00:35,000 --> 00:00:39,680
‫Then X three equals this equation here.

7
00:00:40,340 --> 00:00:47,780
‫But this X2 here, it can be replaced with this equation here like this.

8
00:00:48,290 --> 00:00:52,820
‫And as a result, you can rewrite this entire thing like this.

9
00:00:53,390 --> 00:01:04,460
‫Finally, X4 equals all this, but this x three here, it can be replaced with this equation.

10
00:01:05,060 --> 00:01:12,140
‫And as a result, X4 equals all this here this entire equation.

11
00:01:12,710 --> 00:01:20,900
‫And now I can take X1, X2, X3 and X4.

12
00:01:21,560 --> 00:01:27,140
‫I can put them all in one global vector, even though they are vectors as well.

13
00:01:27,770 --> 00:01:32,900
‫But here they are, like sub vectors inside one big global vector.

14
00:01:33,470 --> 00:01:37,010
‫And then I can take this equation here.

15
00:01:37,700 --> 00:01:39,260
‫Then this equation here.

16
00:01:39,920 --> 00:01:49,280
‫Also this one here and also this one here, and I can rewrite all this in this form.

17
00:01:49,910 --> 00:01:55,880
‫If I write all this out, I will get back the same equations that you see here.

18
00:01:56,450 --> 00:02:06,350
‫For example, if I take the terms with zero, you have one here, one here, also one here and then

19
00:02:06,350 --> 00:02:07,190
‫one here.

20
00:02:07,850 --> 00:02:10,040
‫All these terms are represented here.

21
00:02:10,610 --> 00:02:14,120
‫And then all the other terms, they are represented here.

22
00:02:14,720 --> 00:02:20,540
‫So I have simply taken these equations and put them in this matrix vector form.

23
00:02:21,110 --> 00:02:28,280
‫And so if you look at this form and you compare it with this simplified version, then you can see the

24
00:02:28,280 --> 00:02:31,010
‫difference in the simplified version.

25
00:02:31,670 --> 00:02:40,240
‫You don't update your matrices internally inside your PC box when you predict your future states there.

26
00:02:40,880 --> 00:02:50,600
‫You're essentially assuming that a zero equals a one equals A2 equals a three.

27
00:02:51,900 --> 00:03:00,870
‫So just to specify, as you go through the plant, every inner loop, every 0.1 seconds, you have a

28
00:03:00,870 --> 00:03:03,300
‫new A0 matrix.

29
00:03:03,990 --> 00:03:14,550
‫But when you predict your future state vectors X1, X2, X3 and X4 inside your LPV PC box internally,

30
00:03:15,210 --> 00:03:19,920
‫then in the simplified version, you don't update your a matrix.

31
00:03:20,610 --> 00:03:28,080
‫You simply say that your A0 equals a and then you use your A0 matrix everywhere.

32
00:03:28,620 --> 00:03:37,920
‫You don't go through this tedious process where even in your prediction phase, you generate new a matrices

33
00:03:38,550 --> 00:03:42,090
‫every inner loop you take your A0 matrix.

34
00:03:42,810 --> 00:03:48,870
‫That depends on 5.0 v2.0 and omega zero global.

35
00:03:49,470 --> 00:03:52,740
‫And then you stick with that and you use it everywhere.

36
00:03:53,400 --> 00:04:00,840
‫Then in the next in a loop, you get your new A0 matrix and again, you use it everywhere.

37
00:04:01,440 --> 00:04:04,170
‫And that's why you can use your powers here.

38
00:04:04,770 --> 00:04:08,370
‫For example, this one here eight to the power of three.

39
00:04:08,850 --> 00:04:11,220
‫So eight to the power of three.

40
00:04:11,430 --> 00:04:13,740
‫That would be triple A..

41
00:04:14,400 --> 00:04:17,460
‫That's because the matrices are the same.

42
00:04:18,090 --> 00:04:20,940
‫They are your A0 matrices.

43
00:04:21,600 --> 00:04:31,560
‫However, in the non simplified version, you take an extra step and you update your AA matrices internally

44
00:04:32,130 --> 00:04:41,160
‫inside your LTV NPC box while you are in the process of predicting your future state vectors x one x

45
00:04:41,160 --> 00:04:43,050
‫two x three and X4.

46
00:04:43,620 --> 00:04:51,180
‫And that's why, in this non simplified version, you cannot use powers instead of eight to the power

47
00:04:51,180 --> 00:04:52,020
‫of three.

48
00:04:52,620 --> 00:04:57,660
‫You will have something like this a three times a two times a one.

49
00:04:58,260 --> 00:05:07,130
‫You cannot use powers because now these matrices are different A380 to a one a zero.

50
00:05:07,830 --> 00:05:09,480
‫They are not the same matrices.

51
00:05:10,170 --> 00:05:18,180
‫The simplified version is easier to code, but the non simplified version is more complete when your

52
00:05:18,180 --> 00:05:27,780
‫horizon period is very short and the variables inside the matrices change relatively slowly.

53
00:05:28,500 --> 00:05:35,160
‫Then it's reasonable to use the simplified version, and in this course, we will do just that.

54
00:05:35,760 --> 00:05:43,980
‫Our Horizon period equals four, which is a very short, and the drone is expected to fly close to hovering

55
00:05:43,980 --> 00:05:49,530
‫position, meaning that it is not expected to do crazy acrobatics.

56
00:05:50,190 --> 00:05:58,200
‫So we can assume that our A0 matrix is more or less like our A1 matrix, which is more or less like

57
00:05:58,500 --> 00:06:03,030
‫a too matrix and which is more or less like a three matrix.

58
00:06:03,660 --> 00:06:12,990
‫And so we will simply use A0 or simply a in our entire state vector predictions.

59
00:06:13,530 --> 00:06:21,380
‫However, when the horizon period is relatively long, let's say it equals 10.

60
00:06:22,050 --> 00:06:29,490
‫Then inside your LPV and PC box, when you make your internal state vector predictions there, you will

61
00:06:29,490 --> 00:06:35,730
‫be predicting x one x two up until x 10.

62
00:06:36,390 --> 00:06:46,140
‫So you will have 10 different a matrices A0 A1 up until a nine since the prediction period is considerably

63
00:06:46,140 --> 00:06:46,860
‫longer.

64
00:06:47,400 --> 00:06:57,270
‫It would not be correct to assume that, for example, a zero is more or less a nine over a longer time

65
00:06:57,270 --> 00:06:57,810
‫period.

66
00:06:58,530 --> 00:07:02,910
‫These matrices can become considerably more different.

67
00:07:03,480 --> 00:07:07,230
‫That's when you should use this non simplified version.

68
00:07:07,890 --> 00:07:12,960
‫In fact, in the course, apply control systems to autonomous cars.

69
00:07:13,320 --> 00:07:19,980
‫360 tracking I use the non simplified version over their horizon.

70
00:07:19,980 --> 00:07:23,850
‫Period equals 10, and it can be made even longer.

71
00:07:24,480 --> 00:07:29,970
‫And that's why the non simplified LP, the NPC is used there.

72
00:07:30,570 --> 00:07:36,720
‫And as you can see in that car course, even the B matrix is updated.

73
00:07:37,140 --> 00:07:40,500
‫You see b0, B1, B2.

74
00:07:41,190 --> 00:07:49,200
‫That's because in that car, of course, the B matrix also contains a variable that changes there.

75
00:07:49,770 --> 00:07:51,030
‫And so that's when I have.

76
00:07:51,140 --> 00:08:00,020
‫To say about this non simplified version of the LP PC controller, I simply wanted you to know about

77
00:08:00,020 --> 00:08:05,480
‫this more advanced version in case you need to use it in one day.

78
00:08:06,080 --> 00:08:06,950
‫Thank you very much.

