‫Welcome back.
‫So we had our non-linear states based equations.
‫These ones here, and we managed to put them in this form.
‫Now this state's basic wagin form here was created for linear systems.
‫It makes sense, right?
‫You have matrices here and then you also have vectors here like this and vectors and matrices.
‫They are all part of linear algebra.
‫So normally you use this form for linear systems, either for LTI systems where your ABCDE matrices
‫are completely constant or for LTV systems where these matrices directly depend on time.
‫So this format here is a linear states based equation format.
‫However, what we did in the previous video, we took our nonlinear equations, the ones that we have
‫here, these are nonlinear equations and we managed to reformulate them in such a way that now the state's
‫basic equations appear to be linear.
‫They are not linear, but they appear to be linear because you have the A, B, C and D matrices and
‫separate state and input vectors.
‫So because of that, the system appears to be linear, but in reality they are not.
‫You have simply packed all the nonlinearities into the A matrix.
‫In other words, the equations are exactly the same.
‫You haven't made any approximations, you haven't made any linear ization.
‫The system is exactly the same.
‫You simply rearranged the equations by moving all the nonlinearities inside the Matrix.
‫You're using a standard linear state based equation format on a nonlinear system by keeping all these
‫nonlinearities hidden inside the Matrix.
‫And there is a reason why you do it, the nonlinearities that you have inside The Matrix or FYE, that
‫seat on that and Omega, these variables are measured in real time.
‫That means that they have to get updated every zero point one second.
‫That means that in every inner cycle you have a different five dot, Seeta, Dot and Omega and therefore
‫you have a different a matrix every zero point one second you have a different a matrix.
‫But then again, the NPC algorithm that you learned in the previous course doesn't care about it.
‫For the NPC, every inner loop iteration, every zero point one second is a bright new day.
‫Let's say that at sample time, K, your non constant variables in the Matrix are five, that equals
‫Phi Dot at K Theta, that equals Theta Dot at K and Omega equals Omega at K.
‫And so all these variables will go into the A matrix.
‫And for this particular a zero point, one second inter-group interval, the a matrix is constant.
‫So in this particular loop at K, the NPC treats the system as an LTI system because all the matrices
‫are constant, because Phi K, Seeta, Sub K and Omega Sub K are real time value set K.
‫You get them from a plant or you measure them with sensors, but they are real time values that go into
‫this, a matrix.
‫Then zero point one seconds later.
‫You get your new fi dot theater dot and Omega at Cape plus one.
‫So now this fire, that variable in this matrix will equal to find that at K plus one, which is a different
‫value from five dot at K.
‫The same thing here, theater that becomes Seeta Dot and K plus one and Omega will become Omega at Cape
‫plus one as well.
‫Again, these are concrete numeric values that will enter the Matrix.
‫You're a matrix will now be different compared to the previous one from zero point one seconds before.
‫But so what?
‫It has concrete values inside it.
‫And so the NPC controller that you're familiar with will take these A.B.C..
‫The Matrix is.
‫This critize them and then compute your use three and you four and then zero point one seconds later
‫at K plus two, you will have a new Firedog Theta Dot and Omega, either your plant or your sensors
‫in your real UELI will update these values.
‫And so your a matrix will get updated automatically and then the NPC controller will use that updated
‫one for computing the new control input values, UTU, U3 and EUFOR.
‫And that will go on every inner loop till the end of the trajectory.
‫Remember, the NPC is just an algorithm.
‫It can I think it just needs constant A, B, C and D matrices matrices with numeric values as their
‫elements, not functions nor independent variables, but concrete numeric values.
‫And it will give you some kind of you to use three and EUFOR in return.
‫And you know what, it turns out that this real time based control where you update the variables in
‫your a matrix as you go in real time, it turns out that it works very well in many cases.
‫And in fact, it is a very popular methodology.
‫My professor at the university once told me that one area where they use it is the aerospace industry,
‫this kind of methodologies being used in controlling airplanes, for example, due to the fact that
‫many systems in the aerospace engineering industry are highly nonlinear.
‫One option would be to use non-linear MPAC techniques for that.
‫However, as I've heard, these techniques require a lot of computational time because non-linear NPC
‫simply requires more time for optimizing the cost function.
‫And that can be problematic when you need your controller to run fast and control the system in real
‫time, especially if the frequency of a controlled loop is high.
‫So you need to compute the new you to use three and you four at a very high rate.
‫So you can either get a faster computer that does computations faster or you can bypass this and use
‫the easiest NPC that you already know.
‫By using the methodology that you have just learned here, you put the nonlinear states based equations
‫in the linear format by keeping the nonlinearities inside the A Matrix elements, meaning that you will
‫have independent variables in the Matrix.
‫But then you give those variables a specific value every zero point one second, and that value comes
‫either from the plant if you're simulating the OV flight or from the sensors of a real USV, if you
‫are doing real flight.
‫And so you update your a matrix every zero point one second based on the data that you get in real time,
‫then you democratize the system and you feed it into your familiar NPC to get your you to use three
‫and you four.
‫To get your three control inputs, this strategy might not give you the best optimum solution, a nonlinear
‫NPC technique might give you more optimal solutions.
‫However, very often this strategy is good enough.
‫But the advantage of this strategy is that it runs faster than non-linear NPC techniques.
‫It arrives to the solutions your you to use three and you for it arrives there faster, making it more
‫practical in real life.
‫And this strategy has a name.
‫It's called a linear parameter.
‫Varying methodology or LPT for short.