‫Welcome back.
‫I think that the best way to do this section is by briefly looking at what we had previously done in
‫implementing the NPC controller to the vehicle.
‫And then in parallel to that, we will look at how to implement these steps in the other case.
‫That way you will see the similarities and the differences that would appear in this process of implementing
‫the NPC controller to the UAE.
‫So in case of the vehicle, we followed a similar process.
‫We first hand our equations of motion in the lateral direction.
‫Then we transformed them into the state's base equations, those states base equations were used in
‫the plant of the vehicle.
‫However, when it came to the NPC controller, we had to put these equations in the.
‫Continues LTI system for.
‫Or continuous linear time invariant form this LTI form of the state base equations was a special state
‫space form in which you first put your state's space equations in this form.
‫This one here where your state of vector, the control input vector, the output vector and then the
‫time derivative of your state vector.
‫They are all as a function of time.
‫And then you made the assumptions possible in the systems states based equations.
‫In order to make sure that the Matrixes, A, B, C and D will be completely constant as a function
‫of time, you did not want these mattresses to change at all.
‫And so when you're A, B, C and D matrices are completely constant in terms of time, then your system
‫is in the LTI state space form.
‫And once you have your system in the continuous LTI form, you have to democratize it.
‫You would get your discrete LTI system.
‫The main difference between the continuous and discrete system was the following.
‫This was the continuous form here and this would be the discrete form here.
‫The continuous LTI system gives you the time, derivatives of your status as a function of time, and
‫then the discreetness system gives you a new state at K plus one.
‫All right.
‫So when you have a continuous form, you get a time derivative of your state as a function of time.
‫And when you have a discrete form, then you get a new state, another time derivative of the state,
‫but a new state at K plus one at one time, sample later.
‫Because remember, now you don't have continuous time, you have time samples here and also that this
‫critize states based system has different matrices.
‫You have A sub D, B, sub DC, sub D and disturbed.
‫In the previous course, I showed you how to derive the equations for these discrete matrices using
‫the forward oilor method.
‫The formulas that we have got were the following aid equals the identity matrix, plus the continuous
‫a matrix times the time sample interval.
‫Then BD was the continuous B matrix times the time sample interval.
‫Then KDDI was equal to continue C and the D was equal to continues D.
‫And then after that step.
‫We use our discrete A, B, C and D matrices in the NPC control technique.
‫Now, the DBE Matrix, and then they did Matrix, they were Xeros.
‫Because remember the vector Y in the continuous form and also in the discrete form, it was our output
‫vector and in our case and in most cases, the outputs are simply the states chosen in order to compare
‫them with reference values.
‫You would only need a D matrix if your output was some kind of mix between the states and the control
‫inputs.
‫For example, let's say that this is your state vector.
‫You have one element X1 and then you have X2.
‫And let's say that it's transposed because it's a common vector and let's say that you choose X one
‫to be your output and then your output, which is X1 would be a matrix, which in this case would just
‫be a role vector one and zero, and then you would multiply by the state vector x1 and X to.
‫And this would be your see matrix, of course.
‫And so this SI matrix would extract X one from this state vector, and that would become your output.
‫And then obviously, you don't need anything from here, so your deal would be zero.
‫You don't need to extract anything from the control input vector here, but then let's say that again,
‫your state vector is X1 and X2.
‫You have two states and then you control input vector is you one and you two, which is also common
‫vector.
‫But let's say that you want your output to be a mix of your state and control inputs and let's call
‫it X and asterisk, then, for example, you could have something like this.
‫You have to here you have five here.
‫This would be your C matrix, of course.
‫And then you multiply by your state vector and plus then you have something else here, one and two,
‫so that would be your D matrix and you multiply it by you one and you two, which are your control inputs
‫and then your output X asterisk would be two times X one plus five times X two plus one times you one
‫and plus two times you two.
‫So you see now your output is some kind of mix of your X one X two states and then you want and you
‫to control inputs.
‫But this kind of thing almost never happens in control engineering.
‫In most cases, the outputs are simply states that you extract from the state vector because you have
‫to compare that state against your reference value.
‫X1 are.
‫And therefore, in most cases, your democracies are zero.