1
00:00:03,560 --> 00:00:08,930
Now, let's have a look at how the optics that works, so inside the carrier that you've just completed,

2
00:00:09,530 --> 00:00:13,590
let's say we set the initial covariance of the position and the diversity.

3
00:00:13,610 --> 00:00:15,660
So the standard deviation is both to zero.

4
00:00:16,310 --> 00:00:20,030
This would mean that our state covariance matrix is all zeros initially.

5
00:00:20,450 --> 00:00:22,580
We've also set the state to be all zero.

6
00:00:22,630 --> 00:00:26,910
So assuming that we're starting at the Origin and we're starting with zero velocity.

7
00:00:27,620 --> 00:00:33,140
So if we run this, we should be able to see that the estimate, the state does not actually change.

8
00:00:33,140 --> 00:00:38,960
So our estimated position stays at the origin while the true motion of the object shoots off in this

9
00:00:38,960 --> 00:00:39,500
direction.

10
00:00:39,980 --> 00:00:44,300
And again, you can say this is reflected by the innovation measurement error.

11
00:00:44,720 --> 00:00:48,780
So this innovation, you can see that it starts increasing.

12
00:00:49,070 --> 00:00:51,390
So there's going to be more and more error in the system.

13
00:00:52,970 --> 00:00:57,530
So there's a very simple reason for this, if this is because we've set the initial covariance to be

14
00:00:57,530 --> 00:00:58,000
zero.

15
00:00:58,250 --> 00:01:04,220
So we've told the field that we're 100 percent sure that the initial state of the system is zero zero

16
00:01:04,520 --> 00:01:06,310
and has zero zero velocity.

17
00:01:06,320 --> 00:01:08,030
So it's not going to be moving at all.

18
00:01:08,030 --> 00:01:12,130
And no matter what information we tell, the field is not going to do anything about it.

19
00:01:13,280 --> 00:01:19,100
So to handle this, if we set the initial velocity, uncertainty, standard deviation to be about 10.

20
00:01:19,460 --> 00:01:25,080
So this is saying that we have some level of uncertainty of the initial state estimates for the velocity.

21
00:01:26,000 --> 00:01:31,640
So when we do this and we can run the field again, you can say that the next step is actually doing

22
00:01:31,850 --> 00:01:32,470
its job.

23
00:01:33,050 --> 00:01:38,050
So you can see now as we run the Philidor the initial velocity uncertainty.

24
00:01:38,090 --> 00:01:42,160
So you can see in this graph here, we start off with a large velocity uncertainty.

25
00:01:42,500 --> 00:01:48,260
So every time we get an update step into the field, it will start to estimate what the new what the

26
00:01:48,260 --> 00:01:49,490
actual velocity is.

27
00:01:50,030 --> 00:01:53,000
The velocity should start converging to the true value.

28
00:01:53,550 --> 00:01:58,980
So you can see here the error starts at some non-zero value and it converges down towards zero.

29
00:01:59,000 --> 00:02:05,180
And you can see here the blue line here again is the true state velocity through state velocity and

30
00:02:05,180 --> 00:02:06,830
the red one is the predicted velocity.

31
00:02:07,460 --> 00:02:13,560
So you can see every time we get an update to the filter, the velocity tends towards the true state.

32
00:02:13,580 --> 00:02:15,110
So our error decreases.

33
00:02:16,340 --> 00:02:20,210
Our position starts off at zero covariance at zero zero.

34
00:02:20,240 --> 00:02:25,490
This is because we've assumed we know perfect information about where the position of the object starts

35
00:02:25,970 --> 00:02:29,100
and we assume that it has zero uncertainty in it.

36
00:02:29,630 --> 00:02:34,430
So you can see here in the shape of the uncertainty graph, you can see that the the uncertainty starts

37
00:02:34,430 --> 00:02:35,060
increasing.

38
00:02:35,390 --> 00:02:38,740
This is because of our non-zero covariance for velocity.

39
00:02:39,260 --> 00:02:42,890
And then every time we get the update, we shrink down our position.

40
00:02:42,900 --> 00:02:46,690
And certainly this is because we actually feeling in the position measurements.

41
00:02:47,180 --> 00:02:49,300
So we get this sawtooth pattern here.

42
00:02:49,640 --> 00:02:54,000
So every time we have an update, our uncertainty in the estimates shrink.

43
00:02:54,320 --> 00:02:56,060
So this is where we get the vertical lines.

44
00:02:56,330 --> 00:03:02,280
And as we do the dead reckoning, as we only do the predictions, depths of uncertainty increases.

45
00:03:02,300 --> 00:03:03,650
So that's the rise is there.

46
00:03:04,340 --> 00:03:09,820
So if we were to change the timestep of the update to prediction, you should see a different response.

47
00:03:10,130 --> 00:03:13,940
If we had a longer prediction time, there'll be a greater increase.

48
00:03:13,940 --> 00:03:15,110
And then we get the update.

49
00:03:15,290 --> 00:03:16,370
We'll get a sharper jump.

50
00:03:17,800 --> 00:03:19,400
So we've changed the measurement, right?

51
00:03:19,420 --> 00:03:26,100
So instead of having a measurement at one hertz, let's say we have a measurement every 10 seconds,

52
00:03:26,110 --> 00:03:33,190
so instead of one a second, we get only one every 10 seconds and we run this again, we're going to

53
00:03:33,190 --> 00:03:34,360
see a different response.

54
00:03:35,320 --> 00:03:40,030
So now whether we've decreased the sample rate of the measurements, you can see that our covariance

55
00:03:40,030 --> 00:03:41,580
now has a different pattern.

56
00:03:42,220 --> 00:03:47,500
So I can variance now increasing, as we expected, between the measurements and then when we get the

57
00:03:47,500 --> 00:03:53,530
measurement in the sharp decrease in the uncertainty, because as we know, the update step decreases

58
00:03:53,530 --> 00:03:55,200
the uncertainty inside the system.

59
00:03:56,860 --> 00:03:59,740
But you can see the system here is still working at a different rate.

60
00:04:00,460 --> 00:04:02,140
We still have an initial error.

61
00:04:02,440 --> 00:04:05,670
So Awasthi starts off at zero zero for the prediction.

62
00:04:05,980 --> 00:04:10,170
But you can see as we get the measurements, it starts to converge towards the truth.

63
00:04:10,180 --> 00:04:14,440
And again, you can see that our error converges towards the truth and our errors.

64
00:04:14,690 --> 00:04:17,980
Anomaly inside our three sigma uncertainty bounds.

65
00:04:19,460 --> 00:04:24,530
The shape of the reverend's profile of time is pretty much controlled by two parameters, it is controlled

66
00:04:24,530 --> 00:04:28,910
by the key matrix and the Matrix along with the update, right.

67
00:04:30,440 --> 00:04:35,330
So we're saying in the past from the predictions that the key matrix controls the rate of increase of

68
00:04:35,330 --> 00:04:40,600
uncertainty inside the system, it shows you how quickly the uncertainty is going to increase with time

69
00:04:41,030 --> 00:04:46,850
while the all matrix is going to control how accurate the measurement is that refuse into the system.

70
00:04:47,660 --> 00:04:53,660
So the larger the matrix, the quicker the uncertainty grows between the updates, the smaller the matrix

71
00:04:53,660 --> 00:04:56,480
is, the smaller is the updated covariance of the filter.

72
00:04:57,810 --> 00:05:04,110
So if we have a large key metrics and a large matrix or update, right, we might get a covariance profile

73
00:05:04,110 --> 00:05:04,910
that looks at this.

74
00:05:04,920 --> 00:05:10,200
So you can see overall the uncertainty in the system is increasing, even though we're getting some

75
00:05:10,200 --> 00:05:10,920
updates to it.

76
00:05:11,110 --> 00:05:15,330
The update doesn't provide enough information to constrain the uncertainty inside the system.

77
00:05:15,870 --> 00:05:18,690
So this is a bad example of what we want to be.

78
00:05:19,050 --> 00:05:24,090
This filter is actually helping us all that much, because the longer we run the filter, the more uncertainty

79
00:05:24,090 --> 00:05:25,120
in the system we're going to get.

80
00:05:25,140 --> 00:05:27,600
So it's not going to be helping us to estimate anything.

81
00:05:28,170 --> 00:05:33,540
The ideal case, what we want is when we have a small key metrics and a small R matrix or a fast update.

82
00:05:33,540 --> 00:05:33,840
Right.

83
00:05:34,080 --> 00:05:38,850
And we'll get the uncertainty inside the system looking like this where even though we increasing the

84
00:05:38,850 --> 00:05:44,280
uncertainty during the predictions, whenever we get an update, it brings the uncertainty down a greater

85
00:05:44,280 --> 00:05:46,470
amount than increased during the prediction step.

86
00:05:46,860 --> 00:05:52,140
So over time, we can see that the uncertainty is going to be converging and it's going to converge

87
00:05:52,140 --> 00:05:54,960
down to a steady state value.

88
00:05:55,260 --> 00:06:01,080
And this steady state value is going to be based on the ratio of the Q and Matrix's as well as the update.

89
00:06:01,080 --> 00:06:01,350
Right.

90
00:06:02,970 --> 00:06:08,100
An interesting thing to see from the update equations here is that the final covariance P is a function

91
00:06:08,100 --> 00:06:15,090
of our common game matrix K, which is a function of our covariance innovation is now you can see during

92
00:06:15,090 --> 00:06:19,860
these questions here, none of these actually has to do with the current state of the system, the current

93
00:06:19,860 --> 00:06:22,830
state of the system X does not appear in any of these equations.

94
00:06:23,430 --> 00:06:29,170
So basically what that is saying is that our covariance with time is independent of the current state.

95
00:06:29,970 --> 00:06:34,970
So what does that saying is that our covariance P with time is independent of the current state.

96
00:06:35,550 --> 00:06:41,490
The more updates we get, the smaller the P Matrix is going to be in ideal conditions and since took

97
00:06:41,490 --> 00:06:47,100
a variance with time does not depend on the current state x, it is possible to predict how accurate

98
00:06:47,100 --> 00:06:49,620
outfielder estimates are going to be over the long term.

99
00:06:49,900 --> 00:06:55,800
So if we run the field for long enough, our covariance is going to converge down to a constant non-zero

100
00:06:55,800 --> 00:06:59,040
value and that value is going to be based on our Q and our matrix.

101
00:07:00,620 --> 00:07:05,390
So if we know the amount of process, more noise in the field and we know how good our measurements

102
00:07:05,390 --> 00:07:09,800
are, we can work out overall how good our state estimates are going to be.

103
00:07:10,200 --> 00:07:15,260
So we can use this information in the engineering design process and work out an error budget so we

104
00:07:15,260 --> 00:07:18,660
can work out how good our sensors have to be to make the level performance we want.

105
00:07:19,190 --> 00:07:23,380
So depending on our application, we might find out that we don't need a really high quality sensor.

106
00:07:23,390 --> 00:07:29,150
We might be able to get away with using a low quality sensor at lower cost if the relative sizes of

107
00:07:29,150 --> 00:07:35,060
the ARE and key metrics are such that the estimated state covariance as we run the filter is adequate

108
00:07:35,060 --> 00:07:36,770
enough for the solution that we want.

109
00:07:38,510 --> 00:07:45,530
So if we set the initial uncertainty in position and velocity to be zero, when we run the example,

110
00:07:45,530 --> 00:07:48,180
we can see that our common future does not change.

111
00:07:48,200 --> 00:07:52,760
And again, this is this is because we've told it that it has perfect knowledge of the system and that

112
00:07:52,760 --> 00:07:54,640
is that zero zero zero velocity.

113
00:07:54,650 --> 00:07:56,820
So nothing we can tell it is going to make it to move.

114
00:07:57,380 --> 00:08:01,670
And again, you can say the system is not working or not very tracking very quickly, because you can

115
00:08:01,670 --> 00:08:04,360
say that the innovation here is increasing.

116
00:08:04,670 --> 00:08:08,060
So the innovation is not zero mean as we expect it to be.

117
00:08:08,690 --> 00:08:10,130
So this is a good sign.

118
00:08:10,190 --> 00:08:11,300
The filter is not working.

119
00:08:13,310 --> 00:08:17,300
So this means that a true state of the initial state is not inside out.

120
00:08:17,310 --> 00:08:19,640
Uncertainty is not consistent.

121
00:08:20,180 --> 00:08:25,880
So if we start increasing the process of noise in case so instead of actually increasing the initial

122
00:08:25,880 --> 00:08:30,620
state, but we say that our uncertainty in the system is growing with time.

123
00:08:30,620 --> 00:08:32,930
This because we have a non-zero key matrix.

124
00:08:34,010 --> 00:08:39,890
When we run this filter, we now can see that our system is going to start to catch up, is actually

125
00:08:39,890 --> 00:08:43,580
going to start tracking our object correctly so we can see what's happening here.

126
00:08:44,000 --> 00:08:50,420
Initially in the system, we have zero uncertainty for every pore position and for velocity, but the

127
00:08:50,420 --> 00:08:52,970
true state is actually outside our uncertainty.

128
00:08:52,970 --> 00:08:59,750
So you can see our true state is down here as the uncertainty in the system in the coming forward grows

129
00:08:59,750 --> 00:09:01,700
due to our acceleration uncertainty.

130
00:09:02,000 --> 00:09:05,180
It then allows our system to start to get tried to catch up.

131
00:09:05,600 --> 00:09:08,360
So every time we get an update, it tries to update it now.

132
00:09:08,810 --> 00:09:12,380
So you can see initially the position error is growing with time.

133
00:09:13,040 --> 00:09:17,960
This is because our system, the this is because the uncertainty in the system is too small.

134
00:09:17,990 --> 00:09:20,140
So our field is not going to do anything with the updates.

135
00:09:20,690 --> 00:09:25,190
But once it reaches a certain size, the filter then determines that is inconsistent.

136
00:09:25,370 --> 00:09:30,770
A filter then starts acting on the information that is given and trying to bring the filter back into

137
00:09:30,770 --> 00:09:31,240
alignment.

138
00:09:31,250 --> 00:09:36,860
So you can see after a while after the uncertainty in the system has grown to a certain amount, the

139
00:09:36,860 --> 00:09:38,000
velocity can change.

140
00:09:38,000 --> 00:09:42,500
It starts to change and start to converge down to what the true state is.

141
00:09:43,730 --> 00:09:48,290
So once the uncertainty grows, the point that it actually encapsulates the true uncertainty in the

142
00:09:48,290 --> 00:09:52,550
system, it allows the system to come common filter to catch up to a true state.

143
00:09:54,870 --> 00:09:59,790
This can also be seen in the measurement innovation, so initially we start off with the large innovations

144
00:10:00,180 --> 00:10:05,720
and it starts growing to a point that the uncertainty in the system is large enough to actually allows

145
00:10:05,730 --> 00:10:08,450
the for up to a step to start to correct for it.

146
00:10:08,460 --> 00:10:14,460
And as it corrects for it, you can see that the innovation comes down and then we get to our zero main

147
00:10:14,460 --> 00:10:15,060
condition.

148
00:10:15,270 --> 00:10:19,620
And the variance of our innovation is consistent with the field of.

