As part of the linnear coming Philidor update exercise that we have just completed, we should have
completed the GPS measurement update except for the I filled filter.
So it should look something like this.
So now in this video, we're going to go through a few concepts to explain what's happening and how
we can work out whether it's working and a few concepts about common filtering in general.
So the first exercise I want to do once we've completed the update step is to then set the initial state
of the come and fill it out to be all zero.
So zero for position, zero for velocity.
And we are also going to set the initial covariance for the initial state here to be zero.
So we're going to do this by setting the initial position and initial velocity, standard deviations
dizzier and we're going to run it with zero process model noise.
So when we run the simulation, we get a response that looks like this.
So I can see that the estimated state, the Red Cross, is staying back at the Origin.
The field of state is staying at zero and our error is increasing as the car is driving away.
So this is what we sort of are expecting to happen.
We've told the initial state to be zero, so it's staying at zero.
And we said the initial covariance is zero.
So the field, as far as the field is concerned, it has perfect information about the field of state,
therefore, is not going to be updated.
This is because there's no uncertainty inside the system for the GPS measurements to affect the system.
So now let's actually change the initial uncertainty in the system.
So now let's increase our key metrics.
So let's say we have an initial velocity and position, uncertainty of at, say, 10, 10.
So now let's rebuild this and run it.
And now we can see what's happening.
We can see that as the GPS measurements are made.
It is updating the state of the computer and the computer is now tracking the position of the vehicle.
So I can see now we have a small position, error and course the error as well.
And we can see the red dot and the uncertainty is tracking where the true state is.
So we can see that the true state, the green cross, is within the uncertainty bounds of the estimated
state.
The shape of the variance profile of time is pretty much controlled by two parameters.
It is controlled by the key matrix and the Matrix along with the update.
Right.
So we've seen in the past from the prediction step, the key matrix controls the rate of increase of
uncertainty inside the system.
It shows you how quickly the uncertainty is going to increase with time while the Matrix is going to
control how accurate the measurement is that we fuse into the system.
So the larger the key matrix, the quicker the uncertainty grows between the updates, the smaller the
R matrix is, the smaller is the updated covariance of the filter.
So if we have a large key metrics and a large matrix or update, right, we might get a covariance profile
that looks like this.
So you can see overall the uncertainty in the system is increasing, even though we're getting some
updates to it.
The update doesn't provide enough information to constrain the uncertainty inside the system.
So this is a bad example of what we want to be.
This filter is actually helping us all that much, because the longer we run the filter, the more uncertainty
in the system we're going to get.
So it's not going to be helping us to estimate anything.
The ideal case, what we want is when we have a small key matrix and a small R matrix or a fast update.
Right.
And we'll get the uncertainty inside the system looking like this where even though we increasing the
uncertainty during the predictions, whenever we get an update, it brings the uncertainty down a greater
amount than increased during the prediction step.
So over time, we can see that the uncertainty is going to be converging and it's going to converge
down to a steady state value.
And this steady state value is going to be based on the ratio of the Q and Matrixes, as well as the
update rate.
An interesting thing to see from the op ed equations here is that the final covariance P is a function
of our common game matrix K, which is a function of our covariance innovation, is now you can see
during these questions here, none of these actually has to do with the current state of the system,
the current state of the system X does not appear in any of these equations.
So basically what that is saying is that our covariance with time is independent of the current state.
The more updates we get, the smaller the P matrix is going to be in ideal conditions and since took
a variance with time does not depend on the current state X, it is possible to predict how accurate
outfielder estimates are going to be over the long term.
So if we run the field for long enough, our covariance is going to converge down to a constant non-zero
value and that value is going to be based on our Q and our matrix.
So if we know the amount of process, more noise in the filter and we know how good our measurements
are, we can work out overall how good our state estimates are going to be.
So we can use this information in the engineering design process and work out an area budget so we can
work out how good our sensors have to be to make the level performance we want to.
So depending on our application, we might find out that we don't need a really high quality sensor.
We might be able to get away with using a low quality sensor at lower cost.
If the ratio of the metrics to key metrics are such that the estimated state covariance as we run the
filter is adequate enough for the solution that we want.
So you can say even though the film starts off by jumping around, once the uncertainty inside the system
starts to converge, the uncertainty and the velocity uncertainty start to converge to the true value.
And we can say we're getting a lot less jumps.
So even though the GPS measurements might be all over the place, the common filler is doing what it
should be doing and filtering it down to come up with a best estimate of the position and velocity.
Therefore, we're going to get some smaller errors over here.
So rather than the estimates, jumping between all the GPS measurements is going to use the information
contained inside the process model and it's going to start to converge down towards.
The truth is obviously this won't work when we have a more dynamic situation.
So when the car turns by having zero process more noise, the field is going to become inconsistent
because the estimated position is not close to the true position.
So this is going to become trouble later on.
We're actually trying to use the output of the filter.
So in this case, let's set the acceleration standard deviation three point one, and let's rebuild
this and run it.
So let's run this profile three.
So now I can say that as the prediction happens, the uncertainty inside the system is inflating.
So the circle is getting larger.
You can see that when we turn the vehicle, the estimated state catches up with the true state a lot
quicker than it did when we had the zero process model uncertainty.
But we do see overall that there's lots of jumping around with the estimate.
This is because the amount of uncertainty in the system is growing quite rapidly.
That is going to try to rely on the GPS measurements more than the smooth prediction model.
And you can see on the corners it has still has a very large time to catch up.
So if we increase the acceleration process model in a more, so now we get a larger and certainly growth
with time.
You can say that on the corners it takes a short amount of time for it to catch up.
But we can say that the measurement, the but we can see that the common field and now the state estimates
follow the white GPS measurement a lot more because it's going to cost them a lot more because it's
got less uncertainty inside the prediction model.
So I can say that we get in this quite ragged path as we're doing our predictions.
So this is because it's jumping between measurement to measurement rather than using the prediction
model.
So this is a trade off.
We can get it to update very quickly to the measurements by having a lot of process model noise and
a small measurement model noise, but it counteracts having actually a nice, smooth estimate.
So if we ran this profile, one you can say now we are jumping all over the place from side to side
of the actual estimated position.
So even though the field is staying consistent, the true position, the Green Cross is within this
uncertainty circle.
You can say that our estimates are jumping all over the place and you can say we're getting some reasonably
large velocity and position errors.
So there's going to be a trade off if we want a nice, smooth response that trust the prediction model
more, we want a lower noise value for the acceleration.
However, if we want to let the car turn different directions and the process models to try to keep
up, we're going to need a larger acceleration, standard deviation to let the filter update quickly
for the new response.
This will mean that the estimates jump around a lot more, making them less suitable for some control
purposes.
Overall, this is a limitation of using a linear come and fill it up with the velocity characterized
in the x y velocity.
When we start looking at using the extended material for a nonlinear system, we can start estimating
the heading of the vehicle and then the velocity in that heading.
Then we can start to include gyroscope information to estimate how the vehicle heading changes so it
can more rapidly change and update with the changing conditions without artificially increasing the
acceleration, noise or uncertainty of the process model.