‫So you have four slopes now, you have slope one slope to slope three and slope four, and now since
‫you have all those four slopes, the only thing that you need to do is to compute the weighted average
‫slope.
‫The weighted average slope, for example, P, dot, sub K and then W a meaning weighted average.
‫Equals one sixth.
‫Times and then in the parentheses, you have the first slope plus.
‫Two times the second slope plus.
‫Two times the third slope and plus your fourth slope, so that's how it looks.
‫That's the formula.
‫That's how you compute the weighted average slope.
‫And of course, the same formula applies to all the states, so you will have 12 equations like this.
‫For each state that you see here.
‫And so once you have your weighted average slope, then you just compute your new state like this piece
‫of cake plus one equals piece of cake plus and now it's the weighted average slope here times.
‫And then Tietz.
‫So this thing here, it's this this entire thing that you have here, that's your weighted average slope.
‫And not that this is still your original present state value and now this state value that you compute
‫using the weighted average slope, that's the state that will leave the plant.
‫That's the state that will go into the controller and into other places, just like I showed you in
‫the schematics, some videos ago.
‫And again, since you have 12 states, you will have 12 equations like this, all right, and that's
‫the fourth order wrong Akutan method, it is more advanced and it needs more work to implement it compared
‫to oilor, but it will give you more precise results.
‫And just to note, the code that I wrote for Randy Kutta follows exactly the same logic as explained
‫here.
‫And let's summarize this entire process like this, you have your present state expec.
‫You compute your first time derivative.
‫You use the first time derivative to compute the states at T plus twice over to using the first time
‫derivative.
‫Then you use these new state values to get your second time derivatives.
‫You use your second time derivatives to compute another new states at time T plus two over to.
‫You apply those new states to compute your third time derivatives, so I'm just going to continue this
‫schematics right over here.
‫All right.
‫And so you use your third slope's your third time derivatives to compute new state values, but at time
‫T plus test now and then you're going to use those state values to compute your fourth slope.
‫And so to compute your weighted average slope, we're going to add all the other slopes like this.
‫The first slope which had a weight, one over six.
‫The second slope.
‫Then had to wait to over six, the third slope, then had to wait to over six as well, and the fourth
‫slope then had to wait one over six, and then you get your weighted average slope.
‫And this weighted average slope will go into this equation then and then you compute your new state.
‫That leaves your plant.
‫So that's it.
‫That's your fourth order, wrong Akutan method, and in the next video, we're going to start dealing
‫with the propeller's because we still have one box to cover.
‫We need to figure out how we can convert the control inputs into rotor angular velocities.
‫So see you in the next video.
‫Thank you very much.