So now let's actually put some numbers behind it and look at a real world example so we can understand
what's going on.
So let's consider the vehicle process model that we've been using.
And that's basically our process model.
If we take in the previous state and current controls and calculate the new state for the current time
step.
So in the two day vehicle process model, we have our state vector being our velocity heading position
in the X and position and Y, our inputs to the same process model are going to be our accelerations.
And you're right, and these are the equations that we have been using.
So we're going to go through an example where we use this to calculate the Jacobean of this process
model here.
So first off is that we want to define the previous state that we want to linear the system about.
And we're going to use this state vector here so we can have a velocity equals 2.5 hour heading is going
to be our point seven or seven radians.
Our exposition is going to be 10.
A Y position is going to be negative five.
Now, for our current input, we're going to assume that we're linear, rising at around a acceleration
value of one point five and your rate of negative point to five.
We're also going to need to define a few parameters, we're going to define a date value of point one,
and when we're calculating the Jacoby numerically, we're going to be using a Delta X.
So this is the perturbed amount that we want to be to the X states.
It's going to be our point zero one and we're going to do the same value for our total amount for the
input 0.01.
So this state here becomes the initial condition that we want to lean your eyes for The X Factor, and
this input here is going to become our initial condition for the input that we want to see in your eyes
and system about as well.
So the first step in the process is to calculate the output for the militarization point, so that's
basically what we put in our external and, you know, values into the function to evaluate what it
would be in this condition here.
So when we do that numerically, we take these equations here, substitute in these values here, and
we end up with this series of equations here.
So basically, we're taking out like velocity two point five here.
Our data point one times our acceleration amount one point five.
And when we do the calculation, we're going to get our two point six five.
And when you do the same thing for a heading and the position and the X and position and the Y and we
end up with this Y, not vector.
Now we also want to do it for our X1.
So this is when we perturb the first element inside our vector and then we do the same process.
We put the we put the vector into our process model and evaluate the output.
So when we perturb the first state of velocity, we're going to be tabatabai out the X amount, our
point zero one.
So we now wherever we have velocity of 2.5, we're going to have 2.5 plus zero point zero one.
So you can see here we had the velocity and we also perturb it down here because we have these velocity
terms down here.
This is we're also using the velocity here.
So this time when we go through and do all these equations, we're going to get slightly different numbers
for anything that's related to velocity.
So I can see the top 10 here.
We're going to get a slight change in velocity because now we return the WASSE and redone the calculations.
The heading equation does not rely on velocity.
So we're going to get the same value here.
But Alex and Y positions do depend on velocity.
So we're going to slightly different answers than we would have up here.
So taking the values that we've just calculated, we can evaluate this term or the Jacobean, so we've
calculated our Y at X one minus Y not so we can do this calculation so we can divide by Abbotabad amount
outpoint zero one three one divided by outpoint zero one.
We look at the differences between our Petare vector output and our non perturbed output.
So the difference between the two states here and we end up with this difference vector.
Now, this difference, Victor, actually makes up the first column of our Jacobean so we can take this
factor here and put it into the first column.
So that's this term here.
So this is how we get the first column of the Giacobbe matrix.
The next step, we can do the same thing now, but we can evaluate a why X two, so why X is just going
to be the same thing.
But this time the input for The X Factor is going to be X two, which means we're going to perturb the
second element of X.
So here where we have the heading way, the second element, the point seven zero seven, we're going
to add on our Delta X of point zero one and redo the calculations.
So wherever we have heading inside the equation, so wherever we have any value of heading, we want
to take the original heading peterschmidt by a tiny bit same thing down here in here, and then calculate
the result.
And we're going to end up with these elements here inside the final vector for the upper.
And you can see that any element that depends on heading is slightly different.
So the numbers are going to be slightly different.
Once we've calculated this, Victor, we can put it into this equation off the top here, and so we're
calculating now the second column.
So if we calculate the difference between the two vectors, we end up with this vector.
And this factor is going to be the second column of the Caribbean so we can do the same thing, perturbing
the third component.
So now we're perturbing the exposition, putting it into our series of equations, recalculating it.
And anything that depends on X is now going to be slightly different.
We follow the same process of getting the difference of the vector, dividing it by our perturbed amount,
and then that output becomes the wall, the third column inside the Matrix.
And then lastly, we do the last step for our X4.
So we perturb a lost state.
So we perturbing the Y position by a small amount and redoing the calculations.
And again, we get this set of equations here.
Wherever we have y position, we want to perturb it.
So down here we have our negative five plus a little perturbed amount and nothing else in this equation
depends on Y, so that's the only element that's going to be perturbed.
Redo the calculations, see what's changed, and then subtract it from the initial output to find out
the final column in the Jacobean matrix as shown here.
So this is how we go about building up the Giacobbe matrix step by step.
So this is a numerical approximation of the analytical code, you cave in.
So we've come up with this numerical approximation without Delta X to be point zero one.
And these are the numerical values that we've just calculated.
So we can say that this is a numerical approximation of the Jacobean matrix.
We have also calculated the analytical solution in the past using differentiation, and we came up with
this equation set here.
So if we actually calculate the analytical solution by substituting in our parameters and states into
this matrix here, our real solution for the analytical solution of the Jacobin is this matrix here.
So if we compare the values here, we can see that they're very similar.
They're only slightly difference in a few different decimal places.
So how accurately we calculate the Jacoby Imageworks using the numerical approximation is going to depend
on the size of our perturbed amount, the X.
We want to ideally use a very small value of Deltour X, so in this case, if we redo the calculations
but use a even smaller value of Delta X, you can find that the analytical solution is even closer to
the numerical solution and is going to be pretty much exactly the same all the way down to the numerical
precision of the computer.
Now, unfortunately, we can't just put in the smallest number here that the computer can support because
because of rounding errors inside the system, so we want to make sure we use a small enough donor X
for the system we're using.
If we use a large donor X, we're going to get a bad approximation of the Ukrainian.
But anything around this order or smaller is usually a fairly good approximation of the Ukrainian matrix.