 Hello everyone. Welcome to the fifth lecture of this final week of our course on non-linear control. We have been looking at sliding mode control in the last sort of couple of sessions. Now what was sliding mode control? We introduced sliding mode control as a particular kind of variable structure control and we understand that this sort of variable structure implies that the control structure tends to change across the sliding surface and we have seen an example of that. So we have been introducing the whole material on sliding mode control using motivating examples and the example is pretty straightforward. It is just a double integrator with some non-linear disturbance. The non-linear disturbance is assumed to be uniformly bounded for all time and for all values of the state and what we do to begin with is to construct what is called a sliding surface. So the sliding surface is like a one-dimensional for this two-dimensional system. It is a one-dimensional sliding surface and you can see it looks something like a straight line. So essentially what we want to do is we want to send sigma to 0, the sliding variable sigma to 0 in the presence of disturbance. So this quantity is the sliding variable. So that is what we want to do. We want to send this quantity to 0 in some finite time. That is the M in some finite time. So it is actually a kind of finite time control. So we use some finite time ideas as well. So since we want to do that, we construct a Lyapunov function which is exactly in terms of the sliding variable itself. Notice that this is not in terms of the entire states of the system. So it is rather interesting that way. So it is actually something only in the sliding variable. It is almost like saying that I am looking at the dynamics of the system on the straight line. Basically we want to make sure that the dynamics of the system goes to this straight line in finite time. And what we want to do is we want to make sure something like this happens because we remember that this exactly gives us finite time convergence. So we simply compute a v dot just like we are used to doing. And then of course we know that we use the signum function property. We use the signum function ideas. We prescribe a v which is something like this which is something similar to this. So basically we first prescribe a u which cancels out this guy. And then we are left with another knob v. And we choose that knob v in a way so as to compensate for this non-linear disturbance by choosing this gain rho to be larger than L. So once we do that, we get something like v dot is less than equal to minus v to the power half. And therefore we have our finite time convergence. So our entire control looks like this. Now the important thing to note is that that is where we were last time. That is where we finished last time. Is that the control across the sliding surface is rather big switch. Depending on how big my, if you notice on the sliding surface you have x2 plus cx1 that is equal to sigma. And that is exactly equal to 0. And on one side of it you have the control to be minus cx2 minus rho. And on the other side of it you have the control to be minus cx2 plus rho. So depending on the size of this rho, notice that this x2 may not change too much if you just move across the sliding surface. The states are not going to change much because I mean it is not like we are going to move too much in the phase plane. But the point is depending on how big we chose the value of rho, there is a significant discontinuity in the control. There is a jump in the control. And this is what obviously leads to this non-smooth control idea of course. So what happens is because we are not exactly cancelling the disturbance at every instant in time. We are not exactly cancelling or simply dominating it. What happens is that the, even after the system reaches the sliding surface. So this is called the, you know this is called the reaching phase while it is reaching the sliding surface. And then you have the sliding phase when it actually moves on the sliding surface. So what happens because of this disturbance and the fact that we do not exactly compensate for it is that you tend to oscillate around it at very high frequency. Why? Because as soon as you go to one side, you implement a big control to compensate. Then you again go to the other side, big control to compensate. Go back to the other side, big control to compensate and so on and so forth. And in fact, even the control plots start to look like this, where you have large chattering kind of control. We have large fast changing control. So however, the aim was to send the sigma to 0 in finite time and that is achieved. So the sliding variable goes to 0 in finite time. And this is what is called and of course, this is called first order sliding mode. Why? Because the sliding surface that we chose was a first order system in fact. So for the second order system, it reduces the dimension. The system starts to evolve technically in the absence of disturbance. It starts to evolve on a one-dimensional surface. So you reduce the order of the system by 1 beyond a certain finite time regime. So this is called the first order sliding mode. And on top of it, this is also called an ideal sliding mode. Since reaching phase is finite time, that is why this is called an ideal sliding mode. So that is what we were discussing last time as to how to alleviate this issue of chattering. So that is what we want to do next. So the question is how to alleviate the chattering. So one of the methods, we discuss obviously one method right now where multiple, but it has got to do with some kind of a higher order version of things in some sense. So what is it? Answer is add an integrator. So the system was something like this x1 dot is x2, x2 dot is u plus fx1 x2 t. Now we say we do not directly apply the control u, but we apply, we supply to the system the derivative of the control. So and we have some x1 0 equal to x1 0, x2 0 is x subscript 2 0 and the u we, now that the u variable has been made into a state, we just choose its initial condition as 0. That's in our hands. So that's what we do. So we start working with this higher order system. We start working with this higher order system. And then what do we say? We say that now I am going to construct new sliding surface. And what is it? We call this variable s and it's sigma dot plus c bar sigma. So sigma dot plus sigma sigma and remember that sigma was x2 plus c x1. And now we say that you notice that now our new sliding surface has been constructed using sigma itself no longer using x1 and x2, but directly using sigma. And you still see that this will now start to contain the derivatives and the disturbance itself. The sigma dot will contain the disturbance. So that's the interesting thing. Now the sliding surface itself starts to contain the disturbance terms. So what happens? Now if we say that s goes to 0 in finite time, what do we have? We know sigma, sigma dot go to 0 asymptotically. Just like before, before we proved that if sigma goes to 0 in finite time, we have x1 dot and x1 that is x2 and x1 go to 0 asymptotically. And that's what we'll have. So we just prove that sigma, sigma dot goes to 0 asymptotically, which means that the earlier sliding variable is no longer going to converge in finite time. So we are in fact working with an auxiliary sliding variable s. But this sigma now goes to 0 only in asymptotically, not in finite time like before. So we have weakened the requirements. We have weakened the requirement. We are no longer requiring that sigma go to 0 in finite time. Now how does that help me? How does that help me sort of get rid of the chattering? So let's construct the dynamics of course. So let's see what s dot is. s dot is sigma double dot plus c bar sigma dot. And this is, let's say, I have to take derivatives now. So this is x2 double dot plus cx1 dot. So I'm going to do this carefully, plus c bar sigma dot, which is x2 dot plus cx1 dot. And this turns out to be x2. So first I write the c bar x2 dot, which is u plus f. I'm not going to write the rest of the things, plus cx2. Notice that I've not written the arguments here, but I hope that's evident that it's a function of x1, x2 and t. And now this quantity will be x2 double dot, which is u dot v plus f dot is the derivative of this guy. Because we have prescribed the dynamics of u now. So u dot is v and f dot is just written as it is. So that is x2 double dot. And what is cx1 double dot? So cx1 double dot is just cx2 dot. Okay, it's just cx2 dot. So what is cx2 dot? This is simply c multiplied by u plus f. Okay, so I've just carefully written the derivatives here. I have not done anything more. So this is exactly this guy. Right? Okay, great. So then I have this as v plus f dot plus cu plus I will say c plus c bar times u plus c plus c bar times f plus c c bar x2. And that accounts for all the terms. Now if I want s to go to zero in finite time, what would I do? I would take v as one half s square just like before and compute v dot s s times s dot, which is s times this whole thing. Right? So I'm going to write this. Remember now, well, I'm just going to write it like this as it is v plus f dot plus c plus c bar f plus u plus c c bar x2. Remember now that u is no longer the control. We cannot prescribe u anymore. We can only prescribe v and that's what we want to do. Okay. Now what are the terms we can, we know and we can sort of compensate for here immediately is c plus c bar u because now it's a state. So it's known. So I can compensate for it. And this is also well known. So I can compensate for it. The only issues are f dot and f. Now at this stage, we make another assumption because we already have an assumption on f on the uniform boundedness of f. So we make a similar assumption on the uniform boundedness of f dot. Right? So obviously this is true for all x1, x2, t. That's what we do. And we start off by choosing. So we choose v, the control now, v as minus c plus c bar u minus c c bar x2. And what else? We now take something like a plus a rho signum s. This is not very different from before. We are doing something rather similar here. Okay. And what does this leave us? Let's see if this works. We can, we may come back and change these terms a little bit if this doesn't exactly work. But let's see what happens. So v dot now becomes s times, everything else goes away, like a few terms cancel. This cancels with this. This cancels with this. So I'm left with only the ff dot terms. So I will get rho signum s plus f dot plus c plus c bar f. So this actually evaluates to again s and signum s multiplied to give me absolute value of s. So this is exactly equal to rho absolute value of s plus s multiplied by f dot plus c plus c bar f. Now, if I do the norm bounds, I know that this is going to be less than equal to rho absolute value of s. So actually, I apologize. This should be minus rho. This is what I knew that then we will need to do some change. This is minus, there will be minus again, minus rho absolute value of s plus absolute value of s multiplied by l bar, which is the bound on f dot plus c plus c bar l, which is the bound on f, right? L bar is the bound on f dot, right? So this is coming from here using the bound on f dot and this is coming from here using the bound on f, right? And now it's pretty easy, right? It's pretty straightforward. I do what I've been doing until now. I will choose rho to be say equal to l bar plus c plus c bar times l, right? And I will add a factor now, right? Which is basically say something like a plus a 1 over root 2, right? So this will give me v dot as exactly less than equal to minus 1 over root 2 absolute value of s, which is actually equal to minus v to the power half, right? And then I'm done, right? I get my finite time convergence of s, right? This implies s goes to 0 in finite time, right? And therefore, we have what we went, what we wanted to achieve, right? We will have what we wanted to achieve. Now, this is essentially called since the actual sliding mode is sigma, actual sliding variable is sigma. Since sigma goes to 0 asymptotically, this is called asymptotic sliding mode and not the ideal sliding mode, okay? Not the ideal sliding mode, okay? So what is our control now? Our control that goes into the system is something like minus, well, I mean the control is already written here. So I don't need to repeat it. Let me just highlight it for you. Let's just highlight it here and that's what is the control, right? That's what is the control that goes into the system. But notice that v is not directly implemented, but the integral of v from 0 to t which is equal to u is implemented, right? Well, actually I should not say, but solution of, we should say solution of u dot equal to v with initial condition being 0 is implemented, okay? And that's a good thing, right? First of all, notice that u dot equal to v is a stable system because I have u dot, this is equal to minus c plus c bar u minus c c bar x2 minus rho signum s. So you see that this is a nice stable term, something nice is happening. And on the other hand, an integral effect happens, right? So when we do an integral action, earlier the control itself had a signum, right? In the previous case, if you see, the control had a signum function. In this case, the control has no signum function, right? The derivative of the control has a signum function, all right? So you, what you have, it's still not infinitely smooth or something like that. Actually, you can't expect it because you have employed some kind of finite time convergence for some variable, whether it be at one derivative level or second derivative level and so on. If you notice, this finite time convergence is sort of implemented on a second derivative level, right? So, but still because you implemented finite time convergence, you will not have smooth controllers. But the good thing is, the non-smoothness is pushed to one derivative below, right? So the control is actually an integral of the signum function, and therefore, what tends to happen is that you will have, you know, much cleaner sort of control, right? I mean, this is something that you can verify by simulations, right? But you will have much cleaner control, right? Control, so you has integral of signum function, hence no high frequency chattering, okay? And this is rather nice, and this is rather nice. I mean, it's not that it is still free of oscillations, it will still be oscillations, depends on how fast your signum function is moving. So, even if you integrate the signum, you will still have oscillations, but it will be significantly reduced, yeah, it will be significantly reduced. So, this is one way of sort of alleviating or attenuating this chattering, okay? And so, this is sort of nice, yeah, this is sort of nice. So, this is something that may be acceptable in a lot of circumstances for an actual application as well, yeah, right? Now, one of the concepts that we, well, in sliding mode control, one of the concepts that folks are interested in is the notion of disturbance estimation, okay? The notion of a disturbance estimation, right? And therefore, we sort of are looking at the, for disturbance estimation, there is a need to have a notion of equivalent control, okay? So, that's what we will introduce now a little bit, is the notion of equivalent control, right? So, what is equivalent control? What is equivalent control? This is sort of control as computed on the sliding surface, okay? So, this is the control as computed on the sliding surface. So, what is this? So, notice that when we started, we had the sliding for a surface, which was x2 plus sigma x1, right? And what we had, obviously, was it because of finite time convergence, we had sigma equal to sigma dot equal to 0 for all t greater than equal to some tr, right? Some tr, right? This is the finite time convergence time, right? So, if you look at sigma dot and you compute sigma dot that is x2 dot plus sigma x1, x2 dot is x2 dot plus sigma x1 dot and x2 dot was just u plus fx1, x2, t plus sigma x2. And if we say that this is exactly equal to 0 and it is on the sliding surface, then what you compute out of this, the control is u equivalent, which is actually minus sigma x2 minus fx1, x2, t, okay? So, this is what is called the equivalent control. Now, the interesting thing to notice is this is not the actual control, yeah? This is not the actual control. What was the actual control? You can go back. You can go back and actually get this back here, right? So, that's the actual control, yeah? Why cannot this be the actual control? Simply because it has this unknown quantity, right? Which is never being applied, right? Which is never being applied, yeah? So, that's the idea that even though you don't apply this control, right? Even though you are not actually applying this control, you do sort of get the effect of applying this control in a sort of averaged way, yeah? In a time average sense, this is exactly what you have, okay? So, what does this sort of mean, yeah? What does this sort of mean would be a good question and how does it help us, right? So, that's sort of the question that we ask ourselves, right? So, that's sort of what we ask ourselves. But before that, the important thing to sort of note here is this is the equivalent. This is not the actual control like I already said, but this is precisely the equivalent control, right? And how can we use it, right? How do we use it? So, the idea and we're not again stating this by carefully proving these things and so on and so forth, but the idea is that we can estimate the u equivalent as a low pass filter of the actual control. So, this is just minus cx2 minus rho multiplied by a low pass filter of sigma, okay? So, this is essentially just an acronym for a low pass filter. I mean, ideally, typically, how would one implement such a filter? It would be something like introducing a state tau z dot equals minus z plus signum of sigma and your equivalent control is simply minus cx2 minus rho times this new variable z, okay? So, what are we claiming? That there is this control that we can compute from the sort of steady state if you may when you're on the sliding, when you're sliding, right? So, notice in spite of disturbance, we are exactly sliding. So, sigma becomes exactly equal to zero. So, the idea is since sigma becomes exactly equal to zero in steady state or in fact, after finite time, so I mean, the steady state happens at finite time, we have an equivalent control which is different from the actual control, but can be obtained from the actual control by means of a filtering, like a low pass filter. And this is sort of expected because if that was not the case, then there is no way you would have been able to sort of cancel the disturbance and stay on the sliding surface, right? And therefore, there is enough logic here to understand that this idea of low pass filtering to get to the equivalent control actually works, yeah? And you can see this is a way of estimating the value of the disturbance and that is what we will do, yeah? So, this is actually a way of differentiator differentiating terms as well. And this is also a way of identifying this nonlinear disturbances in finite time, all right? That's what we look at in the subsequent lecture.