 We have seen a few examples already. So, this is one very relevant example. Can anybody recognize this system? Do you know what this system is? What is what is this dynamics of? Yeah, this is a damp pendulum. Standard pendulum that we will see invariably they are damped right, there is friction at the joint. So, I cheated because otherwise I would have to do hard work like this to prove good things ok. I would have to construct functions like these and all yeah that is why I have introduced another term here right. If you see typically a pendulum will have dynamics x 1 dot is x 2, x 2 dot is minus sign x 1 minus x 2. So, it is a non-linear oscillator actually it is a non-linear oscillator. So, but I have introduced this minus sign x 1 yeah because it will make my analysis simpler yeah otherwise basically it becomes complicated to follow. I mean I can do the analysis, but you will just say why are we talking about such complicated things in class which you cannot follow that is more of an assignment thing that you can try alright. So, what is the Lyapunov candidate in this case is this guy. Anybody recognize what this is? Anyway what is this? For the pendulum system what do you think this is? This function 1 minus cosine x 1 plus half x 2 square energy exactly just think pendulum x 1 is this theta angle. So, 1 minus cos x 1 is the potential energy and half x 2 square is the kinetic energy x 1 is theta x 2 is theta dot. So, theta dot square half gives you the kinetic energy and 1 minus cosine x 1 because cosine theta gives you the potential energy exactly the energy of the system. So, do not look at me funny how did you come up with this and how will we do this in the test? This is the energy of the system in this case alright. The more complicated thing is to discuss the definiteness of this. It is I hope it is evident to you that this becomes negative does this become negative? No does not become negative. So, one thing is evident it is 0 at 0 yeah x 1 0 x 2 0 this is 0 good thing yeah because 0 0 equilibrium is what we are thinking about yeah this is the equilibrium the downward equilibrium is what we are interested in great. Now what happens if I take x 1 to be arbitrary is that notice how do we check for positive definiteness? We check where it becomes 0 and if any of those points are non-zero states then we have a problem ok. So, this becomes 0 whenever 1 minus cosine x 1 becomes 0 and 1 minus cosine x 1 will become 0 at all 2 and pi all 2 and pi 1 minus cosine x 1 will become 0. So, for the simpler case at x 1 equal to 2 pi which is this position this is theta equal to 0 this is theta equal to no not this position right coming back to this position yeah. So, see this is another thing about using Lyapunov functions and working in Euclidean space actually the system is not in really Euclidean space yeah because this is an angle yeah it is just when you say 2 pi physically it is the same configuration, but the Lyapunov function and the system does not recognize all this ok does not recognize that this is not the same configuration. So, when I look at x 1 equal to 2 pi this is still 0. So, for all states of the form 2 and pi comma 0 this is 0. So, this is not positive definite globally yeah like Vidya Sagar likes to say LTDF and PDF this is not PDF this is only LTDF that is locally positive definite actually we have only defined locally positive definite. So, now this is the case where we have to define a BR a ball of radius R around the equilibrium what is the ball of radius R we want x 1 to lie between this and x 2 can be anything ok this is a funny looking ball not a ball at all, but I hope you understand there is something local about this yeah in one axis if you draw it it is like in one axis it is only this much and in x 2 axis it can go anywhere this cylinder actually cannot go further here. So, minus pi and pi here, but in x 2 you can do whatever this is x 1 ok if you are not comfortable with this cylinder you can take x 2 to in inside whatever minus R to R and you are fine you can actually make a ball yeah if this makes you uncomfortable this is fine too ok. So, inside this region minus pi cross pi minus pi comma pi cross R notice the end points are not allowed yeah the important thing to remember whenever I make this is that the equilibrium you are interested in should be within this. So, I mean none of you asked me, but this was also a valid choice right this is a valid choice for when this is positive definite 0 is not included ok. So, this is the sort of a problem yeah and of course, so this is not ok. So, therefore, minus pi to pi is the only reasonable choice you can think about it yeah and remember whenever we make neighborhoods or balls they have to be open sets we discuss this I hope you keep this in mind. Therefore, this has to be open can just say 0 comma 2 pi can be could be SNA not like that. So, it can be 0 comma 2 pi open close or anything like that has to be open at both ends has to be an open set basically. So, this you will see that this is the only reasonable choice because inside this set 0 is the only point where V is easy V is going to be 0 and everywhere else it is going to be strictly positive ok alright great. So, once you verified this fact this is the only problematic thing you can see it is already decrescent it is free because there is no time argument in V. So, V is already decrescent for free you do not have to do any special work there. Now, if I compute V dot as always I will get sin x1 x1 dot from here and x2 x2 dot from here ok. Now, I substitute for x1 dot. So, sin x1 and x1 dot I substitute here and x2 x2 dot I substitute here alright. Again not doing anything too complicated I am simply substituting the derivatives in this case because I have made a hack everything turns out to be nice we will see we will see. Now, if you see this term and this term cancels out yes alright. So, I am left with minus sin squared x1 minus x2 squared yes minus sin squared x1 minus x2 squared both are square terms. So, already I am feeling good yeah alright and now if I look at now I have to test the negative definiteness by the way my domain is fixed I cannot change this now just for V dot I cannot come up with a different one I am restricted to the same BR whatever that R is. So, in this case I have chosen this open set yeah. So, I have to stick with this I know that this is always a negative definite term no problem where can this guy be 0 at x1 equal to n pi x1 equal to n pi ok. So, the only possible candidate within this set is 0 itself yeah because minus pi and pi are not in the set alright. So, this guy is exactly 0 only when x1 and x2 are exactly 0 not 0 anywhere else ok. So, I really hope you are able to capture these subtle points here very subtle, but very key if you miss this your analysis is wrong if you do not give me this minus pi cos comma pi set you cannot prove anything at all that is completely wrong. And if somehow these terms come out so that in this minus pi pi set there are multiple places where this is 0 that is also a problem if something like let us see divided by two kind of a thing happened then what would happen suppose I ask you just to test now what the analysis will go through will it go through good point will it even go through this will become sin x1 by 2 times half there will be a half here and x2 x2 dot will be half here half here half here and a half here this will also have a half now what happens analysis will not go through because of the this term but I can always cheat I like doing that. So, I will make this half ok I just played with the I made things half so that analysis will go through I have just changed the dynamics a little bit there is minus sin x1 by 2 now ok. So, the analysis will go through I can promise you with this dynamics now now what about positive definiteness and so on where is it positive definite now what is the BR all I need is the ball BR what will it be minus 2 pi to 2 pi how are you computing it so you want 1 minus cosine x1 by 2 to be 0 you are looking at where that is 0. So, you want cosine x1 by 2 to be 1 ok where is that x1 by 2 has to be what 2 and pi 2 and pi is that correct ok so 4 4 and pi 4 and pi ok. So, or if you think of it as it will be if you think of it as plus minus then it is plus minus 2 pi. So, basically this set will become minus 2 pi to 2 pi ok. So, this analysis is sort of expanding things ok expanding where you can work with minus 2 pi to 2 pi which is more or less going to cover everything I guess minus 2 pi to 2 pi will have 0 also and will also have pi ok funny. So, this makes it nicer actually if I do x1 by 2. So, if it so happened that your harmonic oscillator had x1 by 2 instead of x1 then this pi thing. So, the pi thing will not be an equilibrium at all right if you look at the equilibrium of this guy ok. What is the equilibrium x2 equal to 0 is an equilibrium and sin x1 by 2 is an equilibrium has to be sin x1 by 2 equal to 0 is an equilibrium. So, either x1 has to be 0 or x1 has to be 2 pi which is the same as 0. So, if I modified this pendulum equation in this way then this inverted position is not an equilibrium at all. It is only this position and this position ok. Is that clear? Just by making x1 to be x1 by 2 ok I am going to erase this sorry alright. It was just to minus pi to pi will still work the only thing is you have yeah I was I was expecting a more shorter more constricted region turned out to be the other way around. But minus pi to pi will still work the only thing is you have given a smaller range right. I mean see whenever you talk about locals when you say that it is stable asymptotically stable in this case it turns out to be asymptotically stable right. Of course, it is not global remember non-linear system not global in fact in this case pi is also an equilibrium I remember I told you if you have multiple equilibria then global is not possible just like in optimization. So, it is fine but whenever you give local results it is you want to give as large a region as possible not the smallest one or not anyone you try to get the largest one ok alright. Now there is another example here anyway. So, this is but before that I want to you to remember that there is also notions of converse Lyapunov theorems which essentially says that there exists a Lyapunov function for every stable system ok. So, remember in these Lyapunov theorems I mentioned that this is a candidate Lyapunov function. Once this candidate Lyapunov function satisfies any one of these results then it is called a Lyapunov function ok. So, this is a candidate satisfying any of these it becomes a Lyapunov function ok. So, what does the converse Lyapunov theorem typically says it says that if it is if the equilibrium is stable then there exists some v t x positive definite c 1 such that the Lyapunov theorem is satisfied ok. So, there do exist converse Lyapunov theorem the problem is they are not constructive it is not that the using the theorem you will be able to construct a Lyapunov function yeah. So, it is as good as I mean it is a nice mathematical result but it is not going to help you construct anything ok. So, actually so you can think of it as an if and only if condition the problem is you will never be able to get a v out of this converse. So, therefore, you are still left with trying to hunt for the best Lyapunov candidate possible ok. Any questions? Yes, yes. What will leave the minus pi to pi bound? Yes, absolutely it is a very good point. So, whenever I remember whenever I give this ball of region R ball of size R or whatever domain I give you yeah or the domain you come up with to ensure positive definiteness of this v and so on and so forth yeah. You implicitly assume that your system trajectories always remain within this ball ok. This is an implicit assumption it is not being given to you for free or anything like that. So, yes those are not allowed those are excluded ok. So, yes if you want you can make this R to be something smaller yeah, but then that will depend on I mean you can understand right. I cannot solve this system to actually come up with that R would be virtually impossible I mean this is the simplest non-linear system, but you know if you get to even little bit more you still definitely would not be able to solve to get such an R. So, it is an implicit assumption that this R is there, but then again in a lot of these cases just like here if this was any Br yeah all these results would go through because the second term has no impact on definiteness. So, for any bound you choose on your theta dot the results will go through. So, it is sort of you know you will still get your stability is what I am saying, but yes I do agree that you will get out of this, but one of the other things that I would like to also say is that I am not missing anything here right by doing minus pi and pi, pi is the only one that I am missing and there is no choice, but to miss pi remember without missing pi I am including the other equilibrium in my analysis there is no way you will be able to prove even stability after that because now your domain contains both equilibrium yeah. So, missing pi is not a choice yeah I am very carefully missing pi here. So, that this equilibrium does not because you know for sure that if I start at this equilibrium and there is no disturbance or anything yeah, then it is never coming back here it is staying here. So, therefore, no question of stability right. So, therefore, this is a problem point and so I have to have to have to miss that point. So, yeah if your velocity makes you go through it then you have to hunt for what we call semi global type of results yeah which will essentially say that okay you sort of you will not actually stay there because there is disturbance and even if you are arbitrarily away from it you will fall back and so on and so we say things like that yeah, but yeah that is also an important point okay alright anything else alright folks we will stop here thank you.