 Hello everyone. Welcome to yet another session of our NPTEL on nonlinear and adaptive control. I am Shrekan Sukumar from Systems and Control IIT Bombay. So we are already into the 10th week of our lectures on nonlinear and adaptive control. And we've already learned several algorithms that will help drive systems such as the SpaceX satellite that we see in the background autonomously. In the previous week, of course, we learned tuning functions method and we've spent a few weeks on adaptive integrator backstipping based methods. And I am quite certain that a lot of practical systems that all of you would have in mind do fall under the category of systems that for which adaptive algorithms can be designed using these methods. So I would strongly encourage all of you to give it a shot and try to formulate your problem and design adaptive controllers for systems using these methods that we have studied. In this week, we started talking about the robustness issue in adaptive control. We got a pretty fair idea of what happens in the absence of disturbance and the fact that any Lyapunov based control design, any strictly Lyapunov based control design to be specific, gives us this very nice disturbance robustness property. So essentially what you will get is a convergence to a residual set. Let's look something like this picture here. And we can also reduce the size of the residual set by increasing the control point. However, we saw that the same does not hold true when an adaptive controller is introduced. All right. What happens in that case is that you can show that your errors to get into a residual set, which is still nice. It does look like by changing the control gain, you can in fact reduce the size of the residual set. So both of these are of course very nice properties that we retain. However, the problem that happens is that this boundedness of E does not actually guarantee the boundedness of H tilde. In fact, it can so happen that once E has entered this nice residual set, your V dot becomes non-negative. And therefore, V can increase. And if E cannot increase beyond a certain point, and if V has to continue to increase, the only possibility is that A tilde keeps increasing. And if A tilde increases, it means that the parameter errors and the parameter estimates themselves can go to infinity. And since this parameter estimate enters the control expression, your control will also become unbounded. And this is one of the most, most undesirable properties of adaptive control. And this is one of those reasons which really restricted the growth of adaptive control in the 80s. And 90s of course. And so what we want to know is how to get rid of this explosion of parameter value issue. One of the things that's sort of an obvious sort of answer or obvious solution to this problem is that if you know some bounds on your parameters value, parameter values, you want to make sure that you search only within these bounds. Therefore, your estimates just evolve in between these bounds. And the process of doing this kind of an adaptation is called parameter projection in adaptive control. So again, there are several ways of doing parameter projection in adaptive control. And we will focus on one particular way right now. And that's where we start today. So let me mark this as lecture 10.3. In fact, I want to see that I marked last time. I marked here, but I forgot to mark last time. So I am going to mark this as lecture 10.2. And today we are at lecture 10.3. So what is parameter projection? What we are looking at is for smooth projection. There is also a non-smooth version, which we are not looking at right now. But yes, a non-smooth version also exists. So we are looking at smooth projection. This ensures that the parameters remain bounded within pre-specified parameter bounds. These bounds, amen and amax, have to be provided by the end user. So it's expected that the end user does have some knowledge of these unknown parameters. And once we ensure using some smooth projection algorithm that your parameter estimates remain bounded, then the control itself also remains bounded. All right, excellent. So as usual, what we do is we look at this dynamical system. x dot is ax plus u, where a is unknown. And what we want to do as always is to track a reference trajectory, which is nice, smooth, bounded, infinity, differentiable, and all that nice stuff. All right. So then we compute the dynamics of e dot, which is just a x plus u minus r dot. We sort of do a little bit of reshuffling of terms. And the, you know, introduce the nice negative to k term here and add the k term here. And this entire quantity, which is a known quantity because I will specify the control is now denoted as v. Yeah, so this entire thing is denoted as a new term v or new control v, if you may. Now, how we implement projection is using tan hyperbolic functions. Okay. So how do we do that? The unknown quantity a, we claim can always be written as this sort of an expression. Okay. That is, it is a min plus one half a max minus a min one minus tan hyperbolic five star. Okay. Now, what we want to do, what we are desired, what we are going to do is to move from looking at a as the parameter. To looking at five star as the parameter. Okay. So if you see this expression on the right hand side, the only unknown is the five star. Right. And the left hand side is of course the unknown a. So what we have done is we move the unknown a to an unknown five star, which is inside a tan hyperbolic function. So let's look at why this is making sense. Yeah. The first thing is that the tan hyperbolic function varies from minus one to one for all real numbers. Okay. What does it mean? It means that this quantity lies between zero to two. Okay. Zero to two. So what happens at zero? At zero, you have the right hand side a as equal to a min. And when you are at two, you get a equals a max. This is rather easy to verify. Right. You put zero here. You just have a min. If you put two here, this gets cancelled with this and this gets cancelled with this. All right. So essentially what does it mean? It means that at, you know, at one edge of the spectrum at one edge, you know, at one end, when five star tan five star tan hyperbolic five star takes value one, you have a min as the value of a and when tan hyperbolic five star takes the value minus one. You have a is a max. Right. Therefore, by scanning five star, so the five star is of course belonging to all of real numbers. So just by scanning in all of real numbers, I go only between a min to a max. Right. So this is what is projection. All right. So because if you notice, if I make a picture or something like this, so the five star, yeah, is, yeah, the five star is sort of, yeah, so the five star is ranging from all of, yeah, all of real numbers. So this is where is five star and this is ranging from a min, a max. This is where is a. All right. So even though I vary five star from minus infinity to infinity. Yeah. I'm going to remain only within a min and a max. Okay. So this is the projection. Right. So this is the projection. I hope you understand. So this is the smooth projection using this tan hyperbolic function. The five star ranges from minus infinity to infinity. That is my search domain. But once I do the projection, it is actually finding two value of parameters only between a min and a max and notice that this is what gets implemented or a hat is what gets implemented. So you never have to worry about what the value of five star is because once it's plugged inside the tan hyperbolic, it ranges between minus one to one. So you get a bounded quantity between a min and a max. Yeah. The right hand side. Okay. Excellent. So time hyperbolic z lies between minus one to one. It is zero exactly zero. If and only if z is zero. Yeah. So and time hyperbolic z is actually this expression. Yeah. So if you see, when do you get time hyperbolic equal to one is when, let's see, you'll get tan hyperbolic equal to one when you have z going to infinity. Right. You and you have said going to infinity and you'll get it as minus one when you have said going to minus infinity, then because in that event that goes to infinity, these two are zero. So these two become one. And when that goes to minus infinity, these two are minus one. Yeah. And so these two are zero. So this becomes minus one. All right. Now what happens at z equal to zero, the numerator is zero. So therefore you get a zero. Right. So the picture of the, you know, the tan hyperbolic function, if you may look something like this. So the tan hyperbolic function. Sorry. So this is so this is basically one and minus one and the tan hyperbolic function looks something like look something like this. All right. So the tan hyperbolic function looks something like this. Yeah. Okay. I hope that makes sense. So this is essentially the projection. Okay. So this is the key part here. So remember the fact the five star being the parameter that we're trying will try to identify actually helps us to do protection because we adapt for five star. So we create a five hat. All right. But then we implement a hat in the controller. Right. Not a, not five hat. Right. So the control always contains the a hat. And that's all we care about. Okay. So let's look at the adaptive problem. So this is the definition of a it should not be difficult to see that if a does like between a minute and max, there exists such a five star. Yeah. Because this tan hyperbolic takes every value from minus one to one. So obviously you cannot miss a. Yeah. So there does exist a five star such that a satisfies this instruction. Right. So before we move on, so this is becomes a dynamics. Right. This becomes a dynamic because you redefine the control. Okay. So before we move on, we define some filtered variables. All right. There is a very particular unique value to these filtered variables. This is follows and I mean falls under the purview of what is called non-certainty equivalence. Yeah. You will see why very soon. You will see why very soon. Yeah. But before that we define these filtered variables. This is not very uncommon. Slotting also use these filter variables a long time ago. But here the purpose is different. Okay. So what do we do? We look at the dynamics. How do we create filtered variables is the important question. What do we create filtered variables for is the important question. We create filtered variables of all the terms we all the known terms on the right hand side. So the known terms are e, z and x. Right. So a is the unknown. So we create filtered variables are e, z and x because all three are known quantities because it doesn't make any sense to filter unknown quantities since these filtered quantities we get used in actual control implementation and you know you can't if you don't know that. All right. So you cannot filter a quantity which is unknown. Right. So therefore I create a filter for e, v and x and the filters are very straight filter. It's a standard low pass type filter. Basically it is like e f dot is minus beta e f plus e. For the same beta you create three filters v f dot is minus beta v f plus v except dot is minus beta x of plus x. And the initial conditions are chosen to be arbitrary. Right. We don't worry about we don't have to worry about what the initial conditions are. Now what do we do? I want to sort of establish a relationship between the original variables and their dynamics which is this and the filtered variables and their dynamics. All right. In order to do this what I do is I take this first equation and I take a derivative on both sides. Right. So that's it. I take the first equation and I've taken derivative on both sides. On the left hand side I get a second derivative e f double dot. And on the right hand side I get minus beta e f dot plus e dot. And I get an e dot. Why did I take the derivative of this term only because it brings in the e dot. And then once I have the e dot I can substitute from here. And that's what is happening. Right. This is essentially that e f double dot is minus beta e f dot plus e dot. So this is the entire thing is plus e dot. Okay. Great. So once I have these what I want to do is I want to write everything in terms of the filtered quantities. Right. So I want to write e in terms of filtered quantities, z in terms of filtered quantities and x in terms of the filtered quantities. Right. So what do I know? I know that e is e f dot plus beta e f. V is e f dot plus beta e f. And x is x f dot plus beta e f. And this is what we substitute here. Here. So e is written as e f dot plus beta e f. V is written as v f dot plus beta v f. X is written as x f dot plus beta x f. All right. Then what I do is I take the higher derivatives on one side. So e f double dot was already on the left hand side. Okay. E f dot was already on the left hand side. And then the v f dot plus a x f dot is taken here. Right. And then k e f dot is also taken here. Okay. So basically or to put it simply all the beta terms, beta containing terms are kept on the right hand side and all the rest of the terms are brought to the left hand side. Okay. So all the terms on the right hand side are scaled by beta. Just e f dot from here. E f k from here. V f from here. And a x f from here. Okay. Just checking if the signs are correct. Minus beta e f dot. I am just checking if the signs are correct. I am starting. I am not sure. Let us see. E f double dot plus k e f dot plus v f dot plus a x f dot. Okay. And on the right hand side I have beta k e f sure. Minus minus beta v f correct plus a x f. So this is not correct. It doesn't seem correct. And this sign doesn't seem correct. And this sign doesn't seem correct. I need to verify this. So beta e f dot is same. Minus k e f dot plus beta e f plus v f dot plus beta e f plus a x f dot plus beta x f. All this is good. Then what goes to the left hand side? E f double dot plus k e f dot minus v f dot minus a x f dot. All right. Great. So what I have is minus beta e f dot plus k e f minus v f minus a x f. So this was correct. This was correct. Okay. Great. So this is fine. So now what you notice is something rather interesting. So this expression is correct. Absolutely right. All I have done is in this guy right here I have taken the terms with the beta on the right hand side and the terms without the beta scaling on the left hand side. That's all. All right. Now if you look at this very carefully and I choose sigma to be whatever is in the bracket here, that is e f dot plus k e f minus v f plus x a x f. If I do that, I notice that the left hand side is just sigma dot. Okay. So the equation that we get is that sigma dot is minus beta sigma. And what do we know from here? It means that sigma is exponentially decaying, right? Which implies not just sigma goes to zero. It implies that sigma t equals sigma zero into the power minus beta t. All right. So this is rather cool. Essentially means that this quantity sigma is going to zero as t goes to infinity. Now it's very well known in control that the exponentially decaying term do not affect the stability. All right. So we can ignore the sigma equal to sigma zero into the power minus beta t type of term in this equation. So what we know is that we can just assign this to zero. We can simply assign this to zero because this is simply an exponentially decaying term that can be ignored. I mean, I can very be very careful and write this as sigma zero e minus beta t, but that's not required. It doesn't affect our stability analysis at all. All right. And that's the key point. So we ignore this term. So which means we put this to zero. And if you do put this to zero, you will notice that you will get the equation from here as e f dot is minus k e f plus v f plus a x f. Now notice very carefully. I'm going to make this smaller so we can see both of them together. If you look at this equation, I apologize. Look at this equation and this equation simultaneously. We notice that they look exactly the same. Modulo the fielded variables in place of the original variables. All right. So this is very, very critical. Yeah. So this original dynamics and the filtered dynamics are precisely the same except for the filtered variables appearing in place of the original variables. And this is what is the magic of this kind of a filter construction. Right. So this is sort of a nice neat outcome happened because of the filter construct and you want these to have the same structure. All right. We want these to have the same structure. And so what we do is now in this filtered state, we prescribe our control. Yeah. Notice that this is already a stable system. So all I want to do is sort of get rid of this. Yeah. But the problem is I don't know a so I cannot really implement a. So I implement an a hat. Okay. Now a hat is just a placeholder. It means it's just a symbol. Yeah. To define this guy. Now this is where your non-certainty equivalence becomes very apparent. So I'm going to mark this as non-certainty equivalence. Okay. So you see that the expression is very identical to what we had for the original system or for the actual a. If you see the actual expression is something like this, a max minus a min by 2 1 minus tan hyperbolic phi star plus a. That's the expression plus a min. So in place of this thing, we can have tan hyperbolic phi hat plus delta hat. Okay. So in general, you expect that phi will get phi star will get replaced just by a single phi hat, but it doesn't in this case, it is replaced by a phi hat and also by a delta hat. So two terms. Okay. Not to estimate something, but just two different terms. All right. And this is what makes it non-certainty equal. Exactly following certainty equivalence principle. But the idea is the overall expression is exactly the same. Yeah. Whatever the phi hat plus delta hat, this a hat is going to lie between. So a hat is definitely going to lie between a min and a max. This is guaranteed. Yeah. By virtue of the property of the tan hyperbolic that it lies between minus one to one negative of what the argument is. All right. So you're bound to lie between a min and a max. And this is what we want. And this is essentially projection. Okay. Although we are trying, we're going to try to update phi hat. That is whatever is inside between in all of real numbers. There's no bound on that. But what we can do is we create a bound or what we want to do is create a bound on a hat and we do have it. Okay. Whatever be phi hat and delta hat, which we use specified subsequently. Yeah. Your estimate a hat given by this formula. And which is what actually shows up in the control is bounded. Yeah. So it doesn't happen. It doesn't matter what happens to read or negative definite positive definite and all that. As soon as I have this kind of an expression, I'm guaranteed to have vf to be bounded. Yeah. And if vf is bounded, it's not difficult to see that we will also be bounded because vf is just v is just vf dot. Okay. So everything is going to be nice and bounded. Just like you want it. You will not get unbounded controls and so on and so forth. All right. Excellent. Excellent. So what did we talk about today? We sort of started talking about the parameter projection method for adaptive control. So what it entails is, first of all, of course, knowledge of bound. And secondly, we try to do what is called smooth projection. And this smooth projection is really implemented using tan hyperbolic functions, which are essentially saturation functions of a kind and lie between minus one to one for all possible value of the arguments. Therefore, we redefine our parameter in terms of tan hyperbolic of a argument, of an estimate phi. Yeah. And this phi is what we try to estimate later on. So we actually propose an update of a phi hat. Okay. And because of this, what happens is that your actual estimate a hat that enters the control law remains bounded. Yeah. Due to this projection and therefore, robustness issue is completely resolved because this is what happens when you introduce a disturbance that the parameters start to fluctuate or can start to grow really large and unbounded. But in this case, it is simply impossible because we are guaranteed by construction that a hat remains bounded. All right. So all of this, of course, implemented using filtered variables and the version of non-certainty equivalence. And so in the subsequent sessions, we will see how this non-certainty equivalence method gets implemented and how do you do the Lyapunov analysis for the sake. All right. So I hope you enjoyed this session and I definitely hope to see you all in the next one. Thank you.