1
00:00:03,770 --> 00:00:09,140
So now let's actually put some numbers behind it and look at a real world example so we can understand

2
00:00:09,140 --> 00:00:09,950
what's going on.

3
00:00:11,060 --> 00:00:14,090
So let's consider the vehicle process model that we've been using.

4
00:00:14,090 --> 00:00:15,940
And that's basically our process model.

5
00:00:15,950 --> 00:00:22,370
If we take in the previous state and current controls and calculate the new state for the current time

6
00:00:22,370 --> 00:00:22,710
step.

7
00:00:23,270 --> 00:00:30,140
So in the two day vehicle process model, we have our state vector being our velocity heading position

8
00:00:30,140 --> 00:00:36,080
in the X and position and Y, our inputs to the same process model are going to be our accelerations.

9
00:00:36,080 --> 00:00:40,580
And you're right, and these are the equations that we have been using.

10
00:00:41,360 --> 00:00:46,910
So we're going to go through an example where we use this to calculate the Jacobean of this process

11
00:00:46,910 --> 00:00:47,510
model here.

12
00:00:48,680 --> 00:00:54,410
So first off is that we want to define the previous state that we want to linear the system about.

13
00:00:54,410 --> 00:01:00,680
And we're going to use this state vector here so we can have a velocity equals 2.5 hour heading is going

14
00:01:00,680 --> 00:01:03,530
to be our point seven or seven radians.

15
00:01:03,710 --> 00:01:05,470
Our exposition is going to be 10.

16
00:01:05,720 --> 00:01:07,970
A Y position is going to be negative five.

17
00:01:09,240 --> 00:01:15,030
Now, for our current input, we're going to assume that we're linear, rising at around a acceleration

18
00:01:15,030 --> 00:01:20,490
value of one point five and your rate of negative point to five.

19
00:01:23,040 --> 00:01:29,070
We're also going to need to define a few parameters, we're going to define a date value of point one,

20
00:01:29,520 --> 00:01:34,370
and when we're calculating the Jacoby numerically, we're going to be using a Delta X.

21
00:01:34,380 --> 00:01:37,650
So this is the perturbed amount that we want to be to the X states.

22
00:01:37,650 --> 00:01:43,680
It's going to be our point zero one and we're going to do the same value for our total amount for the

23
00:01:43,680 --> 00:01:45,690
input 0.01.

24
00:01:47,610 --> 00:01:54,030
So this state here becomes the initial condition that we want to lean your eyes for The X Factor, and

25
00:01:54,030 --> 00:01:59,270
this input here is going to become our initial condition for the input that we want to see in your eyes

26
00:01:59,280 --> 00:02:00,380
and system about as well.

27
00:02:01,630 --> 00:02:07,270
So the first step in the process is to calculate the output for the militarization point, so that's

28
00:02:07,270 --> 00:02:13,330
basically what we put in our external and, you know, values into the function to evaluate what it

29
00:02:13,330 --> 00:02:15,200
would be in this condition here.

30
00:02:15,670 --> 00:02:20,890
So when we do that numerically, we take these equations here, substitute in these values here, and

31
00:02:20,890 --> 00:02:23,510
we end up with this series of equations here.

32
00:02:24,190 --> 00:02:28,620
So basically, we're taking out like velocity two point five here.

33
00:02:28,630 --> 00:02:34,290
Our data point one times our acceleration amount one point five.

34
00:02:34,300 --> 00:02:37,490
And when we do the calculation, we're going to get our two point six five.

35
00:02:37,720 --> 00:02:43,300
And when you do the same thing for a heading and the position and the X and position and the Y and we

36
00:02:43,300 --> 00:02:45,310
end up with this Y, not vector.

37
00:02:46,660 --> 00:02:49,980
Now we also want to do it for our X1.

38
00:02:50,020 --> 00:02:56,530
So this is when we perturb the first element inside our vector and then we do the same process.

39
00:02:56,530 --> 00:03:02,270
We put the we put the vector into our process model and evaluate the output.

40
00:03:03,010 --> 00:03:09,400
So when we perturb the first state of velocity, we're going to be tabatabai out the X amount, our

41
00:03:09,400 --> 00:03:11,210
point zero one.

42
00:03:11,230 --> 00:03:18,150
So we now wherever we have velocity of 2.5, we're going to have 2.5 plus zero point zero one.

43
00:03:18,700 --> 00:03:24,550
So you can see here we had the velocity and we also perturb it down here because we have these velocity

44
00:03:24,550 --> 00:03:25,440
terms down here.

45
00:03:25,450 --> 00:03:27,500
This is we're also using the velocity here.

46
00:03:28,210 --> 00:03:33,190
So this time when we go through and do all these equations, we're going to get slightly different numbers

47
00:03:33,400 --> 00:03:35,700
for anything that's related to velocity.

48
00:03:35,740 --> 00:03:37,350
So I can see the top 10 here.

49
00:03:37,780 --> 00:03:43,090
We're going to get a slight change in velocity because now we return the WASSE and redone the calculations.

50
00:03:43,630 --> 00:03:46,360
The heading equation does not rely on velocity.

51
00:03:46,390 --> 00:03:47,850
So we're going to get the same value here.

52
00:03:48,550 --> 00:03:52,240
But Alex and Y positions do depend on velocity.

53
00:03:52,270 --> 00:03:55,560
So we're going to slightly different answers than we would have up here.

54
00:03:57,350 --> 00:04:03,110
So taking the values that we've just calculated, we can evaluate this term or the Jacobean, so we've

55
00:04:03,110 --> 00:04:11,900
calculated our Y at X one minus Y not so we can do this calculation so we can divide by Abbotabad amount

56
00:04:11,900 --> 00:04:15,980
outpoint zero one three one divided by outpoint zero one.

57
00:04:16,430 --> 00:04:22,160
We look at the differences between our Petare vector output and our non perturbed output.

58
00:04:22,380 --> 00:04:26,870
So the difference between the two states here and we end up with this difference vector.

59
00:04:30,320 --> 00:04:35,630
Now, this difference, Victor, actually makes up the first column of our Jacobean so we can take this

60
00:04:35,990 --> 00:04:38,360
factor here and put it into the first column.

61
00:04:38,360 --> 00:04:40,190
So that's this term here.

62
00:04:40,610 --> 00:04:44,210
So this is how we get the first column of the Giacobbe matrix.

63
00:04:46,190 --> 00:04:53,960
The next step, we can do the same thing now, but we can evaluate a why X two, so why X is just going

64
00:04:53,960 --> 00:04:54,800
to be the same thing.

65
00:04:54,800 --> 00:05:00,920
But this time the input for The X Factor is going to be X two, which means we're going to perturb the

66
00:05:00,920 --> 00:05:02,420
second element of X.

67
00:05:02,810 --> 00:05:08,630
So here where we have the heading way, the second element, the point seven zero seven, we're going

68
00:05:08,630 --> 00:05:13,910
to add on our Delta X of point zero one and redo the calculations.

69
00:05:14,330 --> 00:05:20,840
So wherever we have heading inside the equation, so wherever we have any value of heading, we want

70
00:05:20,840 --> 00:05:26,870
to take the original heading peterschmidt by a tiny bit same thing down here in here, and then calculate

71
00:05:26,870 --> 00:05:27,440
the result.

72
00:05:27,440 --> 00:05:31,650
And we're going to end up with these elements here inside the final vector for the upper.

73
00:05:31,910 --> 00:05:35,810
And you can see that any element that depends on heading is slightly different.

74
00:05:35,810 --> 00:05:37,370
So the numbers are going to be slightly different.

75
00:05:38,840 --> 00:05:43,790
Once we've calculated this, Victor, we can put it into this equation off the top here, and so we're

76
00:05:43,790 --> 00:05:45,770
calculating now the second column.

77
00:05:45,800 --> 00:05:50,270
So if we calculate the difference between the two vectors, we end up with this vector.

78
00:05:51,260 --> 00:05:58,130
And this factor is going to be the second column of the Caribbean so we can do the same thing, perturbing

79
00:05:58,130 --> 00:05:59,220
the third component.

80
00:05:59,240 --> 00:06:04,760
So now we're perturbing the exposition, putting it into our series of equations, recalculating it.

81
00:06:04,760 --> 00:06:07,790
And anything that depends on X is now going to be slightly different.

82
00:06:08,630 --> 00:06:14,480
We follow the same process of getting the difference of the vector, dividing it by our perturbed amount,

83
00:06:14,840 --> 00:06:20,970
and then that output becomes the wall, the third column inside the Matrix.

84
00:06:21,740 --> 00:06:25,190
And then lastly, we do the last step for our X4.

85
00:06:25,190 --> 00:06:26,710
So we perturb a lost state.

86
00:06:27,080 --> 00:06:31,810
So we perturbing the Y position by a small amount and redoing the calculations.

87
00:06:31,820 --> 00:06:34,280
And again, we get this set of equations here.

88
00:06:34,700 --> 00:06:38,030
Wherever we have y position, we want to perturb it.

89
00:06:38,210 --> 00:06:44,480
So down here we have our negative five plus a little perturbed amount and nothing else in this equation

90
00:06:44,480 --> 00:06:47,720
depends on Y, so that's the only element that's going to be perturbed.

91
00:06:48,080 --> 00:06:55,370
Redo the calculations, see what's changed, and then subtract it from the initial output to find out

92
00:06:55,640 --> 00:06:59,630
the final column in the Jacobean matrix as shown here.

93
00:07:00,530 --> 00:07:04,310
So this is how we go about building up the Giacobbe matrix step by step.

94
00:07:06,900 --> 00:07:11,620
So this is a numerical approximation of the analytical code, you cave in.

95
00:07:11,760 --> 00:07:17,660
So we've come up with this numerical approximation without Delta X to be point zero one.

96
00:07:17,940 --> 00:07:20,660
And these are the numerical values that we've just calculated.

97
00:07:20,970 --> 00:07:25,620
So we can say that this is a numerical approximation of the Jacobean matrix.

98
00:07:26,490 --> 00:07:32,100
We have also calculated the analytical solution in the past using differentiation, and we came up with

99
00:07:32,100 --> 00:07:33,880
this equation set here.

100
00:07:34,440 --> 00:07:40,620
So if we actually calculate the analytical solution by substituting in our parameters and states into

101
00:07:40,620 --> 00:07:46,710
this matrix here, our real solution for the analytical solution of the Jacobin is this matrix here.

102
00:07:47,280 --> 00:07:51,100
So if we compare the values here, we can see that they're very similar.

103
00:07:51,550 --> 00:07:55,170
They're only slightly difference in a few different decimal places.

104
00:07:56,860 --> 00:08:03,850
So how accurately we calculate the Jacoby Imageworks using the numerical approximation is going to depend

105
00:08:03,850 --> 00:08:06,940
on the size of our perturbed amount, the X.

106
00:08:08,650 --> 00:08:15,010
We want to ideally use a very small value of Deltour X, so in this case, if we redo the calculations

107
00:08:15,010 --> 00:08:20,980
but use a even smaller value of Delta X, you can find that the analytical solution is even closer to

108
00:08:20,980 --> 00:08:27,010
the numerical solution and is going to be pretty much exactly the same all the way down to the numerical

109
00:08:27,340 --> 00:08:29,170
precision of the computer.

110
00:08:31,810 --> 00:08:37,570
Now, unfortunately, we can't just put in the smallest number here that the computer can support because

111
00:08:37,750 --> 00:08:43,700
because of rounding errors inside the system, so we want to make sure we use a small enough donor X

112
00:08:43,720 --> 00:08:45,070
for the system we're using.

113
00:08:45,490 --> 00:08:49,870
If we use a large donor X, we're going to get a bad approximation of the Ukrainian.

114
00:08:50,230 --> 00:08:56,830
But anything around this order or smaller is usually a fairly good approximation of the Ukrainian matrix.
