Now, let's have a look at how the optics that works, so inside the carrier that you've just completed,
let's say we set the initial covariance of the position and the diversity.
So the standard deviation is both to zero.
This would mean that our state covariance matrix is all zeros initially.
We've also set the state to be all zero.
So assuming that we're starting at the Origin and we're starting with zero velocity.
So if we run this, we should be able to see that the estimate, the state does not actually change.
So our estimated position stays at the origin while the true motion of the object shoots off in this
direction.
And again, you can say this is reflected by the innovation measurement error.
So this innovation, you can see that it starts increasing.
So there's going to be more and more error in the system.
So there's a very simple reason for this, if this is because we've set the initial covariance to be
zero.
So we've told the field that we're 100 percent sure that the initial state of the system is zero zero
and has zero zero velocity.
So it's not going to be moving at all.
And no matter what information we tell, the field is not going to do anything about it.
So to handle this, if we set the initial velocity, uncertainty, standard deviation to be about 10.
So this is saying that we have some level of uncertainty of the initial state estimates for the velocity.
So when we do this and we can run the field again, you can say that the next step is actually doing
its job.
So you can see now as we run the Philidor the initial velocity uncertainty.
So you can see in this graph here, we start off with a large velocity uncertainty.
So every time we get an update step into the field, it will start to estimate what the new what the
actual velocity is.
The velocity should start converging to the true value.
So you can see here the error starts at some non-zero value and it converges down towards zero.
And you can see here the blue line here again is the true state velocity through state velocity and
the red one is the predicted velocity.
So you can see every time we get an update to the filter, the velocity tends towards the true state.
So our error decreases.
Our position starts off at zero covariance at zero zero.
This is because we've assumed we know perfect information about where the position of the object starts
and we assume that it has zero uncertainty in it.
So you can see here in the shape of the uncertainty graph, you can see that the the uncertainty starts
increasing.
This is because of our non-zero covariance for velocity.
And then every time we get the update, we shrink down our position.
And certainly this is because we actually feeling in the position measurements.
So we get this sawtooth pattern here.
So every time we have an update, our uncertainty in the estimates shrink.
So this is where we get the vertical lines.
And as we do the dead reckoning, as we only do the predictions, depths of uncertainty increases.
So that's the rise is there.
So if we were to change the timestep of the update to prediction, you should see a different response.
If we had a longer prediction time, there'll be a greater increase.
And then we get the update.
We'll get a sharper jump.
So we've changed the measurement, right?
So instead of having a measurement at one hertz, let's say we have a measurement every 10 seconds,
so instead of one a second, we get only one every 10 seconds and we run this again, we're going to
see a different response.
So now whether we've decreased the sample rate of the measurements, you can see that our covariance
now has a different pattern.
So I can variance now increasing, as we expected, between the measurements and then when we get the
measurement in the sharp decrease in the uncertainty, because as we know, the update step decreases
the uncertainty inside the system.
But you can see the system here is still working at a different rate.
We still have an initial error.
So Awasthi starts off at zero zero for the prediction.
But you can see as we get the measurements, it starts to converge towards the truth.
And again, you can see that our error converges towards the truth and our errors.
Anomaly inside our three sigma uncertainty bounds.
The shape of the reverend's 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're saying in the past from the predictions that 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 all matrix is going to control how accurate the measurement is that refuse into the system.
So the larger the matrix, the quicker the uncertainty grows between the updates, the smaller the 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 at 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 metrics 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 Matrix's as well as the update.
Right.
An interesting thing to see from the update 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.
So what does that saying is that our covariance P 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 field 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 error budget so we
can work out how good our sensors have to be to make the level performance we want.
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 relative sizes of
the ARE and key metrics are such that the estimated state covariance as we run the filter is adequate
enough for the solution that we want.
So if we set the initial uncertainty in position and velocity to be zero, when we run the example,
we can see that our common future does not change.
And again, this is this is because we've told it that it has perfect knowledge of the system and that
is that zero zero zero velocity.
So nothing we can tell it is going to make it to move.
And again, you can say the system is not working or not very tracking very quickly, because you can
say that the innovation here is increasing.
So the innovation is not zero mean as we expect it to be.
So this is a good sign.
The filter is not working.
So this means that a true state of the initial state is not inside out.
Uncertainty is not consistent.
So if we start increasing the process of noise in case so instead of actually increasing the initial
state, but we say that our uncertainty in the system is growing with time.
This because we have a non-zero key matrix.
When we run this filter, we now can see that our system is going to start to catch up, is actually
going to start tracking our object correctly so we can see what's happening here.
Initially in the system, we have zero uncertainty for every pore position and for velocity, but the
true state is actually outside our uncertainty.
So you can see our true state is down here as the uncertainty in the system in the coming forward grows
due to our acceleration uncertainty.
It then allows our system to start to get tried to catch up.
So every time we get an update, it tries to update it now.
So you can see initially the position error is growing with time.
This is because our system, the this is because the uncertainty in the system is too small.
So our field is not going to do anything with the updates.
But once it reaches a certain size, the filter then determines that is inconsistent.
A filter then starts acting on the information that is given and trying to bring the filter back into
alignment.
So you can see after a while after the uncertainty in the system has grown to a certain amount, the
velocity can change.
It starts to change and start to converge down to what the true state is.
So once the uncertainty grows, the point that it actually encapsulates the true uncertainty in the
system, it allows the system to come common filter to catch up to a true state.
This can also be seen in the measurement innovation, so initially we start off with the large innovations
and it starts growing to a point that the uncertainty in the system is large enough to actually allows
the for up to a step to start to correct for it.
And as it corrects for it, you can see that the innovation comes down and then we get to our zero main
condition.
And the variance of our innovation is consistent with the field of.