 Hello everybody, welcome to yet another session of our NPTEL on nonlinear and adaptive control. I am Srikanth Sukumar from Systems and Control IIT Bomb. We are almost at the end of the 10th week of lectures on nonlinear and adaptive control and of late we have been focusing on robustness in adaptive control. It is actually a property that is rather critical for real world implementation such as the SpaceX satellite orbiting the earth that you see in my back. So what we were looking at last time was essentially no projection based adaptive controllers as one way of implementing robustness. So it was a rather nice way it was sort of a direct attack on the issue of boundedness of parameters because when there was a disturbance what we noticed was the bad thing that happens is that the parameters get disturbed that is the parameters start to become unbounded and we directly attack this problem by using any prior information of parameter bounds that we might have and with this knowledge we use the projection operator using tan hyperbolic functions and show that we can actually design a control law and an update law and filtered variables which are bounded. Everything remains bounded in spite of disturbance, disturbance does not change anything because of how we implement things. So our results are not impacted by disturbance of course in the Lyapunov stability analysis you still see that there seems to be a repeat of sheets here. The stability analysis is not impacted except for addition of some kind of disturbance terms in the V dots and these will essentially result in some kind of residual set behavior on the EF doesn't matter to us because this is the best expected outcome in case of disturbance anyway in standard Lyapunov based on linear control or any control for that matter because there is no way you can counter disturbance using smooth feedback of course you have sliding mode and other sort of non-smooth feedback which can actually do disturbance rejection also but that is not within the scope of what we are doing in this course. So it is a very nice method so very useful so in fact let me sort of get rid of this page because this is a repetition of this page yeah if you don't mind before we go forward okay just a second yeah move the trash, trash, excellent. So then what we started doing pretty much at the end of the last session was talking about the sigma modification so we do know that there is a nice solution which is essentially a projection solution in the presence of knowledge of the bounds of the parameter a right but what happens if we do not have you know this kind of a knowledge is kind of a prior information in those cases we have to you know devise some kind of modifications of the adaptive law so that's where we started we started with the standard very very simple model we had and we want to track some xm and because we defined an e dot and a standard certainty equivalence control law with that we had a standard adaptation law which is well known with the Lyapunov candidate and what we proposed or what Ayano and Kokotova proposed in the sigma modification adaptation law is that you had a damping term that is the right-hand side had no term in a hat so this is what we also mentioned in the earlier projection method the non-certainty equivalence based methods do not you know have a term in the estimate parameter estimate in the right-hand side of the parameter instrument update law and that's what we do here you add a term with the a hat on the right-hand side which is a damping like term so it has a sigma term so that's why it's called the sigma modification because they chose gain sigma here and gamma is of course retained here as it is right so this is the sigma modification so we want to start to look at it in more detail today in this session so I'm going to mark our lecture 10.6 all right and now we of course add the disturbance I mean we already had the disturbance in the dynamics right and of course the design cannot account for any of this disturbance so obviously the design remains exactly the same as before the only difference being the sigma modification yeah so we again take the same Lyapunov candidate yeah so no reason to choose another one and you get the derivative as e dot minus 1 over gamma a tilde a hat dot as always then I substitute for the closed loop dynamics yeah so I substitute this guy here and I get an e dot which is a tilde x so this cancels minus k e from here and a disturbance from here and so this is what we get an e dot and then we have an a tilde a hat dot and a hat dot is just this so gamma ex times gamma sigma a hat and the gamma cancels out right so you're left with the ex minus sigma times a hat all right great now you know we continue so you notice that this ex term cancels this that's essentially the purpose of the update law that the date was chosen so that these two cancel off so it should not come to you as a big surprise so once these two cancel out you have the nice negative term in e again not a surprise then you have a term in e and d which is the disturbance term that we saw anyway in the beginning of this week's lectures yeah and finally you have a term which is the new term which is sigma a hat a tilde this guy all right now what we do is we write our a hat in terms of the a tilde as a minus a tilde from here yeah so a minus a tilde just from this expression right here all right great and so what happens you see that I start to get a minus sigma a tilde squared term so now I have two quadratic terms negative quadratics minus k squared minus sigma a tilde squared remember when we started this discussion on this robustness I had mentioned that this issue of disturbance causing some states to grow unbounded is primarily an outcome of the fact that we don't have strictly upon a functions in adaptive control right even if we start with a strictly upon a function for the known case when we start to do the adaptive control it becomes a non strictly upon a function because the V dots always come out to be the same as the non adaptive case right but the V had an additional a tilde term right so therefore it became a non strictly upon a function and that was the problem so this notice what this sigma modification has done it has introduced a negative term in the a tilde and this is what is somehow giving this strictification if you may yeah this is what is giving a strictification of course this is not for free because you already had the disturbance term which was okay it's not worry about it but you also end up with a sigma a tilde a term so you have an additional disturbance like term here right notice that both these terms are linear in the state this is linear in E this is linear in a tilde right a is a constant unknown but a constant sigma is a constant and D is not a constant but it's bounded by a constant all right great so now what do we do we use our standard well I mean first of all we do a norm bounding which is like this is less than so I put norms everywhere or an absolute values everywhere because these are scalars if these are vectors I would put norms so this is just less than equal to absolute value of E times absolute value of D which is less than equal to you know D max right so so this becomes absolute value of E times D max and then I just put absolute value everywhere sigma times absolute value of a times absolute value of a tilde all right and now I simply do a standard AB less than equal to a squared plus b squared by 2 on both of these terms right well I don't do a standard a I actually do something slightly more it so this guy is actually this is written as less than equal to e squared by 2 plus d max squared by 2 so this term is the standard one but but this term I'm writing slightly differently as this is written as sigma is multiplying here and by 2 and then I have epsilon a tilde squared plus 1 by epsilon a square yeah we already saw this kind of a decomposition also it's possible because I am simply writing this as equal to a square root epsilon a tilde times a over square root epsilon yeah so this I can do this this is just a you know multiplication and division by square root of epsilon so nothing is changing so we've already done this kind of a decomposition so that's what we do for this term and now you just combine these with the square term right because I have a square term here so I have k minus 1 half e squared and then sigma minus sigma minus epsilon by 2 a tilde squared here and then I'm left with these square terms in these unknowns and so these are unknown square constant unknown constant positive constants here okay and then I of course combine this guy and this guy and I get something like this and something like this okay it doesn't matter I could have combined it with one or the other and all that mess but it is sort of irrelevant yeah you would essentially get similar outcomes similar sort of residual sets now what's happening here if you notice is that if you assume k is greater than half and epsilon is less than 2 of course that's important otherwise these quantities are not positive so this is you know just to you know sort of ensure that you have this quantity positive and this quantity positive that's all right then we have read out to be negative semi definite whenever this is positive and this is positive and that's given by these conditions when e is greater than this and also a tilde is greater than this notice what happens right what happens here is we get two residual sets two residual sets meaning we get intersection of two residual sets right so if I was actually to draw a picture just like you know we did you know for the standard case if I was to make a picture like this let's try yeah and this was say my e axis and this was a tilde axis yeah this is a rather not perfectly done don't worry about it let's see I'm sort of drawing only a projection of this yeah I'm only drawing a projection of this set so if I draw this guy yeah so there will be a residual set in e which is like this and then there will be a residual set in a tilde which is like this so your trajectories so it can be very easily shown that your trajectories will in fact lie here your system trajectories will in fact lie here okay so this red line of course represents your a tilde which is you know a over square root epsilon 2 minus epsilon and your this magenta line which is the e bound is basically d max over square root 2 k minus 1 yeah so you can see that by choosing epsilon and k of course you can modulate these a little bit but the basic idea is there is a residual set in both so you are so you can see that you can never go unbounded here or the ideas will never go unbounded why earlier you had some e dot negative semi definite only in terms of the e you know e dynamics now what happened in terms of the e variable now I have a residual set I have sort of this V dot negative semi definite condition for both you know it's an and condition it is an and it's not an or it's not one or the other so if even one of them if a tilde the parameters try to escape this bound right if the parameters try to escape this bound your V dot will again become negative and pull them back right and similarly if only e becomes e starts to escape the bound then also you will be pulled back by the negative V dot so you move out in any direction it doesn't matter you will be pulled back out so therefore both e and a tilde will remain bound so you see and there's an and condition in the residual set so this is the rather nice feature of the sigma modification that you know first of all it looks very simple compared to projection yeah all of you have to agree we all like simple things yeah so all we did was you know really just change there add a damping term which would have sounded very very logically obvious to all of you right I mean and hence you know when you know Cocoa to which came up with in with it in 1983 right really really really far back that was the logical conclusion the absence of the damping term was doing some bad things was essentially killing the robustness so obviously this is a very very intuitive answer add a damping term so in the presence of disturbance you have very nice performance in the sense you have bounded performance and and if I increase my K I can of course you know reduce my residual set right epsilon is of course you know the point is epsilon is of course bounded right so if you it doesn't matter what you you know you cannot do too much with this spot is what I'm trying to say not do really too much with this problem okay and we'll see why yeah and why we cannot do too much I mean one obvious reason why nothing much can be done is look at how the expression is it is epsilon times 2 minus epsilon and epsilon is a choice of epsilon is just between 0 and 2 and so whatever you do here the maximum value is you know rather bounded right I mean it is lying epsilon is between 0 and 2 so if you choose epsilon to be very close to 2 then you have some really small quantity here I mean sorry I mean the way to make this small is to make this large right so the largest this value can take is not much honestly speaking I mean you in fact I I don't yeah we have to see it's it's essentially not difficult to compute what would be the largest value this guy can take so this is 2 epsilon minus epsilon squared so if I take partial with respect to epsilon this will be 2 minus 2 epsilon so at epsilon equal to 1 you have an optimum and what is that and this is so essentially the denominator is equal to 1 at epsilon equal to 1 right so that's what the denominator is exactly equal to 1 right now the question is is this the maximum value yes because if I take second derivative of this guy's another derivative it's 9 minus 2 is negative 2 therefore this is in fact a maximum so the largest value this can take is 1 right so so the idea is that the residual set yeah so the minimum so it looks like from this the residual set the maximum or whatever the least you can make this is a which means your error will be less than a okay and not smaller than that yeah so if your true value is a you will be at 2a or minus 2 2a or 0 because your minimum error is a it is a error in the parameter estimate remember yeah so your parameter estimation error is a which means if the true value is a then you are either at 2a or 0 which is not saying much right so the residual set is large on the other hand the parameter residual can be made really small by choosing large control gain that is still there but in any case we are getting bounded performance all the cool things so we should not be complaining too much I guess however one of the two things first thing is even if the you know the disturbance is 0 you still get only bounded performance why is that suppose I put d equal to 0 in every in everything then what happened this d max term is what goes away this half goes away and the d max goes away all of this goes away okay so this is not there this is not there it doesn't matter if this is there or not it's just some scaling but this term goes away now if this term goes away what changes I still have some term here some residual term here yeah some disturbance like term here because of my introduction of the damping so my introduction of the damping creates a disturbance like term which is not going to go away even if you kill the external disturbance yeah so you can also think of ASM internal disturbances this damping as some internal disturbance that's what it behaves like right so this term is not going anywhere so all that will happen is that this will be not there this will be you know zero now this term you know you can go to zero but you will still have a bound here yeah and if you have a bound then you will still get boundedness yeah we will still not necessarily go to zero because you have some kind of a residual you know additional term here yeah because even if this term goes missing yeah you still have this guy yeah and you can see this is like a disturbance term and this is not going to allow V to go to zero even in the absence of disturbance so what happened the sigma modification did not need knowledge of the bounds on the parameter but of course it can't do everything it is always a given taken life right this is the important lesson whenever you see a very technical presentation where there are no assumptions and everything can be done be very very skeptical yeah because there is no free lunch yeah so we did not require knowledge of parameter bounds and the construction was rather simple but it even in the absence of disturbance it's only going to give performance if you're happy with that great if you're not then you want to use projection yeah the final thing is when he is really small when he becomes really small you have poor tracking performance why okay when he becomes really small this guy goes to zero almost right this guy goes to zero so what happens you just have this damping term which is going to push the parameter value to zero because it's just exponential decay right so this is going to push the parameter value to zero right and it's I mean if you've learned the value of the parameter suppose you're getting very close to the true value of the parameter yeah and then suddenly your errors became zero in the system then you are essentially going to unlearn what you just learned yeah you learned the value of the parameter after some significant effort I hope but you're going to unlearn it yeah because of this kind of a so in order to resolve the second issue the first issue cannot be resolved yeah doesn't matter if you will always get only bounded performance with these kind of modifications where you don't have any projection but for the second issue you can do some nice things like safety and that is called a epsilon modification it came four years after the Sigma modification by two other big names in adaptive control Narendra and Anna Swami right and what they do is very simple again I mean very very intuitive and nice simple results very that's the best part of these instead of having just a Sigma here yeah they put a term which is dependent on the parameter error okay and an absolute value okay so this is not exactly smooth yeah not exactly smooth so they put an absolute value here of error instead of the Sigma that this is called the epsilon modification how does it change things as usual you have the same you know Lyapunov candidate have the same cancellations okay and you're left with the same sort of terms here right the only difference is the only difference is instead of the Sigma appearing in these terms the absolute value of year okay doesn't change anything because this is non negative and this is important absolute value is important okay because otherwise you know you will have you could have negative so just to ensure that these are non negative quantities this is important right so you have an absolute value of here because Sigma if you notice was a positive gain right obviously if you want a damping term which is a negative term this has to be positive right can't have arbitrarily signed quantities here to ensure that of that it's at least not negative you have to put an absolute value here right otherwise this is not a damping term it can be a blowing up term also right so therefore the absolute value is very essential here very critical so all that this does is it changes here okay instead of Sigma you have an absolute value of here and then you know rest of it is pretty much exactly the same yeah the and in fact the residual set expressions also turn out to be exactly the same because nothing changes except for this sigma being replaced by this absolute value of here right this has the same issue of course it is still only uniformly ultimately bounded if D is equal to zero why we call it uniform ultimate boundedness it is uniformly bounded because it initial conditions don't impact the bound right you will still reach the same residual set you see there is no initial conditions appearing here that's why it's uniform why is it ultimate bound because it ultimately goes to that is it it may start outside but it eventually goes into the set and that is asymptotically it goes into this set yeah not necessarily you know in one step or anything like that therefore it's uniform ultimate boundedness yeah if you look at large time it is uniformly bounded so this bound is not impacted by the initial condition but is valid after large time right so now what is the difference that happens here is in the adaptation law notice what happens earlier the issue was that when he became small this term has no impact right and this term pushes a head to zero and needs to unlearning okay now what did Anna Swami and Narendra do they did the smart thing put a absolute value of here and could not have put e here so they had to put an absolute value right and what this does is when e gets close to zero both terms are equally small so there is no unlearning yeah if a had reached close to the true value of a then you continue to remain close to it because the right hand side of the the derivative is small because e is small so derivative is small so obviously you're not moving to far away from the well-learned value therefore your tracking performance is going to be better okay that's the whole idea of epsilon modification which is sort of a one can say an improvement over the sigma modification remember although that you did put in a non-smooth term in the update law yeah many again many theoreticians and maybe even applied engineers may not like this this is a high-frequency term in some sense right because if your e is oscillating between negative and positive values around the origin then this is you know this is sort of giving you some trouble can potentially give you some trouble and because of the sign and this could become plus minus plus minus and all that yeah so remember that this may not always be the best option but whatever I mean this is what is the epsilon modification yeah one can also smoothen this I guess if you want yeah but that's on you yeah that's that's also a possibility right a smoother version of this is also possible and you can again you stand hyperbolic or sigmoidal type functions all right excellent so what did we see today we looked at an alternate way of doing robustness or imparting robustness to adaptive controllers we are the sigma and epsilon modification the idea is that the laps or the flaw in the earlier design is the absence of a damping term so both sigma and epsilon modifications add a damping term to the update law adaptive update law right while in sigma modification it's a constant sigma gain in the damping term in the epsilon modification it's a the gain is actually absolute value of the error right the advantage of epsilon modification is that when the parameter has been learned and the error goes close to zero then you then the sigma modification will lead to unlearning of the parameter and a hat will become also zero because of the damping term but in the epsilon modification because of the absolute value is scaling your parameter value will not be unlearned in spite of the fact that your error goes close to zero and that's the advantage in both these cases there is a given take because the bounds are not used like in the projection case you get only bounded performance even if your disturbances ok so there is of course like I said a given take import here alright excellent so I hope you found this week rather interesting and learned a little bit about robustness in adaptive control so I will see you in the upcoming week sessions thank you