In this video, we're going to cover the second exercise for the Linnear coming here, and that is to
implement the update step for the filter and to do this.
We're going to implement an update step for a GPS like measurement into our simulation environment.
So we're going to begin the video by covering a simple GPS measurement model, so the measurement model
is going to be a linear model.
We're going to assume a form as shown here.
So we're going to have a model matrix much the state vector X, and we're going to assume some additive
random noise into the system.
So the measurement model for the GPS is just going to be a very simple model.
All we're going to do is we're going to assume that the matrix, the measurement matrix up here is just
a simple selection matrix that simply selects out the current state that we're interested in.
So this matrix here just flicks out the position in the X and the position in the Y states from the
state vector.
So our measurement vector is going to be an API.
So we're going to assume that the sensor just gives us these two measurements, which is drek copies
of the state over here.
And then looking at noise the system, we're going to assume that the additive noise here this week
is just going to be from a normal distribution with zero main and known covariance R and the covariance
matrix R is just going to be a diagonal matrix with a standard deviation for the exposition and a standard
deviation for the Y position measurements.
And in our simple case, we're just going to assume that they have equal uncertainty on each of these.
So we are going to replace it by Sigma GPS.
So this is the simple measurement model that we're going to be implementing inside this exercise for
the linear algebra.
So now let's go over the actual exercise itself.
So in this exercise, we want to implement the common for the upper equations and the GPS measurement
model, which we just covered on the previous slide.
The first step is to open up your last column for the fall from the previous exercise where we did the
prediction step.
The next step is to set up the Hajj and our matrixes.
So we see the matrix here.
So this is a sense of measurement matrix and the matrix, which is the uncertainty inside the GPS measurement.
We're going to assume that the position measurement, uncertainty is this GPS positions, derivation.
So this is a constant.
And what we're going to do is just use this value here inside these matrix terms here.
So this is how we're going to form the matrix.
So we're going to do all this inside the handle GPS measurement function.
So in between these two lines of code here, we want to set up the matrix and we want to set up The
Matrix.
The next step is that we want to implement the common thought update equation, so we're seeing these
sort of equations.
Here is the linear common step study of using the measurement model to calculate the innovation.
So the difference between the GPS measurement, which is this GPS measurement up here and the measurement
model for the GPS say this is the measurement model and then the current vector.
This here is the equation for the measurement innovation.
This is the metrics that we have defined for the GPS sensor measurement.
We use that inside to calculate the common again.
Then we use a common gain down in these two equations here to update the state estimates and to update
the covariance estimates.
Once we have implemented these equations, we can then run the simulation with the following configurations.
So the first off, we want to set the initial state and covariance to be zero along with the process
model noise, we should see that the common filter estimate does not change or is not updated at all.
This is because we're saying that we trust the initial state completely and we are ignoring any measurements.
Eyes only means that we have no uncertainty in the system.
So if we set the initial state and covariance to be zero, then we are saying that there is no uncertainty
inside the system.
Therefore, any measurement we get is just going to be in order.
So if this happens, then the field is working correctly for this test.
Next, we want to change the initial velocity, standard deviation to be about 10, and we want to rerun
the simulation and actually see the response.
So now when we do that, we should be able to see the common filter is updating the state estimates
with precision as we now have an increasing uncertainty inside the system and the GPS measurements are
using are using themselves to constrain the uncertainty in the system.
So once we see that is working correctly, then we want to test out using different values of the initial
position, the initial Vosta uncertainties, and then the noise, uncertainty for the acceleration.
And we want to do this when we run in the different profiles so we can try to run profiles one, two,
three and four and actually see how these changing how changing these different parameters affect the
uncertainty of the system and affect the overall estimation performance.
So once we've done that and played around with the different tunings, we can have a bit more of a feeling
of how the common Filaret is using this information to update the state estimates.
And we have a bit more understanding of how the uncertainties inside the system affect the estimation
performance of the system.