 Hello, everyone. Welcome to yet another session of our NPTEL on nonlinear and adaptive control. I am Srikanth Sukumar from Systems and Control IIT, Bombay. So in this week number eight, we have been looking at adaptive integrator back stepping in more details in the last few lectures. And so we essentially saw the unmatched design and how to generalize it to the vector case. And we also saw how to do an extended matching design, which allows us to prevent over parameterization. We are well into the design and development of algorithms that help drive systems such as the SpaceX satellite orbiting the earth that we see in the background. Now, we've already looked at several methods now. And what I wanted to do was today in the session was to look at an example that is a vector example for both the matched and the unmatched case. And look at both the conventional design and also the extended matching design. Yeah, so let's see how we can do. So this is, I mean, there was also an example that I asked all of you to a problem that I asked all of you to sort of try to solve, which is also has vector parameters. So of course, I wanted all of you to try this. But what I want to do is to look at a complete vector example with the states and control everything being vectors, right? So, and so that's what this is. So this is, sorry, just allow me a moment, right? So this is where we start. This is lecture 8.6. So I think this was 8.5, right? So we are at lecture 8.6. And this is the sort of system. This is a concocted sort of system. So I wouldn't worry so much about what is the real relevance. But the aim here is to design a stabilizing adaptive controller with sort of parameters p and theta. We start with the matched case, where we assume that theta is the unknown, right? And theta in this case is a 3 by 3 vector. X1 and X2 and the control are vectors in R3. p is also in R3. So therefore, you have a cross product here. And theta is actually, sorry, I apologize. Theta is actually a 3 by 3 matrix. Yeah, I'm sorry. So theta is actually a 3 by 3 matrix. So let me just give it a thought first that if this is the example that I want to consider, right? Or, yeah, let's sort of look at this example, okay? Let's sort of look at this example and see how things go. Okay, right, right. So let me try to do the matched case. In the matched case, p is assumed to be known, theta is assumed to be unknown, all right? So let's see how the design goes. So I'll start with the first stage. And I want to prescribe X2d. But before I prescribe X2d, I want to prescribe a V1 as half X1 transpose X1 or the norm. This is the standard choice whenever vector states are involved. And we can also try a weighted version of this. But for us, this is okay. And I take V1 dot. And this I used to actually obtain my X2 design, right? Because I assume my X2 to be the control, right? So V1 dot comes out to be X1 transpose X1 dot, which is p cross X1 plus X2. Now the interesting thing is that so I'm going to say note X1 transpose p cross X1 is actually zero. Okay, why? Because p cross X1 is orthogonal to X1 and dot product of orthogonal quantities is zero. Okay, or you can also think of this as a scalar triple product, right? So this also can be thought of as a dot b cross c. And I can rearrange it to obtain again X1 cross X1, which will give me zero. Okay, so this quantity is zero. So this product does nothing. So I'm left with X1 transpose X2. So a good choice of X2 desired is still my usual nice choice, which is some minus K1 X1, where K1 is some like for now I just take it as a positive scalar, just a scalar quantity. Right? Great. Now what do I do? I define my backstipping variable as Z as being equal to what? My backstipping error, because X2 is my true state and I wanted to follow X2 desired. So this just becomes X2 plus K1 X1. Right? And now what do I do? I define my V as V1, which is, I'm going to say this V1 for now, V1 X1 plus half the norm of the backstipping error square X2 plus K1 X1 norm square, apologize. And then of course, because it is the unknown parameter case, right? I will always deal with the unknown parameter. So I have to add some term corresponding to that. Okay, I'm going to add some time corresponding to that. And I'm going to call it, if you may, I'm going to call it half 1 over 2 gamma mu tilde norm square. Okay. And I will explain what is mu tilde, so why do I need mu tilde? Let's look at this. So here, the parameter is actually a matrix, right? And I don't, we don't like to deal with matrix parameters. So what do we say? We say that theta X2 is equal to something like a W times mu. You know that this left hand side is linear in the elements of the matrices of the matrix theta. Therefore, I rearrange it, right? So what is mu? Mu is actually equal to theta 11, theta 12, theta 13. So this is basically just the columns stacked theta 21, theta 22, theta 23, theta 31, theta 32, theta 33. Yeah, so that is what is your mu. Okay, so this is very simple. I've just, in fact, I can be careful and say that this is actually just W of X2 times my new parameter mu, which is nothing but the theta, which was a matrix stacked in a vector, okay, column wise. And then mu tilde is just mu minus its estimated mu cap. Yeah. So this is just because I have a matrix parameter theta, and I don't like to deal with matrix parameters. Yes, I did it in the, you know, model reference adaptive control case, but I don't want to do it. So I'm going to deal with the vector parameter mu. Okay, so this is what is now my, you know, candidate Lyapunov function for the entire system. Okay, this is what is my candidate Lyapunov function for the entire system. Right. Great. So now what do I do? I take derivatives and try to find the controller, right? So let's do that. Let's do that. So I'm going to, let's say, let's see if I can copy this whole thing. Yeah, I believe I can copy and remove to the next page and simply paste it. Okay, I don't know what I copied. Somehow copying the whole thing. Okay, maybe I can still paste and delete it. Okay, that's fine. This is okay. So what I do is I just erase this. Yeah, great. So now if I take my v dot here, what do I get? I will get v dot as v1 dot, which is a one half x1 transpose x1. So I'll get x1 transpose x1 dot, which is again p cross x1 plus x2 plus this guy one half x2 plus k1 x1. What I'm going to just write this as z, z transpose z dot, which is x2 dot, which is w times mu plus u, which is x2 dot, plus k1 x1 dot, which is k1 p cross x1 plus x2. Right, plus just one over gamma mu tilde transpose mu, mu hat dot with the negative sign. Right, because mu tilde dot is just mu hat dot. Okay, great. So again, I know that this term amounts to nothing. Right, so I'm going to write this as x1 transpose times x2 plus half z transpose this whole mess. Well, actually, you know what, I'm going to make my life simpler. And I'm going to write x1 transpose x2 in terms of z. So this is actually z minus k1 x1 plus half z transpose. This whole thing gets here and minus one over gamma mu tilde transpose mu cap dot. Okay, now you can see that I have a minus k1 norm x1 squared from here. And sorry, I don't have a half here and that's a mistake. And plus z transpose times, I get a x1 plus w mu plus u plus k1 times p cross x1 plus x2 minus one over gamma mu tilde transpose mu hat dot. Okay, again, just copying terms and moving this z x1 to this term, I get this. Now I'm in a good position to design my control. Right, this is an unknown. So I'll just replace it with the estimate. So my control will be just minus x1 minus k1 p cross x1 plus x2 minus a good term, which is k2 z minus w mu hat. And here k2 is of course some positive quantity. Right, so what I have done, what have I done? I have canceled this, I've canceled this, introduced a nice negative term and tried to cancel it with my estimate. Right, so with this, my v will be minus k1 norm x1 squared minus k2 norm z squared because of this guy. Right, and I will be left with plus z transpose w w mu tilde because I have a w mu here minus w mu hat from here. So I have a w mu tilde and a minus one over gamma mu tilde transpose mu hat dot. Now if you look at these two terms together, I can take transpose here. Right, so this is equal to mu tilde transpose w transpose z because these are all scalar quantities, I can take as many transpose as I wish. Right, no problem. Right, so using that, I choose mu hat dot to be so that I cancel this guy. So this would be gamma w transpose z. Yeah, so if I do that, I end up with v as minus k1 norm x1 squared minus k2 norm z squared which is less than or equal to 0. And from here, I can prove that x1 goes to 0, z equal to x2 plus a1 x1 goes to 0, and this implies that x2 goes to 0. Okay, so this is what we want. We want, well, I mean we did the stabilization problem. Yeah, but again, the tracking problem is exactly the same, no problem. Yeah, so this is what we want. This is what we get. We get a nice update law here. Right, we get this nice update law here. Right, and similarly, we get our control law here. So we get an update law and the control law just like we want. And this is our standard adaptive control. And you can see that dealing with the vector case did not significantly complicate things or anything. Yeah, it was quite okay. Yeah, it was quite okay. So anyway, so let's, so this is how you do the design for the matched case. Right, that is where the unknown is theta and p is in fact, no. All right. And p is in fact, no. Great. Now let's look at an example for an unmatched case. Right, so I will try to construct an example. So let's look at the unmatched case and see what happens. So what I want to do is to have a similar system. So here I will have not p cross x1 because that will not be interesting enough. So I will do something like x1 dot is something like f x1 times p plus x2. And x2 dot is omega cross x2 plus a control, right, where again x1, x2, u, omega are in r3. f of x1 belongs to r3 by 3. It's a 3 by 3 matrix. And p of course belongs to r3. p is unknown. Yeah, omega is known. Okay, so this is the system. So now this becomes an unmatched case, right, because I now have unknowns here. Right, so let's try to do this with the standard integrator back stepping type design. Right, so what would I do? I'm directly dealing with the unknown case, of course. So we'll see what we will do. Right, so I will take my, so I will first take my first set of dynamics. I will want to do v1 as one half norm x1 squared plus 1 over 2 gamma p tilde squared. Right, well p tilde is p minus p cap. And x2 is assumed to be the control. So x2 desired is of course minus f x1 p cap minus k1 x1 for some positive k1. Right, so with this, what will I get? I will get v1 dot as x1 transpose x1 dot. Right, I mean this is again as you, this v1 dot is assuming x2 is x2 desired. You will get x1 transpose x1 dot, right, which is f x1 p minus f x1 p cap minus k1 x1 plus 1 over gamma, I apologize, this should have been a norm also because p is in r3. And so this will be minus 1 over gamma p tilde transpose p cap dot. Right, and this is just minus k1 norm x1 squared plus x1 transpose f x1 p tilde minus 1 by gamma p tilde dot p cap dot. I am simply reproducing this step here. Right, just combining terms carefully. So now if I choose p cap dot as f x1 transpose x1 times gamma, then I have v1 dot is minus k1 norm x1 squared, which is negative semi-definite. And I am good. This is essentially what I want. Right, in our standard adaptive integrator back stepping design. So I have a first estimate, first Lyapunov candidate. Right, I have a first estimate, I have a firstly Lyapunov candidate. Right, I have the first estimate and a firstly Lyapunov candidate. And we are good. Right, and we also have an x2 desired, of course. Right, we also have our x2 desired right here. We also have an x2 desired right here. Okay, great. So now what do we want to do? We want to, of course, create our back stepping variable. Right, so we want to create a back stepping variable. And how do we do that? It's pretty straightforward. Right, we design a z, which is equal to x2 minus x2 desired. I am going to explicitly write this up. And what is x2 desired? x2 desired is this guy, minus f x1 p cap minus k1 x1. So this is plus f x1 p cap plus k1 x1. This is what is my z. And so, right, so what happens? Now, if I actually compute my z dot, which is what I'll do, if I compute my z dot, I get x2 dot, which is omega cross x2 plus u plus this, which is partial of f with respect to x1 plus k1 times x1 dot. And x1 dot is what? x1 dot is f x1 times p plus x2. And then I get a f x1 p cap dot. Okay, p cap dot is already specified, right? So p cap dot is this gamma f x1. So this is actually equal to f x1 times gamma f x1 transpose x1. Okay, so this is what is this term. And now, what do we do? We sort of try to, of course, we want to try to specify the control. We want to try to specify the control. But now we are in a little bit of a soup. Why? This is what happens in this adaptive integrated term. There is another unknown appearing here. And because we've already come up with the p hat dot, we cannot replace use p hat again in the control. So what do we do? We use a new estimate p bar. So we design the control as minus, but anyway, we, of course, I'll just, I'll just not design the control right now. Now, design new estimate p bar for this term. Yeah, because we already have a p hat, and we already have an update law for p hat. So we cannot use this earlier update, earlier estimate p hat. So we need to create a new estimate. And that's what we call p bar. Okay, great. Now, once we know this, we define our completely apunov function as v1, right, which is a function of your x1 and p hat and add to it our backstipping error terms, right, which is standard. And then a term in the new parameter error. And then a term in the new parameter error, that is p minus p bar squared. Okay, so this is what we have been doing, right? I mean, if you look at this, how we did not the extended design, but this guy, right? So if you look at this, what was it? It was the original v, then the term in the square term in the backstipping error, then a quadratic in the new parameter error. That's exactly what I did. I just instead of having a matrix, instead of having a matrix S inverse, I've taken just a delta and just some delta positive, right? And with this, my plan is to design a p bar dot, right? So that's what we do. Great. So what I'll do is I'll continue with this in the subsequent lecture. So we look at it very carefully. All right. So what did we do today was we have already seen all the methods for design of parameter update loss or matched and unmatched control via you know, adaptive integrated backstipping. And of course, the extended matching design, what I wanted to do was to take up an example. So that's what we did for the matched design. We took a vector example, and we showed how to design a control and an estimation law or an update law for the parameter. And similarly, we are now doing the same for a vector example for the unmatched case. And we are first trying to do the design using the adaptive integrator backstipping. And subsequently, we will use the extended matching. Yeah, so this is so that we get some exposure to vector system adaptive control design. Yeah, so that's the idea here. Okay. Excellent. So this is where we will stop and we'll continue with this example in the next session. Thank you.