1
00:00:03,790 --> 00:00:08,890
In this video, we are going to look at some implementation notes, so we have covered the theory of

2
00:00:08,920 --> 00:00:13,270
the common filter, but there's a few little things that we should know when we come to implementing

3
00:00:13,270 --> 00:00:14,070
the common filter.

4
00:00:14,320 --> 00:00:17,750
It is not always as straightforward as the theory makes us believe.

5
00:00:18,100 --> 00:00:22,060
So we're going to cover a few things that we should consider when we're implementing the common filter

6
00:00:22,060 --> 00:00:23,830
in a real world applications.

7
00:00:24,890 --> 00:00:31,430
The equations used the covariance matrix after the update process assumes that the computational implementation

8
00:00:31,430 --> 00:00:33,680
has a perfect numerical accuracy.

9
00:00:34,520 --> 00:00:37,390
So computers do not have infinite precision or accuracy.

10
00:00:37,520 --> 00:00:42,830
They represent floating point numbers only to a certain level of number of significant figures.

11
00:00:43,160 --> 00:00:48,410
Numerical errors can cause a covariance matrix to lose its covariance matrix properties such as being

12
00:00:48,410 --> 00:00:51,280
symmetrical and positive, positive, semi definite.

13
00:00:52,250 --> 00:00:57,560
When this happens, it can cause the filter to fail or the calculations to crash because we're trying

14
00:00:57,560 --> 00:01:00,200
to do the inverse of a non-convertible matrix.

15
00:01:00,860 --> 00:01:02,690
So these issues become very critical.

16
00:01:02,690 --> 00:01:06,890
When we start running the common Philidor for a long period of time, these numerical inaccuracies can

17
00:01:06,890 --> 00:01:09,680
build up, which then can cause the filter to fail.

18
00:01:10,530 --> 00:01:13,630
So numerical inadequacies can cause stability issues.

19
00:01:14,420 --> 00:01:19,100
So the equations shown on the slide here is a covariance matrix update for the update step.

20
00:01:19,550 --> 00:01:22,370
So this is only one way that we can represent this equation.

21
00:01:23,120 --> 00:01:28,360
Another way is to use a Joseph stabilized version of the common Thawra update equation.

22
00:01:28,670 --> 00:01:32,540
So this version shown on Slide now is more stable and more robust.

23
00:01:32,900 --> 00:01:36,790
Yes, it does take more calculations, but it's less prone to numerical errors.

24
00:01:37,100 --> 00:01:42,080
So when we're implementing the common filter and we come into stability issues, one potential solution

25
00:01:42,080 --> 00:01:44,930
is to use this form of the covariance matrix update.

26
00:01:45,950 --> 00:01:50,550
Theoretically, the common filter is an attractive choice for estimation and data fusion.

27
00:01:50,990 --> 00:01:56,330
However, when the common filter is implemented in real systems, it may not always work, even though

28
00:01:56,330 --> 00:01:58,160
the theory and equations are correct.

29
00:01:58,580 --> 00:02:01,460
Now these issues can be caused by the finite position.

30
00:02:01,460 --> 00:02:06,980
So the computational limits which we've covered in the previous slide and modelling errors which come

31
00:02:06,980 --> 00:02:08,920
up from incorrect system modeling.

32
00:02:08,930 --> 00:02:14,080
So we have incorrect matrixes or or we make the wrong assumptions inside the process model such as we

33
00:02:14,090 --> 00:02:17,540
assuming the noise is Gaussian or it has some properties.

34
00:02:18,950 --> 00:02:25,820
So potential solutions to these problems, if we encounter them first, we might increase the computational

35
00:02:25,820 --> 00:02:26,330
precision.

36
00:02:26,330 --> 00:02:31,490
So instead of using 32 bit numbers, we might bump it up to using 64 bit numbers so we can represent

37
00:02:31,730 --> 00:02:35,510
more significant figures or more decimal places inside the calculations.

38
00:02:36,720 --> 00:02:41,730
We also might use a form of square root, common filtering, so we didn't cover this in this course,

39
00:02:42,030 --> 00:02:47,450
but basically we break down the covariance matrix into a multiplication of two matrices.

40
00:02:48,270 --> 00:02:53,260
And when we're using this square root, common filtering form, it means the calculations are more stable.

41
00:02:54,900 --> 00:02:59,460
We can also force the covariance matrix to be symmetrical after each update step.

42
00:02:59,700 --> 00:03:03,690
There's a few different ways of doing this, but if we force it to be symmetrical after each step,

43
00:03:03,810 --> 00:03:07,170
there's a greater chance the filter will stay stable for longer.

44
00:03:08,250 --> 00:03:13,860
We also want to initialize the covariance matrix as best as possible to stop large jumps in the matrix

45
00:03:13,860 --> 00:03:14,880
during operations.

46
00:03:15,240 --> 00:03:20,910
So when we initialize a matrix, ideally we don't want to initialize if very large numbers sort of telling

47
00:03:20,910 --> 00:03:22,400
the filter that we're really uncertain.

48
00:03:22,650 --> 00:03:26,420
We want to set the uncertainty to be the correct level of uncertainty.

49
00:03:26,430 --> 00:03:28,590
So we should have a reasonable estimate.

50
00:03:28,620 --> 00:03:29,550
Well, that should be.

51
00:03:31,740 --> 00:03:38,550
We can also use a form of a fading memory filter, so as the common thread runs, the covariance matrix

52
00:03:38,550 --> 00:03:40,240
captures all these correlations.

53
00:03:40,240 --> 00:03:46,110
For all the past historical measurements and properties of the system, we can use a form of fading

54
00:03:46,110 --> 00:03:49,370
memory which causes the filter to forget some of the past information.

55
00:03:49,770 --> 00:03:51,060
So this can help for issues.

56
00:03:51,060 --> 00:03:57,930
When we have incorrect modelling, it can start to forget what it's done in the past to help it update

57
00:03:57,930 --> 00:03:58,670
in the future.

58
00:04:00,270 --> 00:04:04,950
And we've also already covered this one, we can also increase the price, this model, Nonoy, so increasing

59
00:04:04,950 --> 00:04:09,420
the size of the values inside the key metrics to account for any modelling errors.

60
00:04:11,410 --> 00:04:16,330
So these are some of the strategies you can use if you start to run in problems when you're implementing

61
00:04:16,330 --> 00:04:19,680
the common filter in real life to solve real world problems.

