Throughout the next couple of videos where we develop the common filter, we're going to use a common
filter example to help explain the concepts.
For this, we're going to look at developing a 2D tracking filter.
The goal of a two day track, a filter, is to estimate the position and velocity of a moving object
based on remote measurements.
When we say remote measurements, we mean an uncooperative target or object.
So we don't have any intrinsic information about the object.
So there are no sensors on board.
We don't get any acceleration measurements or we have to go is just from remote measurements or external
measurements.
And these could be made by a radar that could be made by another sensor.
But all the sensing is done remotely.
Now, this type of filter has many different applications and crops up in many different areas, such
as radar aircraft tracking is done for optical tracking and self-driving cars, such as looking for
obstacles or pedestrians tracking them, trying to avoid them, object tracking in images.
So when we look at a series of images we're trying to track an object through, the image is used for
many surveillance and military applications.
It is used in robotics and is commonly used in GPS aided navigation and guidance.
The problem that we want to solve is looking at a tracking attorney object as it moves in a third plane.
So we have this to Pinay, we have the X and the Y axis.
We have an object that's moving at some velocity and we want to work out the position of the object
and the velocity of the object.
So this forms subprocess process model or the dynamics of the fuda, we also assume that we get position
measurements of the objects such as using from a radar or something or some other sensor source.
So we have these measurements here and each of these measurements provide a measurement of the position
of the object with time.
So this becomes the sense of moral.
Included in the course is a series of Python files now these files form a simulation, and one of the
simulations they form is for a 2D tracking filter.
So we'll be extending these files to develop a common filter for this problem.
So now let's have a quick look at the code that's included how to use it, how it's structured and how
we're going to use it in the examples coming up.
The Python simulation for the two day track and field includes a number of different files as shown
here.
So these are the main ones we're going to be using for the first exercise being the 2D tracking filter.
So if we have actually a look at the code and actually see what happened, we run it.
If we open up our assignment, one underscore answer, we can get a feel for what the final simulation
is going to look like once we complete all the exercises.
So switching over to your favorite python environment.
So let's have a look at an example of what happens when we run the code, so when we run the code,
first thing we notice is that a number of Grauwe plot up.
The first animation here is the animation or the filtering action while it's running.
The second plot here is going to be the innovation from the measurements, which we'll talk about later.
And we also have a figure that has the different states of the filter as well as the true state.
So we can look at the error between the true and the estimated states.
So this first figure here that had the animation, we have these black crosses and these represent the
different the different position measurements as they're happening.
We can see we have this blue dot.
The blue represents the true state of the object that we're tracking.
And he saw as time went on, the object moved this red dot.
Here is the estimated position from the common filter.
So ideally, this red dot should be tracking this blue dot.
And you can see in this example is tracking it for fairly well, this green bubble.
Around the red estimate is the covariance.
This is the uncertainty around the estimate.
So this shows you the uncertainty around the position estimates.
So as the field of runs the true state, the blue dot should be within this uncertainty ellipse here.
Our next figure is the innovations, so this is the difference between the actual measurements that
we get and our predictive measurements, which we'll talk about later on.
So these graphs here show the difference between the X and Y position measurements and the X and Y estimated
positions or the difference between the estimated measurements and the real measurements.
So you can see these blue lines here represent the innovations for each of the update steps inside the
computer.
While the green line here represents C one signal bounds of the covariance uncertainty for the innovations,
which we'll discuss later on.
The final figure that we want to have a look at is this one that has all the different states so you
can see these graphs on the left side here.
This is the exposition Y position X plus the Y velocity.
And again, the blue line represents the true state of the system.
So you can see in this case, we have a time across this city and this is the exposition.
And similarly, in the Y axis, this line here represents the objects y position with time.
Now, the black crosses represent the position measurements in the X and Y axes.
And the red line here is the actual output from the common field.
So their red line is the estimated position from the common theorem in the X and position in the Y.
Now down here we have the X and Y states for velocity so we can see that the true state is moving at
a constant velocity.
And this case, it was moving about one meter, the second and the X and it was moving on that zero
meters per second in the Y, the red line here is the estimate inversely from the Kalmykia.
So I can see as a common field of runs, it starts to converge down towards the true state.
Now, on the right hand side over here, we have the error.
So this is the position error.
This is, of course, the error.
And all the error is is just the difference between the true state from the simulation and the common
filter.
So ideally, we want the common field of error to be about zero, which means that the estimated states
are following the true states.
So the red line, the error from the common of the green line here is the uncertainty from the comments
around the error.
So this is our three sigma uncertainty from the covariance matrix p, which we'll discuss later on.
So when the filter is running correctly, we should see that the errors with inside are three sigma
bounds.
So this is a plus and minus three sigma to give you the upper and lower bounds on the error.
So you can say this is the error for the precision.
This is the error for our velocity.
So every time we run the simulation, we can get a different response, so we run it again, we're going
to start off with a different initial conditions for velocity and position.
And we can see as the field runs, our estimate state of the position should track the blue dot quite
nicely.
And again, if we look at these graphs here, you can see the estimated state, the red line tracks
the blue line very well and you can see that our velocity starts off as being zero.
So we don't know I've lost initially, but as we run and get our position measurements, the common
thread then can estimate the velocity and it comes and it estimates velocity and it converges towards
a tree.
So I can see we start off with a large initial error for Awasthi in the X and Y, but as the filter
runs, the velocity estimates converge down to the truth.
So they converge down to zero error.
And the same thing for the position as the field of runs, the uncertainty shrinks and our position
starts to converge towards the true position.
So the object so the position filter is tracking the object very nicely.
So in the exercises are going to be in this section, you're going to open up the corresponding file.
So the first one we're going to be doing is the assignment one prediction.
So if you open up the assignment, one prediction, you will see inside the script file that there'll
be a number of common that lines.
And these are the lines of code that you're going to have to go through and fill out the appropriate
answer for.
As we go through the exercises and as you go through the different exercises for the different steps,
you should end up with a simulation that works as well as one of your shiny previously.