‫Welcome back.
‫So let's fill in the system now and let's start with the B matrix.
‫If you look at these equations here, then in each equation you have your last term and these last terms
‫here.
‫They are relevant to our B matrix.
‫So you have your control inputs here and your B matrix, and you have to be able to use them.
‫To construct these terms here with you to Q3 and Q4 and to do that, it's quite easy.
‫You can see that the control inputs, they are divided by the mass moments of inertia.
‫And so if you take this last term in the first equation, for example, then you can put one over Isobar,
‫X, X here and then you can have zero here and here.
‫Then you would multiply one over, I suspect six.
‫You would multiply that by you two and then you will have some other terms from here and then you will
‫get your five double dots and there you go.
‫You have your five double dot equals something plus you two over ice up X X four seater double knot.
‫It's like this.
‫You have zero here, one over I suppose Y y and then zero here.
‫Now you would multiply this one over mass moment of inertia, but the body frame y axis, you would
‫multiply by you three.
‫And that's why you have this last term here like this and finally for Citable Dot, you have it like
‫this one over I, sub Z and Z and that thing, you multiplied by four.
‫And here is the last term of the last equation.
‫EUFOR divided by the mass movement of inertia, but the body from Z axis.
‫So the B matrix was easy.
‫And how about the A matrix.
‫Now.
‫So the Matrix looks like this and let's analyze it a bit.
‫You have your fi double dot equals and then you have these terms here and then the first two terms,
‫they are relevant to the A matrix.
‫So if you take this element here and then you multiply it by theta dot.
‫Then you will get the second term here, right, this one.
‫And then if you take this element here and then you multiply it by side that, well, then you get this
‫first term here, right?
‫Because that would be inside your state vector, but then everything else will be in the Matrix.
‫And you can already see that it's a nonlinear system because, look, you have one state inside the
‫Matrix as well.
‫You had this setar dot here.
‫And now if you take to double that equals and then you take this element here and you multiply it by
‫five, that will then you get this term here right in this second equation, second term.
‫And you see you have a minus sign here.
‫And that's why you have a minus sign here as well.
‫And then if you take this element here and you multiply it by side dot, then you will get this first
‫term here in the second equation side that again, would be in the state vector and then everything
‫else would be in the A matrix.
‫So you see, you have a state inside the Matrix as well, this five dot.
‫And finally, what are you going to do about the third equation here?
‫Well, you can do it in several ways, but this is how I did it.
‫I take this element here and then I multiply it by this one here, and then I take this element here,
‫and then I multiply it by the state here.
‫And you see you have your theta that state here in your file, that state here.
‫And you can perfectly do it.
‫If you write it out, then you will see why.
‫So you're upside double dot equals.
‫So this one is this element here, and I'm going to multiply by five dot, which is this one here.
‫Plus, this element here, Times seat, that which is this one here, and then, of course, you take
‫this element here, one over I up, and then you multiply it by your EUFOR, which would be here.
‫Now you can see that the first and then the second term, they actually have a common denominator.
‫Right.
‫And then they also have the same states here.
‫You have theatergoer and find that here and then fita that and find that here just in another order,
‫which doesn't matter.
‫And also in both terms you have X, X minus I y, y, so you have it here and here.
‫So your numerator is also the same and that means that you can add them up.
‫And so if you add them up the first and then the second term, you will have it like this, plus you
‫for over, I sup Z and Z.
‫And if you look at this form now, then it's exactly like your third equation here.
‫BPCI double dot equals everything else.
‫So that's how it looks like.
‫But now again, is it an LTI form?
‫Well, no, it's not because well the B matrix and also your C and D matrices, while they're all constant
‫and you can see that your C matrix was constant, you only had ones and zeros there and inside the Matrix,
‫you only had zeros there.
‫So they are also constant.
‫So while you're A, B, C and D matrices are constant, you're a matrix is not.
‫You have variables, dot theta that and Omega inside the A Matrix and those things, they change.
‫The Matrix is not even an LTV, linear time, varying system, you're a matrix does not directly depend
‫on time.
‫Your matrix has other states in it and then even a variable that we didn't classify as a state and all
‫of them depend on time, so it is obviously a nonlinear system.
‫And just to be clear, we don't have to specify all variables that change, like, for example, this
‫Omega.
‫We don't have to specify them all as states.
‫Remember, in the previous course, I said that the states are the variables that change that you absolutely
‫need to have in order to control the system.
‫In other words, you can have many variables that change, but you don't have to classify them all as
‫states.
‫If you can, for example, classify some of them as states and you're able to control your system,
‫then that's OK.
‫And you can leave other variables B without classifying them as states.
‫So that's what we have done here with an Omega.
‫This variable changes, but we don't need to classify it as a state in order to be able to control our
‫system.
‫And that makes our lives easier because thanks to that, our state vector is smaller and our A and B
‫matrices are smaller.
‫But OK, so we have now established that we have a nonlinear system and we cannot have a small ÀNGEL
‫approximation with Phi Dot or Setar that they are not going to be small values when the drone follows
‫the trajectory.
‫And there is no reason to believe that the omega value will be small as well, because especially if
‫you have a huge difference between counterclockwise and clockwise, rather rotations, than this omega
‫value will be quite large.
‫So you cannot approximate it to be small or zero.
‫So does that mean that we cannot use the NPC strategy that you learned in the previous course?
‫Well, based on the information you have so far, no.
‫However, in this course, you will learn that you, in fact, can use that easiest NPC strategy even
‫here.
‫Let's talk about it in the next video.