 Hello. Welcome to yet another session of our NPTEL on nonlinear and adaptive control. I am Srikanth Sukumar from Systems and Control IIT, Bombay. So, we've started our week number 10 in a very interesting fashion talking about robustness in adaptive control. Robustness is a sort of rather critical issue for any nonlinear control, especially for systems such as what you see in the background, which is like a spacecraft orbiting around the Earth. Any small error or instability in your control can lead to complete deorbiting of the satellite and you might lose it forever. So, robustness is very, very key to real performance. In fact, in reality, almost nobody is, no applied engineer would be concerned about asymptotic convergence and things like that. They really look for bounded performance around an equilibrium. And that's essentially what most of the systems such as what you see in this background also do. Because it's impossible in a real system with unmodeled dynamics, with disturbances and such and actuator, inexact actuators and so on and so forth in order to achieve exact asymptotic convergence. So, such an idealized scenario is not possible. Therefore, robustness is critical. And this is the discussion that we are having on the nature of robustness that you have in nonlinear control. So, what we have seen until now is that if you have a very simple system in this case, but in general if you have a strictly appano function for a system, that is a system with V, what with V dot turns out to be negative definite in the absence of any kind of disturbance, then we can actually show that in the presence of disturbance also we have rather nice performance. And what is this nice performance? How do we specifically quantify this nice performance? The first thing we can actually see is that your V function, whenever it's outside a particular set, remember that V is always greater than 0. So, the range of V is just this, so anything below this is irrelevant. So, whenever it's inside this set, sorry, whenever it's outside this set, the function V is decreasing. And as soon as it gets into this set, anything can happen and it doesn't matter. So, that's the idea here. So, again, in this case, it can increase or decrease, but in this, sorry, in this scalar case, it has to decrease here and so on, very monotonically. But this is not generally the case for vector case, for vector situations or vector states and so on and so forth. I've shown you a more general plot. So, once it's inside, of course, it can oscillate and things like that. Here, again, I mean, you have to sort of understand that, you know, I mean, anyway, I mean, the idea is a little bit of oscillation is anyway possible because, you know, once you are inside, you can sort of overshoot here and then, you know, you can increase, go to the boundary, overshoot and things like that, all of that is possible. Yeah. So, there is an oscillation possible inside this set. Yeah. But outside this set, it is monotonically decreasing. And that's really the idea here. And the same sort of seizure of the Lyapunov function is mimicked in the performance of the error also. Yeah, the error also. The only difference being that V is related to the error with the square. So, V is E squared by 2. Forget, I mean, the scaling divided by 2 does not change too much of the property of the block. But because V is E squared, therefore, E can go positive and negative, therefore. And therefore, the sign is not captured in this plot and that's what gets captured here. So, the bound is just square root of the V bound. But it's on both sides of the zero. It's on both sides of the zero. And if the E starts outside, it again monotonically decreases because V decreases, E decreases, identical. And it gets into this set and then it is allowed to oscillate. It can oscillate. Now, the important thing to remember is that the solutions cannot escape this bound. Because if you get to the boundary and just instantaneously or immediately outside this boundary, you are supposed to move inside. Therefore, you cannot escape this boundary. Yeah, this can again, like I mentioned last time, this can be analytically proven. Yeah, so it will always remain inside this. Yeah, so this is called a residual set. Another important thing to remember is that the size of this residual set is governed by the control gain. So, it's inversely proportional to the control gain in general. Not just in this problem, but in general, it is inversely proportional to the control gain. And therefore, by increasing the control gain, you can reduce the size of the residual set. Yeah, although it's well known in control design also, then it's not advisable to arbitrarily increase the control gain. Up to a reasonable limit because increasing the control gain also increases the frequency of the control. So, maybe the control may no longer be applicable and all that jazz. But within constraints of what your system can do, you can still push up the control gain to get smaller and smaller and smaller residual sets. Yeah, so that you can get the performance of your real system. For example, the satellite to within the necessary performance bound that you want. So, this is one of the big, big powers of the Lyapunov method that as soon as you made a control design using a strict Lyapunov function, disturbance robustness came for free. Yeah, you do not have to do this and you don't have to do this analysis at all. It's for free because you had a strict Lyapunov. Now, remember the problem that we have. Yeah, in adaptive control, we almost never have a strict Lyapunov function. You may start with a strictly Lyapunov function for the known case. But as soon as you come to the adaptive control problem, the strictness of the Lyapunov function is lost. Because in V dot, in fact, the V dot that you get turns out to be exactly same as the V dot for the known case. Although in V, you had to have an additional term in the unknown parameter. So, this is, I mean, all of you remember this. Yeah, so V can never be strict in an adaptive control problem. Well, it can be strict if you have persistence of excitation and all that nice stuff, then you can create some strictly Lyapunov function for an adaptive control problem. But more often, that's not the case. More often, that's not the case. Yeah, that's why adaptive control theories do not care about parameter convergence because persistence may not be guaranteed. Therefore, you do not have strictly Lyapunov functions. It is not in the setup that we have usually seen. Okay, great. So, let's sort of work this out and look at what happens. Okay, let's look at what happens. So, for the same system, I mean, I will write the E dot equations again. So, the E dot was AX plus U minus XM dot. And now, because the A is unknown, I will use A hat X here. Of course, XM dot is still known and introduce the good control term. Okay, great. What happens? I now I have an additional term in the E dot. What's my Lyapunov function? We add a term to the Lyapunov function corresponding to the parameter error. Yeah, of course, we have to find an update law for A hat. Very simple certainty equivalence method, scalar system. All of you have done this a thousand times. Yeah, I hope by now you have. And so, I populate all the terms E times E dot minus K plus A tilde X and A tilde, A tilde dot, which is A tilde minus A hat dot. So, I have this guy. And with this, if I take A hat dot as gamma ex, this term cancels. And I'm left with the V dot is minus K e squared. Now, remember, this is negative semi definite turned out to be exactly the same as the non adaptive case. Big surprise. We already knew this was going to happen. Okay, there's always been the case. No exceptions. Excellent. Now, what happens in the presence of uncertainties? In the presence of uncertainties, your e dynamics will have plus d of t and that will propagate all through. Yeah. So, simply stated, your V dot will have minus K e squared plus e times d. Again, you will get the same V dot as the non adaptive case. Yeah. Even with the disturbance, nothing changes because I didn't change the control. I didn't change the adaptive log. I changed nothing. The only thing that changes is the Lyapunov analysis, right? Because I cannot change anything since I have no knowledge of the disturbance. So, there's no question of changing anything. All right. So, great. I have this V dot and now I continue my analysis. So, I do the same thing minus K minus half e squared plus d max squared by 2 and I get this expression. Now, notice the key difference here. I write this as e squared and not as V because this is not V anymore. In the non adaptive case, this was in fact my candidate Lyapunov function. But in this case, it's not. It's just a piece of it. Yeah. Because the candidate function also has this guy. Yeah. So, this implies V dot is less than equal to zero whenever your e is greater than this. So, this, no, no. If you look at this particular conclusion, yeah, this still seems to be the same. Okay. This still seems to be the same. Yeah. But where is the problem? There's a big problem. Yeah. I mean, problem that crashed an airplane. Yeah. So, big problem. Okay. So, let's see. What is that? Now, I do not make the, I will not be making the, actually, I don't need this to. I can make this here. Yeah. I'm no longer going to be making the V plot. I only make the e plot. This V plot is no longer corresponding to the, the V and the candidate function V and e plots are no longer corresponding. So, it doesn't make sense for me to make the plot for the V. Yeah. So, I'm just going to plot my e here and time here. Yeah. Now, I'll make the two boundaries. Right. These boundaries are basically D max. Did I get this wrong last time? Yeah. This should, I'm sorry. Yeah. This boundary last time should have been 2k minus 1. Okay. So, this should also have been 2k minus 1. 2k minus 1. Okay. So, there was a two factor missing here. Yeah. All right. So, here also this is D max. I'm going to make this bigger so I can write a little bit more easily. So, I have the same boundary if you notice and minus D max over 2k minus 1 at the same boundary. All right. Now, what happens if I look at the e plot, things seem okay. All right. Things seem okay because when an e is larger than this quantity, yeah, then e still, then when e is larger than this quantity, then v dot is still negative. Okay. Notice if e is larger than this quantity, v dot is still negative. Therefore, v has to reduce. Okay. So, if v reduces, eventually e also has to reduce because notice that v is a quadratic sum of e and e square and a tilde. So, if v goes down, down, down because v will not stop going down until e is larger than this k. Yeah. Until e is here or here, v cannot stop decreasing. Okay. It may decrease in a non-linear way or not in this case, not monotonic necessarily. Yeah. It doesn't matter if it decreases in a monotonic way or not. That is not necessarily going to be the case. Yeah. Because in this case, e beyond this requires v to be decreasing but v decreasing could also mean that this guy is decreasing and this is not for some time at least. But in the long run, this also has to decrease because the negative v remains continues to be negative when e is larger than this quantity. Okay. So, this also has to decrease. Yeah. So, logically speaking, e may start here. It could increase but eventually it has to decrease. And so, it has to go inside this set. So, great. Nice. And inside this set, of course, any oscillations are allowed. You remain within this set and all that. Why? Well, do you remain within this set? That's also a question. So, let's try to answer that question also. But you do get into this set. This residual set that we usually call the residual set. So, you do get into this set. So, let's see what happens if instead of doing this, I do hit the bump. Yeah. Now, at the boundary, again, as soon as I try to cross, what happens? v becomes negative. v becomes, sorry, v dot becomes negative. So, v has to reduce. So, very close to the boundary. As soon as you're very near the boundary, yeah, v becomes almost zero. Yeah. As you reach the boundary, v is becoming almost zero here. Right? So, as you reach the boundary here, v is becoming almost zero. Almost zero. v doesn't change anymore. So, if v doesn't change, e doesn't change. Yeah. And then, v becomes negative as soon as you try to cross it. So, therefore, this has to come back in. Okay. So, this is, again, I am talking about it in words. But I promise you, this can also be programmed. Yeah. This can also be programmed. So, this thing works. No problem. Yeah. Excellent. I mean, this is good to know. Right? I mean, I kept saying that there are so many problems. And now I find that, you know, e goes into this residual set. In fact, it looks like the size of the residual set can also be controlled similarly using the gain k. Then you guys might ask me, really, what way you are talking about? All right. So, let's come to the trouble part. Okay. Let's come to the trouble part. Now, once, as long as you are outside this set, v is decreasing. Right? v is less than, v dot is decreasing, negative. So, v is decreasing or non-increasing. So, therefore, everything here remains bounded. And because if you remember, so, this implies e a tilde remain bounded. Yeah. Then you are outside this set, e a tilde remain bounded. Right? All nice. Because why do they remain bounded? Because v dot is negative semi-definite. So, v is non-increasing. v is non-increasing than whatever value you started with. I mean, you cannot, none of the terms can go to e or a tilde cannot go to infinity. Yeah. Because if you started with finite value, you will remain in a finite value set. Excellent. So, once you, once e gets inside this residual set is when problems begin. Yeah. Because then also, anyway, inside this residual set, you know that e will never escape this set. So, it will always remain inside this set as long as you apply the control, of course. You stop applying the control, no guarantee. But if you continue to apply the control, e will remain inside this set. Okay. Great. So, the second thing that happens is that inside this set, v is not necessarily, v dot is not less than equal to 0. Okay? v dot is not less than equal to 0. Now, when, so what happens when e less than d max over square root 2k minus 1. v is greater than equal to 0. Sorry, v dot is greater than equal to 0. Correct? Just, just using this game. Okay? Now, v dot is greater than equal to 0. So, v can increase. Yeah, it can either increase or stay equal to 0. Right? v can increase. Now, the important thing to remember again, again, be very careful. e cannot increase beyond this kind. Yeah, e has to remain in this set only. Right? Because I just said that, the residual set property, it will remain inside. Okay? But v can increase. Okay? Okay? Not unintuitive. Yeah, not unintuitive. The only thing that's happening, yeah, when, when e is inside this, is it stops e from increasing beyond a certain point. e remains in this cage sort of, you know, remains in this cage. But v, because v dot is non-negative. And if v dot is non-negative, then v can increase. All right? And v can increase, but e cannot increase beyond a certain value. What does it mean? If I take these two into account, that e cannot increase beyond a certain point, but v can increase, what does it mean? It implies a tilde can increase. And there is nothing stopping it. Nothing, nothing, absolutely nothing stopping it. Because e is bounded here. And as long as e is bounded here, v dot is non, you know, non-negative. And if v dot is non-negative, v can increase. And which means a tilde can increase. Nothing stopping it. Never, never does it have to become negative definite. Because why? Why did all this happen? Because v for this, the same v for this adaptive case is not a strictly functional function. The v dot has only the e term and not the theta tilde term. Or the, sorry, or the k a tilde term. If the a tilde term was present here, this would be the same analysis as the, as the previous case and no issues. Everything would be nice and bounded. But here, as long as e remains outside, the outside that is here, everything is bounded because v dot is negative semi-definite. Therefore, v is non-increasing. So if you started with finite value, you remain in a finite value. Yeah. But as soon as e gets into this residual set, the nice cage which we made for this e, we want the e to get into this cage. Yeah. And we know that it cannot escape this cage. But we know that inside this v dot function, which contains e, becomes non-negative. Which means we can increase. The only way we can increase and e, without having e increase itself is if a tilde increases. And a tilde can increase to arbitrary values now. Yeah. Nothing stopping it. Yeah. So this means essentially that a tilde can in fact go unbounded. So what do we care? We care because it contains the, the control contains a hat. And a hat is just a tilde with a constant offset. A hat is just a tilde with some constant offset. Nothing different than that. Right. So once I have this issue, I know that if a tilde goes unbounded, I know the control goes unbounded. All right. So the issue is, although the, with this, if you implement this control, then your error will go into this nice residual set, which you can even make smaller with the increasing gain. But interestingly, you may end up needing infinite control. Yeah. And as you can imagine, no, no actuator can provide infinite control. Yeah. Until now in all our adaptive design, all the terms are bounded. No boundedness of these things was sort of a given. We didn't even have to think about it. But just in this very simple scalar case with one disturbance term added here, you see that my control can go unbounded to maintain a residual set or a bounded performance for the tracking error. And this is, you know, if nothing mind blowing. Yeah, this is if nothing mind blowing. I mean, I cannot, the first time I saw this, I was, I mean, absolutely baffled as to how I could have missed it or how is this even possible? Am I doing the calculations correctly or is my professor doing the calculations correctly? Maybe he's completely wrong. Yeah. But this is it. I mean, just a very, very simple sort of a situation, seeming situation and things become ugly. And therefore you can see why there was a big hiatus in adaptive control and with such ambitious project of implementing the controller on a fighter jet and, you know, and even with such a simple scalar problem, you know, my disturbance and with some basic disturbance, bounded disturbance, things go all right. Then you can imagine why a lot of folks would have given up adaptive control. I'm sure if some of us were there in, you know, trying to fly the fighter plane, we would have given up adaptive control ourselves and moved on to other, you know, cooler fields, you know, learning. All right. So anyway, so that's the idea. This is, this is the problem. Yeah. Simple problem is we did not have strict Lyapunov functions in adaptive control. Even if we started with a strict Lyapunov function in the known case, in the unknown parameter case, it becomes a non-strict Lyapunov. Yeah. So what are the solutions? So one of the solutions is called parameter projection. The idea here is until now we assume that we know nothing of the parameter. We don't know anything about the bounds of the parameter and such. Now, this is again not super realistic, because in a real applied engineer has a very good idea of what kind of parameters his system, his or her system would have. Yeah. So it's not unnatural. It's not unreal to assume that you do know a little bit about the parameter values. Especially if you know the bounds and the parameter values, then what we do in adaptive control is to make sure that the parameter estimates a hat remain within this pre-specified bound. Okay. And that directly tackles the problem, right? Directly tackles the problem. What is the problem in our adaptive controller that the parameter goes to infinity or can go to infinity? And it has happened. Yeah. So, and what we want to do, we want to attack this. So what do we do? Make sure that the parameter search in some sense, right? A hat is essentially searching for the right value of the parameter, right? It's an update law. But in reality, what is it doing? I mean, in fact, a lot of the early adaptive control laws are gradient descent laws, right? So essentially the A hat dot is designed in such a way. So that you just search for the true value of the parameter. Now, if I have no range for the true value of the parameter, it makes sense that I search in this range only. You know, not search everywhere. Yeah. That's what we do. You do parameter projection in adaptive control so that the A hat lies between the given bounds. Yeah. Again, no guarantees of convergence to drive value. Yeah. Doesn't matter how small your range is. Still, it does not allow the parameter to go to infinity. And therefore, you know, guarantees that you have robustness. So this is what we will look at in the upcoming session. That is how to do parameter projection. At least one way of doing parameter projection in adaptive control. There are quite a few ways, but we will look at one way, right? Excellent. So what did we look at today? We looked at the issue at hand that is, you know, how to do basically what happens when you do adaptive control on a very simple scalar system. And then there is disturbance introduced into the system that we cannot account for. Then we saw what happens to the adaptive performance. We almost stated with disbelief that and found that you can have unboundedness of the parameters and therefore unboundedness of the controller and the whole system can get ruined. Yeah. If you're not careful about implementing a robust adaptive control. So implementing an adaptive controller without some kind of robustness to disturbance can be fatal. Yeah. So obviously this is what we are going to look at in the subsequent session. So I hope you'll join me in this interesting session. Excellent. Thank you.