 Hello. Welcome to yet another session for NPTEL on non-linear and adaptive control. I am Shri Khan Sukumar from Systems and Control, IIT Bombay. We are as always in front of our very nice representative image of a rover on Mars, which is driven by algorithms that are allowed for autonomous motion of the device on extraterrestrial surfaces. And we hope to be able to learn to analyze and design algorithms that drive systems such as these towards autonomous operation. So what we have been doing until now is look at many different function properties. We started with first looking at a few function classes at the end of last week. And then based on these function classes, we defined a few different notions. The first was the notion of definiteness, which is important for talking about asymptotic stability. Then we sort of looked at the notion of radial unboundedness, which encapsulates or which sort of is going to help us conclude global stability. And finally, last in the last lecture, we looked at the properties of decrescence. In each of these lectures, of course, we also looked at examples. We also sort of looked at a few relatively easier conditions to verify the corresponding definitions. So in a few cases, the definitions themselves are not too easy to verify. And therefore, we used some easier conditions to verify these. So once we have these properties, and of course, in the end, we also saw the most basic property with this semi-definiteness. So once we have these properties sort of well understood, we are ready to state the most seminal results in non-linear control theory. And these are the Lyapunov theorems or the Lyapunov stability theorems. So that is where we want to begin our discussion today. So we are in the fourth lecture of week four. So before we state the theorems themselves, it is important that we look at a few what's the setup for the theorem and things like that. All right. So we assume that we're talking about a non-linear system of the form x dot is fdx. Of course, the time argument is being made explicitly explicit here. And the function f, which is the vector field, is allowed to depend explicitly on time and also on the state. Okay. Further, we of course assume a reasonable domain for the function f, which is some initial time to infinite time, some ball around the origin, and it maps to some Rn, because x dot has to be in Rn. And we of course have some initial condition and xd0 is x0. Now without any loss of generality like we have done so many times before, we are also going to assume that xc equal to 0 is in fact an isolated equilibrium. Okay. So in fact, we'll say isolated. We'll make that formal, that this is in fact an isolated equilibrium point. We already discussed why we will have some issues if the equilibrium is not isolated. All right. So we first assumed that 0 is an isolated equilibrium point and that is the equilibrium point which we are sort of interested in analyzing. Yeah. f is assumed to be locally Lipschitz continuous in this ball, which therefore exists, ensures the existence of a unique solution. Because without existence of a solution, there is no point in even talking about stability. If there is no solutions that exist or no unique solutions that exist, then talking about stability becomes a serious challenge. Yeah. And further, we define v dot using what is called the Lee derivative or the directional derivative. What is the idea? If you look at all these functions v that we defined, they are functions of time and some variable x. Okay. So when I take the derivative of that, I get partial of v with respect to t and partial of v with respect to x times an x dot. Now, if I substitute for x dot from this particular vector v, then it becomes what is called directional derivative. So we, for example, I can use the same construction of v to analyze many nonlinear dynamical systems. Right. However, the derivative of v will depend on which dynamical system I was choosing to analyze. Okay. And therefore, v itself is not particularly connected to any dynamical system. Yeah. So this we should keep in mind. The v construction itself is just a function of p and x. It's not necessarily connected to a particular dynamical system. It is when we take the derivative in the way we have defined here, which is also known as the directional derivative, is when we introduce the dynamics in the form of the expression for x dot right here. And that is why it is called directional derivative. That is derivative of v along 10.1 is also how we sometimes say. Yeah. So this is sometimes also denoted as derivative of v along trajectories in fact of 10.1. Okay. So this is very important. It's very key that we remember this setup that the Lyapunov or the function v that we have looked at until now to evaluate definiteness and to evaluate radial and boundedness etc. It's just merely a function of time and state x. We do not attribute any dynamics to it. When we take the derivative as per this definition here, that's when the dynamics actually filters into the equations. All right. And therefore it's called the directional derivative. Okay. So with this setup, we are in fact ready to state the Lyapunov theorems. You will see that the statements themselves are very easy. Okay. So we'll of course state them and of course start to look at examples parallely. All right. So these are called Lyapunov stability theorems. And whatever results we get using these Lyapunov stability theorems are called Lyapunov's direct method. Okay. Lyapunov's direct method. So we suppose for each one of this that there exists a function v tx which is mapping t0, infinity cross br to r. It was the same, very similar. Earlier we were using r plus here. But here we are specializing it to say that we only care about the time starting the initial time of the dynamics. Okay. So that so therefore we have a t0 here. It doesn't really bother us what happens before t0. In most cases, things will be the function itself will be nice enough before t0. But since we do not care, since our dynamical system is going to be initialized at a particular t0, so we take the domain and time as t0, infinity. This is good enough for us. The states of course are restricted to some ball around the origin. Again, this is for the local results. Now notice that the solutions are also assumed to exist in this ball only for the dynamical system. Okay. So we've consistently get the same size of the ball around the origin in which there is the solutions also exist and in which the function v is also defined. Okay. And we assume that it is positive definite. You see this notation. We've already introduced this notation. This notation implies that v is positive definite. And what do we know? We know that these two conditions together make it a candidate near function. Okay. A function which satisfies these two conditions that is, well, these two conditions in the sense, let's see. In fact, this is not complete. It should be more. I apologize. This should be. And there exists a c1 function v. Okay. So v has to be c1 at least because we are going to take derivatives of it and partial of it. So it has to be once continuously differentiable at least. So any function which has these two properties, that is, it is a c1 continuous function. Right. And it is v is positive definite. Then it is called a candidate Lyapunov function. And using a candidate Lyapunov function, only we can state the Lyapunov theorems. Okay. So once we have this candidate Lyapunov function, then once we, if we evaluate the derivative and it turns out to be negative semi definite, then the equilibrium is said to be stable. It's not said to be stable and the equilibrium is stable. It can program. Okay. And the second statement, we are just going to focus on these two statements. Okay. Very carefully. The first statement says that if v dot is negative semi definite, that is v dot is less than equal to zero, then the equilibrium is stable. Okay. The second statement says that in addition, if v dot is negative semi definite and v is decrescent, then the equilibrium zero is uniformly stable. Okay. So if v dot is negative semi definite only, then zero is stable. If v dot is semi definite and on top of that, you have v to be decrescent, then the equilibrium is said to be uniformly stable. Okay. So take a candidate Lyapunov function, which means that c1 function, which is also positive definite. And if it is negative semi definite, we have stability. If it's negative semi definite and v itself is decrescent, then we have uniform stability. Okay. So remember, when we talked about this, all these conditions, positive definiteness and so on and so forth and negative semi definite and negative definiteness decrescent, we had mentioned that decrescent is associated with uniformity. Okay. As soon as I added decrescent, I got uniformity. Okay. All right. So we want to, of course, start looking at examples right away. We want to look at examples right away. So the first one that's already written out here, you can see is x1 dot is x2, x2 dot is minus x1. Okay. So do you know what the system is? This is a simple, what is called simple harmonic oscillator. This is a simple harmonic oscillator. What does it look like in the phase plane? If I make a phase plane plot of the trajectories of the system, if I make a phase plane plot of the trajectories, yeah, then what does it look like? Make it bigger, easier to draw, looks like a bunch of circles. So the state space portrait of the system looks like a bunch of concentric circles. That is, if I start my trajectory anywhere, yeah, if I start my trajectory anywhere, I will just continue on this circle forever. I will never leave this circle. Okay. So this is what the state space trajectories look like. Right. So it looked like a nice enough benign system. So we of course want to solve, look at the stability analysis. Right. So what do I do? I pick my V as half x1 squared plus half x2 squared. So what do I know about this? I note that this is, V is positive definite, V is a c1 function. Right. It is once continuously differentiable at least. In fact, it is a smooth function. So I can differentiate it as many times as I want. It's polynomials. Right. Great. So it's already a candidate Lyapunov function because it is c1 and it is positive definite. So excellent. So I'm ready to apply my Lyapunov theorem. So what do I want to do now? I want to compute V dot. Right. So what is V dot? It is, so V is not a function of time at all. So it's only a function of state. So all I have to do is do del V, del x times x dot. Right. Which is this, in this case, x2 and minus x1. Right. So evaluating this is pretty easy. In fact, I mean, I don't do it with this formula and I don't recommend you do it with the formula either because if I just take derivative using the standard product rule, it just becomes x1 x1 dot plus x2 x2 dot. And what will I do? I will just substitute for x1 dot from here and x2 dot from here. Okay. And that's it. That's the direction and derivative. Right. Because all I'm doing is substituting from the current dynamics. And this is not difficult to see that you will get x1 times x2 plus x2 times minus x1, which is exactly zero, which is exactly zero. And therefore, it is also less than equal to zero, a negative semi-definite. Right. So we had a candidate, we have a candidate Lyapunov function, which is x1 squared plus x2 squared over 2. And we have shown that V dot is less than equal to zero. Right. So what have we shown? According to the Lyapunov theorem, we have shown that x1 x2 equal to zero, zero is stable. Okay. It's stable. Now, let's look at geometrically what's happening a little bit for this system. So we've already applied the Lyapunov theorem. Great. One version, one Lyapunov theorem, we've already been able to apply. So we've already learned to some extent, how do we apply? We start by choosing a V and we have to, of course, make sure that this is C1 at least. And it is positive definite, only then it is a candidate Lyapunov function on which a Lyapunov theorem can be applied. And then I compute V dot, instead of doing this sort of vector calculation, I simply take a product tool, I mean, just take derivatives directly here, x1 x1 dot plus x2 x2 dot. And I substitute for the derivatives from the dynamics because I'm taking the directional derivative along this dynamics. And this is zero. So you can see it's super easy. It's turned out to be very, very easy. Okay. Within a couple of simple steps, I've concluded stability in the sense of Lyapunov. Now, one thing that should be obvious to you is that this is a very simple system, because it was a simple harmonic oscillator, it's a linear system. So I can in fact solve for the dynamics. And what will be the solution? It will be just sinusoid and sines and cosines is what will be the solution. That should be obvious. If you're not convinced, I would recommend that you solve this. So sines and cosines are what will be the solution. But I can promise you, even finding and writing out the solution for this will take more number of steps than what you just did. So this was significantly simpler. And what else? We reduce the analysis to analyzing a scalar function. Okay. So geometrically, what is the relevance of this x1 squared plus x2 squared by 2? If you look at the phase plane portrait, right, that we do, again, I could not have drawn the phase plane portrait unless I could actually solve the system. I can do it numerically too. But of course, you then you, I mean, if you want to actually conclude stability from a phase plane portrait, you'll have to draw the phase plane portrait corresponding to every initial condition, which is usually not possible, which is why we rely on Lyapunov analysis. But in this case, the phase plane portrait does give us some insight, right? What is this insight? If you look at this, what are these circles? These are concentric circles. So my system is always evolving on a circle. And what's the equation of a circle? It's x1 squared plus x2 squared equal to c. There is a circle centered at the origin, and these circles are centered at the origin. Although it doesn't seem like it unfortunately from this picture, but they are centered at the origin, right? So the solutions follow the equation x1 squared plus x2 squared equal to c equal to a constant. So if I start on a circle, start at any point, I just start following a circle, all right? Now, if you look at my Lyapunov function or candidate Lyapunov function that I took, this is simply the same quantity divided by 2. This guy is just this divided by 2. So just a scaled version of this, okay? And therefore it makes sense that when I took the derivative along the system, it came out to be zero because all my trajectories always lie on a circle. And therefore x1 squared plus x2 squared at each point in time is always the same constant. And therefore, if I take the derivative here, if I do d dt here, then I do d dt here, and this is just zero, right? Therefore, v dot coming out to be zero is no magic, okay? Coming out to be zero is not really magical or anything, okay? So this is actually somehow the energy of the system that I have encapsulated in this v, yeah? And so therefore, this is coming out to be a stable system, excellent. So I can conclude the same thing again using, like I said, solving the system, but this is significantly simpler, all right? Okay, let's go forward and look at, you know, another example. This is just a slightly twisted version of this where I've included some time dependence, okay? Where I've included some time dependence. Now, the question is, can we actually find an appropriate Lyapunov function is the sort of the first question, okay? It's sort of the first question. May or may not be easy, even I don't know if we can do that. So let me see, okay? So this is one of the sort of issues that everybody deals with, is that an appropriate choice of Lyapunov candidate Lyapunov function must be chosen? And whether this is possible always is not very clear. It is not very clear. Unfortunately, it's not too clear, okay? So, yeah, that's what it is, all right? So let me see if I can actually choose an appropriate Lyapunov function, right? In this case, it's obvious that if I choose v as my earlier one, if I choose v as x1 squared by 2 plus x2 squared by 2, I have a problem because this is x1 x1 dot plus x2 x2 dot. And this is x1 x2 minus x2 x1 divided by t plus 1, okay? So these don't cancel out anymore, right? These don't cancel out anymore. And that sort of results in a problem. Okay. So let's see if we can do something else. In fact, maybe I will not be able to do something for this case. I'm going to slightly change this example to this. Suppose I change this example to this. In this case, anyway, nothing worked out. So suppose I will erase this guy. So this is not a good enough choice. Yeah. So let me see it. Is this something for which I can find a Lyapunov function? See, I'm already starting to struggle a lot, you see? So I don't think even this will help me because suppose now I do something like I choose 1 plus t x1 squared by 2 plus x2 squared by 2, okay? Then what happens is I get x1 x1 dot plus x1 squared by 2 plus x2 x2 dot, right? I got this second term here. This was, I'm sorry, wait a second. I think I missed something here. I think I missed something here. This should be 1 plus t still has to be multiplied here. So the first term here is obtained by taking the derivative of this x1 squared. The second term here is obtained by taking the derivative of this guy, all right? All right? And the third term is of course the derivative of this. Now if I substitute right now, if I substitute for my dynamics, I will get x1 x2 and get 1 plus t x1 x2 plus x1 squared by 2 minus x1 x2 divided by 1 plus t, okay? Okay? Okay, I don't think this worked at all. Apologize. This is wrong. This is not what I wanted. I wanted it to be, I apologize for that. I wanted it to be half x1 squared plus the other way around, actually 1 plus t x2 squared. I'm sorry, I wrote it the other way around. And if I try this, this is x1 x1 dot plus 1 plus t x2 x2 dot plus x2 squared divided by 2, okay? And now if I substitute here, I get x1 x2 from the first term from this guy. Then I get plus 1 plus t x2 times minus x1 over 1 plus t plus x2 squared over 2, okay? So something nice does happen. This 1 plus t cancels out here. And therefore, this guy cancels in this guy. This is why I chose something like this. But then something really bad also happens because I end up with x2 squared by 2. I end up with x2 squared by 2, right? This is not nice to say the least, right? This is not nice to say the least, right? So this is where things can get wiry, right? It's not that easy. Now the question is, is this actually a stable system? Is this an actually a stable system or not? In this case, finding the solution is also not going to be very easy, okay? So now, see, what has happened is that this is not, it's in fact, in fact, it turns out that I'm sorry, I wasn't careful here. I should say implies v dot is equal to, so v dot is equal to, v dot is equal to, in fact, this turns out to be positive semi-definite, right? And this is not good at all because if you notice all the Lyapunov theorems rely on v dot being negative semi-definite or negative definite, okay? We do not want v dot to be positive definite or positive semi-definite at all, okay? So what's the outcome? The outcome is we don't know, cannot conclude on stability yet, yeah? This is one of the issues with the Lyapunov functions, right? So we should be aware of it from the get go, right? Just because I chose a function v, in fact, it was the second choice, just because I chose a function v and I found a v dot which did not satisfy the nice properties that I wanted, does not imply that the system is not stable or asymptotically stable, yeah? It may just be the case that I was not good enough at selecting the Lyapunov function, okay? So the Lyapunov function is still a hunt. You have to be able to find the appropriate Lyapunov function, okay? You have to be able to find the appropriate Lyapunov function and that is still a hunt and that's why I sometimes say it's actually Lyapunov art, yeah? So it's an art to finding the Lyapunov function. Anyway, so what we looked at today was the beginning of our Lyapunov theorems, right? We saw the theorem on stability and uniform stability. They read very, very simple. That's what we've noticed. And we have tried to work out some examples. We've in fact failed in finding an appropriate candidate Lyapunov function for a very seemingly simple looking system, right? And so we will continue in this way. We'll try to construct Lyapunov functions. We try to conclude something about the stability for systems such as this, okay? So that's going to be the plan subsequently also that we're going to look at a few more examples and also continue the current example, all right? That's it folks. See you again. Thanks.