1
00:00:03,900 --> 00:00:08,700
So in the previous video, we showed you the equations that you have to use for the answer to come a

2
00:00:08,700 --> 00:00:14,240
field update step, however, we want to go into a bit more detail about how we actually get those equations.

3
00:00:15,000 --> 00:00:18,960
So we have seen that the state vector and coverage metrics are updated.

4
00:00:18,960 --> 00:00:25,320
Using these following equations, we calculate a common gain based on this cross covariance term.

5
00:00:25,320 --> 00:00:30,960
Here we use the predictor corrective form to update the current estimates based on how much error we

6
00:00:30,960 --> 00:00:32,100
have in the current system.

7
00:00:32,280 --> 00:00:37,230
And then we can update the uncertainty inside the system that using this equation here.

8
00:00:38,280 --> 00:00:41,560
So the question becomes, where do these equations actually come from?

9
00:00:41,580 --> 00:00:43,890
So this is what we're going to cover inside this video.

10
00:00:45,680 --> 00:00:51,410
So we can start off by expanding the estimated error equation with the innovation correction step.

11
00:00:51,890 --> 00:00:54,030
So this is the estimation error.

12
00:00:54,050 --> 00:00:58,640
So this is how much error there is between the true state of the system and our predicted state of the

13
00:00:58,640 --> 00:00:59,070
system.

14
00:00:59,720 --> 00:01:05,690
So this time here can be broken down into the state estimates before the update as shown here.

15
00:01:06,380 --> 00:01:12,380
Now we can regroup these two terms over here so these two terms can get regrouped to form this equation

16
00:01:12,380 --> 00:01:12,650
here.

17
00:01:13,040 --> 00:01:18,860
And then you should be pretty easy to notice that this is just the estimation error so they can simplify

18
00:01:18,860 --> 00:01:21,340
this down into our exterior.

19
00:01:21,770 --> 00:01:25,640
But this is before we apply the update so I can say this is after the update.

20
00:01:25,650 --> 00:01:27,850
This is how much error we have once we do the correction step.

21
00:01:28,160 --> 00:01:30,750
This is how much error we have before the correction step.

22
00:01:31,280 --> 00:01:34,010
So we basically end up with this recursive relationship here.

23
00:01:35,630 --> 00:01:42,590
Continuing on from that, we can use the definition of the posterior error covariance matrix, so that's

24
00:01:42,590 --> 00:01:43,800
this equation shown here.

25
00:01:43,820 --> 00:01:46,100
So this is the error covariance matrix.

26
00:01:46,100 --> 00:01:52,280
So this is the estimation error squared up for all the measurements up to timestep, including times

27
00:01:52,280 --> 00:01:52,390
up.

28
00:01:52,390 --> 00:02:00,080
Okay, so substituting in our recursive equation that we had on the previous slide, we can form this

29
00:02:00,080 --> 00:02:01,100
equation here.

30
00:02:01,130 --> 00:02:08,390
So we substitute in for Alex Tilde and then we expanded out and we can form this long equation here

31
00:02:08,390 --> 00:02:12,260
with the expectation of right now investigating this equation.

32
00:02:12,260 --> 00:02:15,380
You should be able to see that the few things that we can simplify.

33
00:02:15,890 --> 00:02:21,110
The first thing is that this term over here, this is just equal to the covariance matrix before we

34
00:02:21,110 --> 00:02:21,770
do the update.

35
00:02:21,770 --> 00:02:23,810
So the apriority covariance matrix.

36
00:02:25,360 --> 00:02:28,630
This expectation of right down here is also very common.

37
00:02:28,720 --> 00:02:32,320
This is the innovation conference, so we can just replace this by S..

38
00:02:32,830 --> 00:02:37,630
So once we substitute in these two values here, we end up with this equation here.

39
00:02:37,870 --> 00:02:44,200
So now this is a recursive equation that links the covariance before the update to the covariance,

40
00:02:44,200 --> 00:02:45,100
after the update.

41
00:02:45,280 --> 00:02:48,730
And it's only a function of these key metrics here.

42
00:02:50,110 --> 00:02:52,660
Now, the common filter is a optimal filter.

43
00:02:52,720 --> 00:02:59,230
So we want to find the solution for K that minimizes the trace of the updated covariance matrix.

44
00:02:59,560 --> 00:03:04,540
Then this will give us the optimum solution, which minimizes the conditional mean squared error.

45
00:03:04,630 --> 00:03:07,840
So this is the original problem of the common filter.

46
00:03:08,560 --> 00:03:10,590
And to do this is fairly straightforward.

47
00:03:10,930 --> 00:03:13,960
We want to minimize the trace of this covariance matrix.

48
00:03:14,080 --> 00:03:19,580
We define the trace of the covariance matrix to be this intermediate value L..

49
00:03:20,200 --> 00:03:26,770
And then we want to minimize the value l and to do that, we take the derivative of L with respect to

50
00:03:26,770 --> 00:03:29,800
our common game and we want to set it to zero.

51
00:03:29,950 --> 00:03:31,420
So this is what this is doing here.

52
00:03:31,420 --> 00:03:36,760
Derivative of L with respect to the come again we end up with this is the derivative here.

53
00:03:37,240 --> 00:03:41,120
We want to set it to zero because we want to find the point that minimizes solution.

54
00:03:41,140 --> 00:03:43,150
So it's going to be the minimum minimum point.

55
00:03:43,960 --> 00:03:49,480
And then once we have this equation, here is a fairly simple operation just to rearrange it to find

56
00:03:49,480 --> 00:03:49,900
K.

57
00:03:49,900 --> 00:03:52,430
So that's what this equation here gives us.

58
00:03:53,200 --> 00:03:59,860
So the common game matrix for the uncynical to filter is just the covariance matrix for the cross covariance

59
00:03:59,860 --> 00:04:04,000
between the state and the measurement multiplied by the inverse of the measurement.

60
00:04:04,000 --> 00:04:05,080
Uncertainty is.

61
00:04:07,680 --> 00:04:13,260
So now that we've calculate the common gain, we can use that to update the main for the U.S. economy

62
00:04:13,300 --> 00:04:13,670
filter.

63
00:04:14,160 --> 00:04:18,490
So the solution for the update step is simply the predictive corrective arm.

64
00:04:18,510 --> 00:04:20,510
So we have the measurement innovation here.

65
00:04:20,640 --> 00:04:25,890
We multiply it by the common gain to work out how much we need to update the current state by to get

66
00:04:25,890 --> 00:04:28,510
a better estimate using this current information.

67
00:04:29,250 --> 00:04:32,710
So this equation here is exactly the same as all the other common filters.

68
00:04:33,240 --> 00:04:37,850
However, right now, to calculate the common gain, we're going to use this modified equation here.

69
00:04:38,220 --> 00:04:43,620
So to work out the common gain, we're going to have to calculate this across covariance time as part

70
00:04:43,620 --> 00:04:45,900
of the unscented filter update step.

71
00:04:48,190 --> 00:04:53,950
Now to finalize the update, we want to look at how we can update the covariance, as we've already

72
00:04:53,950 --> 00:04:59,360
seen, that the solution for the covariance update is sharing in this recursive relationship here.

73
00:04:59,380 --> 00:05:01,840
So this is what we use to calculate the common gain.

74
00:05:02,380 --> 00:05:06,960
However, now that we know what the common gain is, we can back into this relationship.

75
00:05:07,570 --> 00:05:12,830
And then this gives us this equation here is basically a simplification.

76
00:05:12,850 --> 00:05:20,440
So now we have the covariance matrix before the update, minus K times as times K transpose.

77
00:05:20,470 --> 00:05:25,900
So this is how much we've minimized the uncertainty inside the system by using in the measurement and

78
00:05:25,900 --> 00:05:29,730
then doing this operation here will give us the updated covariance matrix.

79
00:05:30,040 --> 00:05:34,510
And of course, this updated matrix here is going to be smaller than this matrix here because we've

80
00:05:34,510 --> 00:05:36,690
reduced the uncertainty inside the system.

81
00:05:38,380 --> 00:05:44,500
So the derivation of the uncertainty coming up next, it should be fairly straightforward, is very

82
00:05:44,500 --> 00:05:49,320
similar to the steps we use for the linnear and extending common fields.

83
00:05:49,630 --> 00:05:54,520
However, we have to make a few approximations at a higher level, so we end up with a few more general

84
00:05:54,520 --> 00:05:55,210
equations.

85
00:05:55,720 --> 00:06:02,390
Sorry, the common thought estate update equation is just shown here and the common field covariance

86
00:06:02,410 --> 00:06:04,430
update equation is just shown here.

87
00:06:05,320 --> 00:06:10,990
So these equations are very straightforward compared to the extent the computer is just about how we

88
00:06:10,990 --> 00:06:16,270
go about calculating these terms here and we're going to be using the unscented transform to do that.
