 So, what we want to do or well look at briefly is what I do in my adaptive control course and this is back stepping adaptive control, okay. So, you already know what is back stepping. So, it turned out that actually the name back stepping I told you right it came from the KKK Kanalakopolis Kokotovich Kristic actually Kristic I guess named it as back stepping the method was sort of known before that so and he is one of the one of the key researchers in the area of adaptive control, okay. So, the entire concept and utility of back stepping came from adaptive control, yeah. So, not the other way around although it seems like we are doing the other way around. So, we already did for the non-linear system case back stepping ideas very powerful, yeah. You can easily construct sequentially CLFs and do a lot of things, yeah. In fact, even automate it if you can I mean you can do symbolic, symbolically keep generating new functions if you do not want to keep track of the complicated terms, yeah. So, back stepping like I said came from adaptive control. So, obviously it makes sense that it is very applicable in adaptive control. So, modern adaptive control is uses a lot of back stepping, okay. So, what is this we will not look at all these I mean what they mean and so on. So, I am not going to sort of worry about this, worry about trying to explain this because this is an adaptive control course so obviously there was more material here. So, back stepping obviously is a method for generating strict Lyapunov functions or the way we said it is control Lyapunov functions, okay. Control Lyapunov functions and strictly Lyapunov functions sort of the same things, yeah. Basically V dot is negative definite, yeah. For any CLF you will see V dot is negative definite that is how it is defined in fact. So, that is what is called strict Lyapunov functions. When you take a V it is nice and positive definite and all that and the V dot is negative definite then it is a strictly Lyapunov function, yeah. And we just saw a spring mass damper sort of example where even though we know that the system is asymptotically stable the V that we designed or chose, yeah did not have a negative definite V dot, okay. So, those are not strictly Lyapunov functions, okay. They usually give trouble in adaptive control. They are not nice for adaptive control, yeah. So, which is why backstabbing is so popular because adaptive control requires CLFs or strictly Lyapunov functions, okay, great. So, suppose we have this non-linear double integrator. We saw a double integrator. Now we have a non-linear double integrator and this is where we have the unknown appearing, okay. You see that this is only one function. This could easily have been summation of theta i star fi plus u, okay. It could have been very easily that. So, that could have been like a function approximator if you may, yeah. So, it does not matter if there is 1 or 10 or 100 and so on. You can still use adaptive control ideas for this, yeah. But this is the unknown, yeah. This would be again, inertias or parameters for identifying the general function, yeah with these f being the basis functions and so on, yeah. But what we want to do is we want to achieve some kind of a tracking for this system. We want to achieve some tracking results, all right. So, that is what I say. So, everything is in real. So, I am keeping the presentation simple, of course. So, everything is real numbers. F is of course a map from the state and the time to the state again, yeah or whatever or the vector, the derivatives again, all right. So, what is the objective is tracking, right. What is tracking? It means that I have a signal r and the position follows the r, velocity follows the r dot because I have this matching kind of a requirement, okay. So, the trajectory also has to satisfy this, okay. The velocity is derivative of position, all right, great. So, what is the dynamics for the errors now? This is what we have been doing for the tracking problem, right. We construct an error, we write the dynamics of the error. What is the error dynamics? Even dot is e2 comes by virtue of the matching condition, right. And e2 dot is just x1 double dot or whatever, x2 dot minus r double dot, right. So, x2 dot is this minus r double dot, okay. So, this is my new dynamics that I am working with, right. I still have an unknown. If I did not have an unknown, I would simply cancel this guy, cancel this guy, introduce the nice terms that I wanted, okay, all right, all right. So, I already say that this is a bad Lyapunov function for this system, right. It leads to what is called detectability obstacle. So, we will try to use back stepping to construct Lyapunov functions here, yeah. Because you know that this is a non-strict Lyapunov function even for the known case, yeah, you have seen the spring master. All right, what do we do? Standard back stepping, right. We have even dot is e2. We assume that the e2 is the control. So, we design an e2 desired. What is the e2 desired in this case? Just a minus k1 even, right. You are just trying to make this go to 0 exponentially. Then this is a good enough system to follow, okay, all right. So, if I did that great and what would be the corresponding Lyapunov candidate Lyapunov function, it is half even square, right. Because it is half even square and this dynamics, right. I get v1 dot s minus k1 even square, yeah. This is what, yeah. This is for the first stage, for the first system. This is the Lyapunov function, right. Now, I will augment it, right, using the back stepping error and so on. So, what is it? All of this happens when e2 is exactly equal to e2 desired, which is not possible, yeah. We do not control e2 itself, yeah. So, we construct the back stepping error, okay. What is the back stepping error? It is this, e2 minus e2 desired. Because we cannot make e2 equal to e2 desired, we try to drive e2 to e2 desired. This is the idea of back stepping, okay. So, what is e2 minus e2 desired? It is e2 plus k1 even, yeah. And this is why denote as psi 2, okay. This I denote as psi 2, psi 2. So, now one of the questions that I asked, which anyway we also answered in back stepping, I believe, that does this mess with the original control objective. The original objective was to drive e1 and e2 to 0. But now with the new dynamics, my objective will be to drive e1 and psi 2 to 0. So, what happens is that if indeed e1 and psi 2 go to 0, e1 goes to 0 and psi 2 goes to 0. But in inside psi 2, I also have e1, which is going to 0. Therefore, e1 and psi 2 going to 0 is the same as same, e1 and e2 are going to 0, okay. And vice versa, you can check, yeah. Because this transformation is sort of a non-singular transformation. It is a nice transformation, yeah. Nice value transformation of the states, okay. All right, great. So, you have the first state e1 and you have the back stepping error state psi 2. And I take the derivative of psi 2 to find the dynamics, yeah. And I get this guy, yeah. It is just e2 dot plus k1 e1 dot. So, that is this plus k1 e2, all right. Clear? Okay, fair enough. Now, what do we do? What do we add as the new term is the square of the back stepping error, right? Every time when we do back stepping, all we are doing is taking the original Lyapunov function and adding to it the square of the back stepping error, always. This is how we come up with the CLF, right? This is what we proved in our back stepping result, okay. Great. So, what is e2? e2 is half psi 2 squared. And what is e2 dot? It is this guy. Psi 2 times the derivative of psi 2, yes? All right. So, right now, the way this is done is we are not looking at the v completely as of now. So, as you understand, the v for the entire system would be v equal to v1 plus v2, right? We have chosen a control even before we did that analysis. We are choosing a control right from here, yeah. And how do we choose it? Basically, cancel this guy, cancel this guy, cancel this guy. And introduce a good term, okay. That is all we are doing. This is used, this is cancelled, this is cancelled, this is cancelled and a good term is introduced in the psi 2, okay. This control works. Ideally, I would not recommend doing like this. I would say you first do this v equal to v1 plus v2, take its derivative, then guess the control. Okay. So, what is, let us see. What is v equal to v1 plus v2? v1 was e1 squared by 2, right? And v2 is psi 2 squared by 2, right? So, v1 dot is e1 e1 dot, v2 dot is psi 2 psi 2 dot, okay, all right? So, what is e1 e1 dot? E1 dot is e2 and psi 2 psi 2 dot is because of this choice. It is minus k2 psi 2 squared, yes? Okay, because I cancelled everything. All I am left with is minus k2 psi 2, okay, okay, great. Now, I get this variable e2 which is not my variable anymore, right? Because I did a transformation. So, I want to write e2 in terms of the new variable which is psi 2 and e1. I do that, right? Psi 2 is just e2 plus k1 e1, right? So, I have just written e2 in terms of the new variable, yeah? And once I do that, what do I get? I get this nice negative term in e1 minus k1 e1 squared. I already had the nice negative term in psi 2 minus k2 psi 2 squared. And I also have a mixed term, e1 psi 2, right? But I already know what to do with this. We have done this before. We use this, that 2ab less than equal to a squared plus b squared for this mixed term. So, this mixed term is basically going to become less than equal to half e1 squared plus half psi 2 squared, which is this, yeah, okay? So, instead of an equality, now I move to an inequality. That is it, all right? Because I am less than equal to is always fine. We are doing the Lyapunov analysis, right? So, I have minus k1 e1 squared minus k2 psi 2 squared and then this additional term, okay? But that is pretty straightforward. I mean, I can always use k1 to dominate the half, k2 to dominate the half and v dot is negative definite, right? This is what the entire trick of Lyapunov analysis is all about, all right? And once I do that, what happens? I know that I have v dot negative definite. What does it mean for v dot to be negative definite? It means that both e1 and psi 2 are going to 0, right? Whatever is in v, basically v is going to 0. So, whatever is in v, that is e1 and psi 2 are going to go to 0. And we have already proved that e1 psi 2 going to 0 is equivalent to saying that e1 e2 is going to go to 0, okay? So, done, okay? Now, great, excellent, yeah? We have got a strictly Lyapunov function. Why? Because v dot became strictly less than equal to 0, yeah? Unlike if I had taken e1 squared plus e2 squared by 2, instead of e1 squared plus psi 2 squared by 2, I would have landed in trouble. e1 squared plus e2 squared by 2 will only give me v dot negative semi-definite, okay? So, we have something nice here. Now, but there is a problem. In the control, yeah? Although here if you see the way this is written, it is written as theta hat, but you see it says theta hat is theta star. Basically, this is a known case, what we call as the known case. If the parameter was known, you can cancel this exactly, okay? If the parameters was completely known to you, accurately known to you, then obviously you can do this cancellation, yeah? But now we are in the adaptive framework. We do not know this parameter, okay? We know nothing about this, okay? Then what do we do, okay? So, great. So, one nice step is done. We have constructed a CLF, yeah? And this is critical for adaptive control. Without a CLF, you cannot do adaptive control, okay? Remember this, yeah? For the known case, by the way. I am not saying CLF for the entire system after adaptation and all that. I am saying if you, if the, if even when the parameters are known, you do not have a strictly appano function or a CLF for your control system, then you have a problem. You will not be able to use that to do adaptation, okay? So, even in the known case, if it is non-strict, then in the unknown case, it becomes even worse, okay? That is essentially the idea behind detectability obstacle. So, even at least for the known case system, you must have a CLF. And that is why you use backstabbing, okay? If you have a CLF in, by some other means, feel free to use it, no problem. You can guess it without doing backstabbing, no problem, yeah? If you can guess the control appano function without using backstabbing, not a problem. Absolutely feel free to use it, yeah? But more often than not, you will not be able to guess it. All right, great. So, what happens when theta star is unknown, okay? I have already sort of given a glimpse. What we do is instead of theta star, we use what is called theta hat, okay? So, this is the estimate of theta star. This is called the estimate of theta star. So, basically we try to estimate theta star, okay? We do not because we do not know the value. So, what is the best thing we can do? We try to get an estimate. This is what control folks do. What is an estimate? It is like if you have seen Kalman filtering, you have a state estimate, right? You do not have the true state, but you use some sensor data and you feed it into a filter, yeah? Probably you do not know what filter you are feeding into, whatever. But you feed it into a filter and you come up, you get out what is called an estimate of the state. It is not the true state, yeah? Because you are seeing the world through the sensors, okay? So, there is no real concept of true state, yeah? I mean, you may have a slightly more accurate state. For example, if I have a bunch of vision sensors, with which I am trying to identify my current location, my current position XYZ position, okay? And I do a pretty good job, okay? But that is still a sensor data, right? But the real, what a lot of folks who do is they would try to compare this vision process data to say GPS data or very accurate GPS data. If you have say military-grade GPS data, it will have some, you know, submillimeter accuracy and then you can compare that, yeah? With your position given by GPS with your vision-based data, okay? So, there is no real true, so all the data everything, you see the world through the data, right? Through the sensors. So, therefore, there is always an estimate involved, yeah? In the states also, in fact, yeah? Although, we do not talk about it in this course, yeah? But so, the idea is here also what we do is we create an estimate for the parameter, not for the state, but for the constant parameter, okay? This is what is the adaptive control idea, okay? This part is called adaptive estimation, but it combines with the control, so it is called the adaptive control. It shows up in the control, all right? Okay, great. So, we replace it with an estimate, we replace the true value as an estimate and then we try to figure out how to calculate the estimate, okay? Because just like in a Kalman filter, there is a particular logic by which you update the states of the Kalman filter, yeah? Comes from some kind of an optimality, right? Kalman filter is basically coming from an optimality result, yeah? So, similarly here, it is not coming from an optimality result, I can tell you. It comes from a stability result, okay? This is also an estimate, typically in deterministic systems that is where there is no probabilistic quantities coming in, estimates or observed states, sorry, actually I would say estimates come from stability requirements, yeah? Not optimality requirements, all right? Okay, great. So, what is the stability requirement? We want to drive the even e to do 0, okay? That is our stability requirement. We want to be able to track even if we do not know the true value of the parameter, okay? Great. Now what? We create a slightly modified candidate Lyapunov function for the unknown case. We already have a strictly Lyapunov function for the known system v1 plus v2. We add to it a term in the parameter error. I do not know the parameter. Best I can do is try to drive my estimate to the true parameter, right? Again, same logic by which most of control folks will work, yeah? What is this? I define this theta tilde. This is a notation that we very standardly use in adaptive control. Tilda denotes the parameter error. Theta star denotes the true value. Theta cap denotes the estimate, okay? Standard in even in nonlinear control for that matter, okay? Now we take time derivative just like we were doing earlier. What is it? v1 dot is even even even dot. So, e1, e2, v2 dot is okay. Now I have to write some terms I guess, sorry. So, if you remember, this is e1 squared by 2 plus psi 2 squared by 2, right? So, v dot, if I make this big that I can write. v dot is e1, e1 dot plus psi 2, psi 2 dot plus actually minus theta tilde theta hat dot divided by gamma. So, this gamma is some positive quantity. Gamma is just a positive scaling called the adaptation gain, okay? So, basically controls how fast you will update the parameters. That is it, okay? So, if you notice the last term had a negative here. Why? Why does the last term have a negative sign here? Yeah, theta minus theta hat and this is a constant. So, the derivative values to 0. So, this is minus theta hat dot, okay? Simple, alright? Nothing too complicated. Now I am going to write the terms, right? This is e1 dot, e1, e1 dot is e1, e2 just like before plus psi 2, psi 2 dot. Psi 2 dot was what? Theta times f x t plus u minus r double dot, yeah? And I keep the last term as it is, as it is. Now what did I choose my control as? I chose it to cancel these terms, tried to cancel this term by saying theta hat f x t, yeah? So, these two terms I can still cancel, right? If you see the control, yeah, it is this, right? So, this term will still cancel, this term will still cancel. The nice term will still appear, yeah? But this term will not cancel, right? So, what will I be left with? Correct. So, this is where the theta tilde shows up. This is basically, yeah, that is basically how I get from here too, yeah? Because the control will have a theta hat. This will bring a minus theta hat f and minus k1, k2 psi 2. So, theta minus theta hat f is theta tilde f and that is this k, okay? Yeah? Any confusion you can just do it on your own and see, yeah? So, that is it. From here I go to this step, all right? Now what? Now it is not that difficult. Now what do I do? I of course substitute for e2 because I want to write everything in terms of the new variables just like I was doing earlier, right? So, I am left with e1 psi 2 minus k1 e1 square minus k2 psi 2 square. And I do one more thing. I, you see that now this term theta and this term both are theta tilde common, right? So, I take the theta tilde common and I use this theta hat dot to cancel this. I can, if I choose theta hat dot as gamma times psi 2 f, yeah? Absolutely. That is our estimate, right? So, I have just written it here if you see. All I have done is I have taken these two terms and I have taken theta tilde common, right? And this gives me an e, and something in theta hat dot, right? What do I do? I cannot make this negative definite. Remember, I do not know theta tilde. So, I cannot give something like minus k theta tilde or anything like that because theta tilde contains the unknown. That is a parameter error. I do not know it, okay? So, the best I can do is make this 0. That is the best I can do. I will try to make this 0 because I cannot make this negative definite, right? And how do I make this 0? By this choice, okay? Yes, cannot make this negative definite in adaptive control because theta tilde is unknown. Otherwise, you will have to have a minus k theta tilde which is not allowed, right? It is an unknown. So, that is not possible. So, the best I do is I make this 0, okay? So, this is gone. And what do I have here on the right-hand side? You see I have all known quantities, right? Gamma is known to me, some adaptation gain. This is why I said it is adaptation gain because it sort of gives you a rate at which you are adapting. And then psi 2 is the second state. It is just e2 plus k1 e1. So, I am assuming that you are measuring the state. So, you know this. And then f is just some function. Equal thinking in neural networks is just basis functions, some basis functions. So, known to you obviously, even if it is time varying, it does not matter. But it is known to you, okay? So, once you have cancelled everything, you are left with what? k1 e1 square, k2 psi 2 square, e1 psi 2. Notice, v dot looks exactly like the known case. Yes, I started, I mean even though I started with a more terms in v, I ended with the same v dot. This is why starting with non-strictly appano functions will land you in trouble, okay? If only e2 was appearing here, then you will have something like this. This will be a big problem for you, okay? So, in adaptive control, the way we do it, the v dot looks exactly like the known case, okay? So, looks exactly same as known case v dot, okay? Even if you started with a additional term in v, okay? Now, what can you say about this v dot now? Definiteness? Of course, you can do this a, b less than equal to a square b square and all that, right? What about this definiteness? Negative definite? Is this v dot, is this v, so is v dot negative definite? Maybe time you guys make the same mistake. What? I added a new state, theta tilde is now a state. It is not a, right? It is a new variable there. So, v is now a function of three variables, but it contains only two in v dot. It is only negative semi-definite, okay? So, even if you started with a nice CLF with a negative definite v dot, for the known case, as soon as you move to adaptation, your v dot will become negative semi-definite. Why? Because you had more terms in the v, which are new variables, okay? Yeah, this should be very clear in your mind, okay? When you go to the adaptation, you add an adaptive control part, your v dot will become negative semi-definite and that is what I have written here, right? So, the v dot is negative semi-definite, right? So, what does this give you? As always from the Lyapunov theorem, all that you get is uniform stability, nothing more, okay? Then of course, now we are left with trying to use Babelatz lemma and so on. So, of course, you get from this step to this step also using this sum of square type of result, which we have been using regularly, all right?