 Hello, welcome to yet another session of our NPTEL on non-linear and adaptive control. I am Srikanth Sukumar from Systems and Control IIT Bombay. So we have this very nice motivating image in the background. This is of this nice SpaceX satellite which is orbiting the earth and we are sort of moving towards designing algorithms which will help drive systems such as these autonomous. So we are going into the sixth week of this course and sort of with a halfway mark if you may. And we have already started to look at design elements. So we have already started to see how to design adaptive controllers for a first order scalar system. And that's what we have been doing. So last time we had already done the design in the session before last and we had essentially arrived at a point where we had a negative semi-definite V dot for the unknown parameter case. So we had a control log, we had a control log we had designed and we also had an update log for the parameter for the unknown parameter. All right. So the control of course depended on this unknown parameter update. All right. So with this when we analyzed the system using this Lyapunov function that we constructed, in fact the update log was obtained using the set Lyapunov function and we got a negative semi-definite V dot. And what we did last time was to start from this one, this V dot and use the signal chasing in Babalat's lemma method of analysis which we had learned sort of in the analysis part of the course in the first few weeks. Right. And we use this V and V dot in order to prove that well we had already proved that we have uniform stability for the states which are the error that is the tracking error and also for the parameter estimation error. All right. So what we wanted to do next was to prove that the tracking errors go to zero, converge to zero. So we already had a stability design. We wanted to sort of obtain a convergence result because stability is not enough. Right. So that's what we did. We were able to prove in fact here. Yeah. Okay. From step number four if you see we were able to prove that the error goes to zero as t goes to infinity. Right. So in spite of the fact that we don't know a parameter of the system, we were able to show that we can do accurate tracking just by adding a parameter update. And so this is the magic of adaptive control. This is what we did. Excellent. So I hope you sort of would see that there is this rather cool element in adaptive control. Right. So now beyond that we of course want to see if the other state which is the parameter error can also be driven to zero. All right. And we tried to do that. But honestly we were not successful because we reached a point where we said that we found that the product of theta tilde in this function f goes to zero as t goes to infinity. All right. Now if you sort of have something very simplistic thing and so this is where we start let's say lecture 6.4 we're going to mark it here. All right. And you sort of look at this and then if you can make a very simplistic sort of assumption which is probably not a very viable assumption to be honest and take you why very simple. Right. So if we assume that f let's see limit as t goes to infinity f x t t is equal to zero is not equal to zero. Okay. It's not equal to zero. Then there is hope. Okay. Then there is hope that theta tilde doesn't actually goes to zero. Then can hope theta tilde goes to zero. All right. Which is also not a guarantee. Yeah. I mean so this is a rather complicated thing to talk about because we're talking about things converging to zero and I mean as t goes to infinity and things like that. So we're talking about objects in the limit. Yeah. Now this itself may not be a very very viable assumption in all scenarios. Yeah. It may be in the tracking scenario. Yeah. So but notice that your dynamics of the system was something like x dot is a f sorry I apologize was something like theta star f x t plus a control. Okay. Now if I typically if I assume that you know zero is an equilibrium then what you would have is that to ensure that zero is equilibrium typically you would have f zero t would be equal to zero for all t. Okay. For all t f zero t would typically be equal to zero. Okay. If that's not the case then you can see that this right hand side being zero at x equal to zero and u equal to zero at typically at the equilibrium the control is also expected to be zero. So the right hand side will not be zero and it will not be an equilibrium zero will not be an equilibrium. So you would expect f zero t to take on the value zero for all that all time. Okay. Now if that is the case here you see I apologize here I'm requiring f zero t to be equal to zero and here I'm requiring that as t goes to infinity f x t t is not equal to zero sort of looks like opposite requirements. Now if I'm looking at trajectories are right which actually go to zero as t goes to infinity this is possible and there's many possibilities if I'm looking at say trajectories like this is like trajectory that is actually going to zero as for large t for large t if you're the trajectory going to zero then this is t and this is r of t all right then this is difficult right I mean there's a difficult situation where you sort of see that if r goes to zero then as t goes to infinity with the error tracking error going to zero x itself is also going to zero. So you can imagine that as t goes to infinity this by standard continuity type arguments this function itself has to be rather close to zero in fact we go to zero itself right so this is not satisfying yeah so this condition is not going to be satisfied yeah for large trajectories which are going to zero also for the stabilization problem where r of t is actually zero for all time even in that case this sort of a condition cannot be satisfied so it's not very easy to have satisfaction of a condition of this yeah so anyway this is a naive requirement I would say there is a naive requirement so this is the sort of lesson in adaptive intro and what is the lesson is that typically you can show that the state follows the desired trajectory accurately this is guaranteed no problem okay our parameter convergence or parameter estimation is never guaranteed in fact you need persistence of excitation for the parameters to converge to that true values all right so now of course in the previous week we spent a lot of time before we go on to the second order system in the previous week we spent quite a bit of time looking at you know persistence and notions of persistence all right and so what I want to sort of do is try to give a I mean we almost don't in most circumstances analyze parameter convergence in adaptive control and whatever we see in subsequent lectures yeah because parameter identification or any identification or system identification is a complete problem that predates adaptive control and I mean you can imagine if you want to identify for example parameters of a manipulator robotic manipulator you're expected to move the manipulator in all sorts of interesting or you know rich trajectory we find me yeah so that you can identify the parameters of this manipulator so you move it in all sorts of rich trajectories all right that's the idea that's the idea now this may not always be possible because we are talking about doing a control task that we are not talking about just identification in itself okay when you're doing a control task you're expected to follow a certain trajectory right for example a robot has to say move in a along the constant trajectory yeah it has to say move along a straight line yeah and not oscillate all around just to identify the parameters that's not very okay as far as the operation of the system goes and so it may not be possible to do good identification of parameters so most engineers and adaptive control theorists are happy to have good tracking performance yeah and if they do get parameter identification in the process excellent okay however since we did do persistence and we studied persistence of excitation in the last week we do let's just try to look at what we can get out of this so let's see let's see what we have let's first write out the system equations right so what is e dot let's use this problem yeah so e dot was minus k e plus theta tilde times fxt right i think that was it right this is it minus k e plus theta tilde fxt this is what was e dot and what was theta dot theta tilde dot theta tilde dot is just minus theta hand dot which is this guy okay so let's write it off so theta tilde dot equals minus theta hand dot equals minus one over gamma times fxt times e so if i write this in the nice matrix form and get e theta tender let's see if this is correct or not yeah one over gamma fxt excellent and this is that excellent this is it okay is equal to minus a then i have fxt then i have minus one over gamma fxt and then i have a zero here multiply en theta tilde okay if you remember the lectures on persistence of excitation you will remember that we had a very similar looking system when we were looking at this result if you look at this result again you look at this particular system where we had these of course these nice requirements a b is controllable a c is observable a had to be a whole weights matrix because then i can have this Lyapunov equation and this phi function had some nice absolute continuity problem and of course phi phi dot was l infinity then we could claim uniform global exponential stability for this entire system okay great great so so what does it mean sorry okay so when too far yeah what does it mean here so this system that we have here is very identical to what we got right now this system so let's try to compare let's try to compare okay so first of all okay first of all what i'm going to do is and is let's assume for the time being that fxt is f of t and that that it is independent of the state and let's make our lives easy and assume that it is independent of the state all right so that's one so i'm going to nicely mark it because this is a big assumption right because here we were talking about dependence with respect to x and all that stuff right but here suppose i do make this assumption yeah so then it starts to match this because it is exactly a function of time all right now let's go back and try to write what these b c and a matrices are so in this case the a matrix is just equal to minus k just a scalar all right the b matrix is just one the c matrix is one over gamma so let me check if i got the signs right yeah c matrix is one over gamma now let's see is ab a controllable pair a and b are both scalars so trivially controllable yes again ac are both scalars trivially controllable observable no problem is a bulwitz matrix yes obviously it's just a minus k k minus k is a stable system so that is to say that e dot equal to minus k times e is a stable system it is in fact bulwitz no problem and finally if we assume further that this is f is absolutely continuous yeah and f f dot is bounded then the e theta tinder system is uniformly globally exponentially stable at the origin if and only if this f of t is persistently acceptable okay that's what it says here fine see if i have all these conditions and we have this we have proved a we have shown ad is controllable we have shown ac is observable we already know a is bulwitz because it's just a scalar minus k if we assume that this phi which is f of t in our case is absolutely continuous and both the function and its derivative are bounded then the system is ugs if and only if phi is persistently acceptable right so that's exactly what you require that f is persistently acceptable so exactly so with and what does persistent excitation mean if you will again recall the definition for persistence of excitation you don't need the signal to be strictly positive at all times right so a signal can be persistent yeah even if it is going through zeros even if it goes through zeros like you know like signals like these which pass through zeros are still persistently exactly okay so that is the nice thing now now if you want to go back to the case where f in fact depends also on the state and not just a function of time right so i will just make a remark here not actually try to prove it because it's a little bit more involved and complicated so so if f x t if f also function of x right then what do you do you write f as you still want to write this as a function of time so you write it as a solution t at some t zero x zero and t this is where you write f s okay and in this case if you go back again we had this more novel result or the more general result it's the integral lemma result right and what did it say what it is help us show it helps us to show that for parameter varying systems also we can have similar results yeah so we can have similar results for parameter varying systems also this was just the parameter dependent output injection and so on and so forth so it can be shown very easily using this integral lemma we did not show but these results are available in standard literature that this sort of a result that you have can be shown also when phi depends on some parameter lambda and can also be shown when phi depends on some parameter lambda in addition to time okay and then this is the result you need to use here yeah so use lambda u p e plus integral lemma okay now what's the deal with lambda u p e and integral lemma see notice that once I write this x here as the solution which depends on time and the initial time and initial state that's if you make a life simple and keep the initial time at zero then this is a function of just the initial state parameter all right just one parameter if you keep the time also initial time also then it's a function of these two parameters now you want a result which is independent of these parameters all right and how do we do that by using lambda uniform p e because that is what gives you uniform lambda uniform global exponential stability that you get all the properties are independent of the parameter so basically you start creating the initial conditions as parameters of the system because they are I mean once you fix an initial time and initial state it doesn't change for the entire duration of your run your simulation or your actual hardware expect right if I if I choose say three seconds when I start my robot and I say that my robot starts in the x y plane at say point at the point one comma two in some Cartesian order then it's fixed for the entire duration of my hardware right that is in fact a parameter it is not there's no time varying there's no time dependence there so we have reduced this problem to a problem of looking at parameter dependent system and this is where the integral lemma and lambda p e we said that we introduced these more complicated notions and we were sort of worried or maybe you know some of you might have thought and why am I taking this expression into more complicated things and what's the purpose and so on but this is the purpose I think most real scenarios you will have functions that depend not just on time but also on state so what we do in those cases we simply write the state yeah as an evolution right as a solution and then it depends only on these parameters which is the initial data of the system and then this is an issue data is the parameters and we just want to give property which are independent of these parameters or uniform with respect to these parameters all right so that's the idea and so that's the idea so in this case you see that under conditions such as persistence of excitation and uniform persistence of excitation or lambda uniform persistence of excitation you can in fact move things like you know exponential stability that is you can get convergence of both the tracking error and also the parameter okay great so usually it's it's not very evident here but not if not if f is just a pure function of time but if f is also a function of the state just like we have here and your state x is trying to track the trajectory r it should be obvious to you that if the trajectory r is rich enough okay so this condition sort of reduces to if you look at this lambda is out of condition this condition yeah yeah this will sort of reduce to you know of t being sufficiently rich yeah so reduced to r of t being sufficiently rich or containing sufficient number of frequency components so when we do simulations and tests that's what we do yeah we want to see r with sufficiently large number of frequency components which is what makes the r of t signal rich and if the r of t signal is rich then the x solution is rich because it is eventually going to track the r signal so lots of oscillatory signals then you have oscillatory x solutions and you have much higher chance of identifying the parameter but like I said like I said already before this is not guaranteed in real applications in a lot of real applications the trajectory is you want to track or not super oscillatory with tons of frequencies and all that you want to do nice simple things infighting that's what you're designing controllers for yeah you don't want them to do crazy oscillatory movements yeah you don't want your robot to be doing this this this just to follow a straight line so you want to do relatively simple things and therefore adaptive control theories do not care about parameter identification yeah so if you want to do just system identification it's a separate question yeah um if you have the freedom to do system identification if your parameters are not going to change with time then absolutely okay you can do your system identification and then feed these parameters to a normal controller yeah but if you do uh not if you do not have the luxury of doing these kinds of experiments for example if you are uh you know one ton spacecraft which you cannot do you know so many oscillations of and move system identification experiments of and there's a chance that these parameters may change in uh space conditions or high temperature conditions or very low temperature conditions then you have no choice but to resort to adaptive control we don't necessarily get parameter identification but you sort of are guaranteed to get precise tracking and excellent so good uh so once we uh sort of understand um what's happened in the schema phase and for the scalar system we want to move on to using our wisdom the same wisdom that we've already learned to try to design adaptive controllers for the second order system so we are just taking very like baby steps one step at a time right so and and please don't think that these are um very trivial steps most mechanical systems that you see around you can be written as second order systems yeah but the thing is here we assume that the system is scalar that is state is in fact a scalar value uh but for mechanical system these may be vector value but that does not change too many things yeah that does not change the fundamental ideas that go behind the adaptive control destiny all right so uh please don't worry uh about you know things being very trivial and very basic you it's very important that we get a handle on this first order and second order scalar systems very well so that we understand how to do the design what the issues are and so on so what is the setup the setup is that you had this system you had this right hand side already we are just adding an integrator to it you're just adding an integrator layer to it okay so if you make a block diagram i would make the original earlier system and then i'll add an integrator it's as simple as that yeah so you have x1 dot is x2 and then x2 dot is given by this yeah so the control appears here in the second layer control appears here in the second year excellent so and as i said the states are evolving in the real number space the function is taking uh function f takes um again the states and time and use you some real numbers theta star is the constant unknown parameter and use as usual a scalar value the standard second order scalar system this is the setup okay what is the aim the aim is now to design a control such that um the first state yeah if you think of it as a mechanical system sort of motion is the position right you want the position state to tag a smooth bounded trajectory okay so we do not specify the second state that is x2 state because it is intrinsically related to x1 state by the derivative therefore i cannot specify x2 arbitrary and therefore if i want x1 to follow r x2 has to follow its derivative okay x2 has to follow its derivative there is no two ways about i cannot have instead of r and r dot i cannot have r and 2 r dot yeah i cannot have r dot by 2 i cannot have any variation i cannot have r dot square i cannot have any arbitrary uh condition on the trajectory that x2 forms okay so to make it simple we refer to these such conditions as matching conditions that is because these trajectories have to somehow be consistent with the dynamics of the system so x2 design has to equal the derivative of x1 designing okay so the desired value of x1 has to um take the desired value of x1 you should get the desired value of x2 this is because it's dictated by the dynamics here all right great so what did we look at today so what we looked at today is we already had completed the analysis for trajectory tracking we were successful so of course we're very happy but we could not prove anything about parameter convergence so we sort of tried to leverage what we had learned in the last week to see under what conditions we can get parameter convergence and so we saw that if you have only functions of time appearing in the dynamics then you can use persistence of excitation and if you have functions of both state and time fxt then you have to use parameter dependent that is lambda u persistence excitation yeah and then we sort of gave the setup for the second order scalar system that's we are going to do adaptive control designed for in the subsequent lectures so this is where we stop today thank you for joining