‫Welcome back.
‫So let's solve this exercise now, the task was to put these equations into this vector matrix form.
‫And so let's first take this first role.
‫So you have your X plus one, which is this one here.
‫Your X up key would be here.
‫Use of K minus one would be here and then Delta use up K, it would be here.
‫So that means that this a here it will go here.
‫This B here it will go here and the same B which is here, it will also go here.
‫And now we take the second equation, USB key which is here use K minus one, that's this one here.
‫And Delta use up K, that's this one here.
‫Note that use of K is a three by one vector, three rows, one column and the same thing is this one
‫use of K minus one three by one vector.
‫The state vector is of course six by one because we had six states, this one as well.
‫That means that this a matrix, it's six by six and this B matrix is six by three because you would
‫multiply this B by this three by one vector.
‫That means what you have here is an identity matrix, which in the scalar world would be one, and since
‫this is three by one and this is three by one, that means that your identity matrix would be a three
‫by three identity matrix because you would multiply it.
‫This one here, that's your identity matrix.
‫You would multiply by this vector, which is this one here and the same thing here.
‫You also have an identity matrix here.
‫That means that you have a three by three identity matrix as the second element in this global matrix.
‫It's like a sub matrix within a big global matrix.
‫And well, since you have three roles in this vector, in this use of K vector, but this a matrix has
‫six columns, then that means that you will have a zero matrix here with three rows and six columns.
‫And now what about the output?
‫Remember that you have six states and then out of those six states you would select three outputs and
‫you would do that with a C matrix.
‫So you would have to multiply the C matrix by your state vector, which is here.
‫And since you have three outputs and six states, then the C matrix will be three by six.
‫So this three by six C matrix will come here.
‫Now you have three outputs and then three control inputs.
‫That means that you will have a three by three zero matrix.
‫And when it comes to your output, then there is no contribution from this vector here.
‫So three outputs and then three delta use.
‫That means that you will have a three by three.
‫Zero matrix, in other words, you can just ignore this term, we would call this Matrix D still there,
‫but you can ignore it, but you cannot ignore other matrices.
‫This global matrix here, we call it a tilde.
‫It's an augmented a matrix.
‫This is beating the Yog, meant to be matrix.
‫And this is C Tilde, the augmented C matrix.
‫This here would be your augmented presence state vector.
‫This would be your augmented state vector.
‫But the zero point one seconds in the future, the new augmented state vector.
‫Again, this is the augmented presence state vector.
‫And so this form here, it's equivalent to this form here.
‫We have simply put it in the vector matrix form.
‫So, you know, the dimensions of the sub matrices, A, B, C, the identity matrix and also sub vectors.
‫So you had a six by one state vector and then a three by one control input vector and then also a three
‫by one, the increment of the control input vector.
‫But the dimensions of the augmented vectors and matrices are the following.
‫This one here now has nine rows and one column.
‫So it's this one, the same thing for this thing.
‫The augmented state vector has nine rows in one column.
‫Now, the output, of course, was three by one.
‫Now, since you have nine rows in one column here and nine rows in one column here, then this a there,
‫it will be a nine by nine matrix.
‫And you can also see from the sub matrices if you add up their dimensions.
‫Now, since you have three rows in your delta, you vector and then nine rows in your augment a state
‫vector, then that means that your be toolbar is nine by three and then you have three rows in your
‫output vector and then nine rows in your augment a state vector.
‫That means that your Kielder is three by nine, three rows, nine columns.
‫So remember when you see a still there, it means augmented matrices and augmented state vectors.
‫In addition, remember one thing since the Horizon period of our NPC is for your NPC will find a sequence
‫of control inputs that looks like this.
‫That's what your NPC will find.
‫So if we take a random element here just to see how it looks like, then it looks like this delta you
‫to add K plus to Delta U three at K plus two and Delta U for at K plus two.
‫So that's how each element looks like and therefore, since this one is three by one, well, then you
‫know that this entire vector will be 12 by one, 12 rows and one column.
‫However, remember that in each NPC duration, only the first sub vector is considered and the rest
‫is neglected.
‫And also remember that the plant has to receive the real control inputs, not its increments.
‫So it has to receive use up key and not Delta use up.
‫That's not what the plant wants.
‫The plant wants this, but you can achieve that very easily with this operation.
‫Use up K equals use up K minus one plus Delta.
‫You sup K or in the vector matrix form it would be like this use of K equals use up K minus one plus.
‫Then you have a matrix here and this is your global control input sequence.
‫It's this one here.
‫So if you want to extract this element here, then you will have an identity matrix here, which is
‫three by three.
‫And then in order to cancel out the other elements, you just need to have zero matrices here.
‫A three by three zero matrix for this one, a three by three zero matrix for this one here, and a three
‫by three zero matrix for this one here.
‫So this term here is this term here and then this entire term here, it would be this term here like
‫this.
‫And then you get this vector and this vector will go into your plant in the vehicle case, your control
‫input was a scalar.
‫So you could do this extraction with a simple roll vector with ones and zeros.
‫So that's how we did it.
‫In the previous course.
‫You didn't have an identity matrix, you just had one and then you had zeros here because these elements
‫here, they were scalars, they were not vectors, they were scalars.
‫All right.
‫So in the next video, we're going to go back to our cost function and we're going to continue working
‫with that.
‫Thank you very much.