﻿1
00:00:00,450 --> 00:00:01,320
‫Welcome back.

2
00:00:01,650 --> 00:00:09,960
‫So in the previous course, I explained to you that this cost function form is a very good one because

3
00:00:09,960 --> 00:00:17,850
‫you only have one independent variable there, and that is Delta, you vector, and this is what you're

4
00:00:17,850 --> 00:00:18,510
‫after.

5
00:00:18,900 --> 00:00:29,940
‫You want to find the optimum delta, you global that looks like this Delta U at K, Delta U at Cape

6
00:00:29,940 --> 00:00:40,770
‫plus one Delta you K plus two and Delta you at Cape plus three and transposed.

7
00:00:41,530 --> 00:00:50,070
‫So you want the NPC to find that so that you could take this first element here and add it to the previous

8
00:00:50,070 --> 00:00:50,570
‫you.

9
00:00:50,580 --> 00:01:00,240
‫So that was your previous you and then you add this delta, you add key to the previous you and you

10
00:01:00,240 --> 00:01:06,380
‫will get your you at K and this is what goes into the plant.

11
00:01:06,960 --> 00:01:11,990
‫Alternatively, you can expand this expression and write it out like this.

12
00:01:12,720 --> 00:01:22,770
‫And again, this one will go into your plant like this, this vector here and the other Delta use here

13
00:01:22,920 --> 00:01:24,650
‫will they will be neglected.

14
00:01:25,260 --> 00:01:33,810
‫And so this cost function form is very good because you don't have your future augmented state vectors

15
00:01:33,810 --> 00:01:37,350
‫like X till the global.

16
00:01:38,130 --> 00:01:41,340
‫You don't have it as a variable here in this cost function.

17
00:01:41,340 --> 00:01:50,490
‫For since your double prime does not have those global state vectors as an independent variable, you

18
00:01:50,490 --> 00:01:59,550
‫only have this X still that K transposed, which is your present known state and therefore a constant.

19
00:02:00,210 --> 00:02:10,650
‫But since there is no X still the global that contains future state vectors, augmented ones finding

20
00:02:10,650 --> 00:02:14,550
‫this delta you global vector is super easy.

21
00:02:15,510 --> 00:02:29,280
‫You simply take the gradient of g the prime that looks like this h double ba delta u g plus f double

22
00:02:29,280 --> 00:02:38,970
‫ba times this vector your present augmented state vector and then your global reference vector.

23
00:02:39,720 --> 00:02:43,950
‫So that's your gradient and then you make it equal to zero.

24
00:02:44,670 --> 00:02:49,500
‫In the previous course I explained extensively why the gradient is like that.

25
00:02:49,950 --> 00:02:56,610
‫So since it is a positive quadratic function, when you make the gradient of G double primes zero,

26
00:02:56,610 --> 00:03:06,870
‫it allows you to find values for Delta U global that would minimize this G double prime.

27
00:03:07,560 --> 00:03:14,640
‫And if you remember, that was the whole point, finding the Delta U global values that minimize your

28
00:03:14,640 --> 00:03:21,510
‫cost function, because through it you will find control inputs that will minimize your error while

29
00:03:21,510 --> 00:03:26,220
‫also keeping the change of your control actions as small as possible.

30
00:03:26,610 --> 00:03:33,870
‫That's why your original cost function started with two types of variables the error variables and then

31
00:03:33,870 --> 00:03:36,750
‫the delta you variables.

32
00:03:37,560 --> 00:03:47,040
‫You want to minimize your errors, but you don't want your you to use three and you for change like

33
00:03:47,040 --> 00:03:47,700
‫crazy.

34
00:03:48,420 --> 00:03:51,660
‫And so finding this delta, you global is very easy.

35
00:03:52,410 --> 00:04:01,830
‫You have this h double ba delta, you global and then the other term you put it on the other side minus

36
00:04:01,830 --> 00:04:03,120
‫F double ba.

37
00:04:03,840 --> 00:04:10,440
‫Your present augment is state vector and then your global reference vector like this.

38
00:04:11,100 --> 00:04:17,820
‫And then what you do you want to eliminate this double bar here so that you would only be left with

39
00:04:17,820 --> 00:04:20,570
‫this one here, which is this one here.

40
00:04:21,150 --> 00:04:30,180
‫So for that you're going to put h a double bar inverse here and also you have to put it here h double

41
00:04:30,180 --> 00:04:32,160
‫bar inverse.

42
00:04:32,940 --> 00:04:39,600
‫Then this thing here will become an identity matrix or one in the scale of world.

43
00:04:40,200 --> 00:04:54,750
‫And so your delta, you global equals minus H double bar inverse times F double bar times this vector

44
00:04:55,500 --> 00:04:56,460
‫and there you go.

45
00:04:56,700 --> 00:04:59,750
‫You have your formula for your delta you globe.

46
00:05:00,570 --> 00:05:07,090
‫Now, there is one important distinction that you have to make this part here.

47
00:05:07,980 --> 00:05:10,950
‫It was constant in the autonomous vehicle case.

48
00:05:11,370 --> 00:05:22,590
‫If you look at the entire cost function derivation, then H double bar and F double bar matrices ultimately

49
00:05:22,860 --> 00:05:26,580
‫contain discrete Amy ptosis in them.

50
00:05:27,480 --> 00:05:36,600
‫And in the previous course we really had an LTI system, meaning that our discrete A never changed throughout

51
00:05:36,600 --> 00:05:37,670
‫the entire maneuver.

52
00:05:37,980 --> 00:05:47,940
‫And this is why your H double bar and then your F double bar or in this case F double bar transposed.

53
00:05:48,480 --> 00:05:52,390
‫This is why they always remained unchanged.

54
00:05:53,220 --> 00:05:55,740
‫That's not the case with the US, though.

55
00:05:56,340 --> 00:06:07,290
‫Every time you send you to Q3 and Q4 to the plant, the plant will give you new states and it will also

56
00:06:07,290 --> 00:06:09,680
‫give you a new Omega.

57
00:06:10,290 --> 00:06:24,840
‫So your new P, Q R states will produce new PHY that to that and say that after you put them through

58
00:06:24,840 --> 00:06:36,180
‫the transfer matrix and then your new FY that theta that and Omega will change your continues APV a

59
00:06:36,180 --> 00:06:44,910
‫matrix and then after you democratize it you will have a different discrete a matrix, you know a different

60
00:06:45,060 --> 00:06:52,740
‫a sub D and that means that you're H double bar and F double bar transposed.

61
00:06:53,280 --> 00:07:00,150
‫And because of that your H double bar inverse and your F double bar, that means that they will also

62
00:07:00,150 --> 00:07:00,750
‫change.

63
00:07:01,440 --> 00:07:04,250
‫Remember, we don't have an LTI system here.

64
00:07:05,100 --> 00:07:13,890
‫We have a nonlinear system, but we used a linear parameter varying or Lopevi approach.

65
00:07:14,670 --> 00:07:19,770
‫Essentially we squeezed a nonlinear system into a linear system format.

66
00:07:20,220 --> 00:07:27,330
‫And inside the A matrix, we kept some of its elements as variables that we would update.

67
00:07:27,330 --> 00:07:32,370
‫Every D equals zero point one second.

68
00:07:33,180 --> 00:07:41,490
‫Every time we had an inner loop, we updated our A matrix and for smooth trajectories that we have,

69
00:07:42,030 --> 00:07:44,160
‫this approach works very well.

70
00:07:44,550 --> 00:07:48,480
‫HPV is a highly researched topic in robust control.

71
00:07:49,260 --> 00:07:51,390
‫Their entire books written about it.

72
00:07:52,510 --> 00:07:59,980
‫One book that I know is this one robust control and linear parameter varying approach by Ollivier cinema.

73
00:07:59,980 --> 00:08:06,120
‫Patrick Gasparini was Chef Bocker and that's it for this section.

74
00:08:06,520 --> 00:08:13,510
‫You have seen that there are many similarities in using NPC in the autonomous vehicle, lateral control

75
00:08:13,510 --> 00:08:15,620
‫and the use of adequate control.

76
00:08:16,390 --> 00:08:22,600
‫Of course, you have to make some adaptations, but at its core, the logic of the technique is the

77
00:08:22,600 --> 00:08:23,080
‫same.

78
00:08:23,530 --> 00:08:26,440
‫NPC is a very powerful control technique.

79
00:08:26,950 --> 00:08:35,440
‫In the next section, we will take a look at another nonlinear control technique called feedback polymerization,

80
00:08:36,100 --> 00:08:38,570
‫and that will be for the position control.

81
00:08:39,160 --> 00:08:40,260
‫Thank you very much.

82
00:08:40,540 --> 00:08:42,430
‫And I see you in the next section.

