‫Welcome back.
‫But now, if you remember, we could rewrite this vector here like this.
‫But now everything have till date because they are all augmented.
‫So this matrix here was called C Double Bar.
‫And then this one here was called like this a double hat.
‫So be till there, then a till the times b till there, then a till the squared times B till there and
‫then a till the cubed times B till there.
‫They all have dimensions nine by three.
‫That means that C double bar is thirty six by 12 and then a till there and then a till the squared,
‫a tilde cubed and then a tilde to the power of four.
‫They were all nine by nine.
‫So that means that this entire global matrix, a double had it's going to be 36 rows and nine columns.
‫So essentially, you have rewritten this vector here x still the global in terms of augmented presence,
‫state vector, which is this one and the control input increments like these ones here.
‫So you rewrite this vector like this and then this vector transposed, well, it's this one here.
‫And then again, this vector here, you rewrite it like this and remember that this c double bar and
‫a double hat, they use easier assumption.
‫The A Tilde Matrix does not get updated here as we predict future states from K plus one up until K
‫plus four.
‫And by the way, if in the future you have to use this non simplified LP and PC version, then here
‫again, when you augment your system, meaning that you go from U2, you three and you for two Delta,
‫U2, Delta you three and Delta you four.
‫Then of course, in here you will have deltas everywhere like this.
‫So Delta, you zero, delta, you want Delta, you two and Delta you three, and then all your mattresses
‫will be augmented and also all your air mattresses will be augmented, just like we had discussed it
‫here.
‫You see, this is your eighth.
‫Will there be till there?
‫See Tilda and Tilda, you're eight.
‫Till that consists of these discrete A and B matrices and also your zero matrix and then identity matrix.
‫Your B tilde has this discrete B matrix and an identity matrix and then your C tilde.
‫It contains your discrete C matrix and then a zero matrix and then your D tilde.
‫It's just a zero matrix that you can neglect.
‫OK, but now, since your control inputs are delta use and not use, then you might ask how you update
‫your global omega in the matrix.
‫You got your omega zero global from the plant in the previous loop.
‫But remember, you also had to obtain Omega one global omega two global in omega three global that you
‫would put inside your A1 matrices, a two matrices and a three matrices.
‫Just like this one went into your A0 matrix.
‫Well, remember you need it, you one, you two three, and you fought for that.
‫And so you won.
‫That was always the same.
‫It only changed after each outer loop, but during the inner loop iterations you won, that came from
‫your state feedback minimization controller.
‫During the inner loops, it remained unchanged.
‫But in order to get omega one global, you will use to Q3 and Q4 values from this predicted augment
‫the state vector X till the sub one.
‫As you can see, I've also put Tilda's here and also here, where your present state vector is in order
‫to indicate that they are augmented.
‫So remember X still that one?
‫It's this one here.
‫And so your omega one global, it will depend on the unchanged u one and these values here and now in
‫order to get actual.
‫Until then, you will also use this Delta Use Zero, which is the first left over from the previous
‫loop.
‫So in the previous loop, you received this solution from your AMPK controller.
‫You only used this one here.
‫You did not use this one here.
‫And so this was your first left over in the previous loop.
‫But now in this loop, it became Delta U zero, just like this one became Delta U minus one.
‫And so you use this one here for this Delta use zero in order to obtain your ex tilde one.
‫And then from that, you will get these utu you three and you for values.
‫And together with the unchanged u one value, you will get your omega one global.
‫Similarly, in order to get your Omega two global, you will use the unchanged U one value and then
‫you will have ex the two your predicted.
‫AUGMENT the state vector two time steps into the future, and it looks like this.
‫And so you will also use these values together with your unchanged U.
‫One value in order to obtain your omega two global and in order to get your ex still the two.
‫You will also use this variable here, which is your second left over from the previous loop.
‫And so in this loop, it would be Delta U.
‫One.
‫And so this variable, it goes here, and that's how you get your ex tilde to finally, in order to
‫get your omega three global for that, you are going to need it.
‫Still, the three and it looks like this.
‫And so in order to get your omega three global again, you use your unchanged you one value and these
‫values here and also in order to compute your ex.
‫Still, the three for that, you will take your final left over from the previous loop, which was Delta
‫you three there.
‫But now in this loop, it's Delta, you two.
‫And so you take this variable and you put it here where your delta you two is, and that's how you obtained
‫X2.
‫Still the three.
‫And that's where we could stop, because with all that, we could obtain our A0, A1, A2 and A3 matrices
‫for the non simplified NPV method.
‫But the thing is that you don't need to put till this year in order to know whether your mattresses
‫are augmented or not.
‫And that's because when you see in the equations that you have Delta use zero delta, you want Delta,
‫you two and Delta you three.
‫In other words, when you see that you're working with these control inputs and not with these control
‫inputs, then you automatically know that you're a bee.
‫And then also see matrices are augmented.
‫You don't have to put till this year.
‫It's like we did it with this discrete versus continuous version.
‫This was your discrete format.
‫This was your continuous format.
‫When your equations were in this form where you had x dot equals and then everything else.
‫Then you knew that your A and B matrices that they were continuous.
‫But when your equations were in this form, so you had XSET K plus one equals and then here you had
‫exit K and you had K, then you knew that your A and B matrices that they were discrete, they were
‫discrete ties and the relationships between the discrete ties and continues a, b and C matrices.
‫They were derived in the first car course and you can see their relationships here.
‫These could equals all this and this is your continuous.
‫A discrete B equals all this.
‫This is your continuous B and then discrete C equals continuous C.
‫So you did not need to write a D or B D or c d for your discrete matrices because you saw it from the
‫equations you were working with.
‫And the same thing with system augmentation.
‫If your system is in this form, then it's not augment it.
‫But if it's in this form, then it is augmented.
‫Why?
‫Because here you have use up K and here you have delta use of K.
‫So you know that these two a matrices, they are not the same.
‫And you know that these two B matrices, they are not the same.
‫Just like you knew that these two matrices are not the same.
‫And these to be matrices are not the same in the first one.
‫This a is a discrete a matrix.
‫And this b that these could be matrix because your control input is use of K.
‫But in the second equation, your control input is delta.
‫Use of K the change of your control input.
‫That's why you know that this a matrix.
‫It's actually your augmented a matrix.
‫And this matrix, it's your augmented B matrix.
‫But you don't need to put these till this here, because the fact that you have delta use of K here,
‫it already tells you that you're A and B matrices and also your C matrix that they are all augmented.
‫So you don't actually need to put till this year.
‫You know that you are working with an augmented system because you can see deltas here.
‫You know that this guy, this guy and this guy, they are both discrete A, B and C matrices because
‫here you have K plus one K and K, and they are also augmented A, B and C matrices because you have
‫delta here.
‫And next, we will again open up the parenthesis, just like in the previous course.
‫And so if you now have your prime cost function and you open up the parentheses here, then this is
‫what you will get.
‫It's exactly like in the previous course only instead of deltas you have use.
‫But the logic and the procedure is exactly the same.
‫And again, you will have some constant terms that you don't need for optimization purposes.
‫So you can just say that they are zero.
‫You can just lose them.
‫And if you do that, if you lose those constant terms, then you will have a new cost function, a cost
‫function without these constant terms.
‫And we're going to name that J double prime.
‫And then exactly like you did in the previous course, you take this J double prime that you have here,
‫which is this one here and you put it in a form where your control input increments are like that.
‫So you have a control input increment here.
‫And then here you have the same thing, but transposed and then in the middle you have a collection
‫of matrices.
‫If you put them together like this, you will get your h double bar.
‫And then you take the remaining terms and you make sure that your control input increment is here.
‫Your present state vector, which is augmented, is here, then your reference value vector is here.
‫And then in the middle, you will have this collection of matrices that we called f double bar transposed.
‫And the same thing happens for us is just instead of Delta Delta us, you're going to have Delta use.
‫And so that's how your final G double prime cost function looks like.
‫That's its final form.
‫This vector here is 12 by one.
‫This one here is one by 12.
‫That means that you're h double bar is 12 by 12.
‫Then this one is one by nine.
‫This one is one by 12.
‫That means that this entire thing is one by twenty one.
‫This one is twelve by one.
‫That means that this one is twenty one by twelve.
‫That means that this entire thing here will be one by one because you would cancel out 20 1s and 12s
‫like this.
‫And of course, here you would also have one by one because you would cancel out these buttons and these
‫12s like this.