0:13

So this week, Dr. Egerstedt uh,introduced to

Â you guys this concept of hybrid control, right?

Â Where a system, or in our case, a robot, has

Â to go through these different behaviors in order to complete

Â a task.

Â For example go to goal, avoid obstacle, hop skip jump, whatever.

Â Different behaviors in order to complete a task.

Â And the problem with that is, or not the problem,

Â but what you need to keep in mind, is that

Â now suddenly we need a bigger model that takes into

Â account all these little models or little behaviors of the robots.

Â And how do we do that?

Â We do that through something called a hybrid automata,

Â which takes into account all these continuous dynamics, and yet,

Â switching logic, to switch between different dynamics or different behaviors.

Â 1:02

So basically, an example of a hybrid automata is this.

Â Guy here, and it's really nothing but a finite state machine.

Â And a state machine is something that just skips between different states, etc.

Â So we have

Â a q, for example, is your counter for different states.

Â So when q is 1, you're in this state.

Â When q is 2, you're here.

Â When q is 3, you're here.

Â And each mode, or each state, in itself has different dynamics, x dots.

Â Right? Or different behaviors or modes.

Â And then you have these guard conditions that tell

Â when you want to switch from one mode to another.

Â Pretty simple. And then we have

Â what we call resets.

Â Which is basically once you do switch to a different

Â mode, do you change your state in any way or not.

Â It's just something you can add into the automata.

Â So this is a simple example of what a hybrid automata looks like.

Â 1:59

And then we while studying this hybrid automata,

Â came across this phenomenon called Zeno effect, right?

Â And what is that,

Â really?

Â It's this annoying thing that makes your state or your

Â system just kind of go really fast between your guard conditions.

Â So here your guard, when it's less than 0, you go from x dot f1 to f2.

Â When it's greater than equal to 0, you switch back.

Â But the problem is when it's equal to 0, you switch,

Â and then you just keep switching between these two modes infinitely fast.

Â And that's something we don't want in our system.

Â And this is called Zeno Phenomenon.

Â 2:40

And there's this whole thing called Type 1 Zeno

Â and Type 2 Zeno, which is studied in the lectures.

Â We're going to deal with Type 1 Zenoes, because we know how to deal with them.

Â Type 2 Zenoes are tough, and we're not going to

Â deal with them here, in this class at least.

Â And an example is that, okay, you're given a system,

Â right?

Â This is a simple system here of two states, and you want

Â to see if this guy here is Type 1 Zeno or not.

Â And once again, just remember that this effect happens when

Â you have, lets say, the same guard condition, but just flipped, right?

Â So this was g1 and g2, it's possible that you did not keep going between the

Â states really fast.

Â But because it's the same condition here, g of x, which is less than 0, and then

Â greater or equal to 0, that's the only way you get this surface g of x

Â equal to 0, along which you're going to keep moving like this, right?

Â Okay.

Â So when is it going to be Type 1 Zeno?

Â This is the first question you ask when you're designing a system here.

Â And you have certain conditions for it.

Â These are the conditions.

Â Basically, what you want to see is that this is my surface g of x equal to 0.

Â And when I'm hitting the surface from whichever direction I'm coming, either

Â I'm coming from greater than equal to 0 or less than 0, right?

Â Whichever condition I'm coming from, when I hit the

Â surface does this particular equation hold true or not?

Â Or does this particular condition

Â hold true or not?

Â Which is simply just saying that whenever I hit

Â a surface, is it true that one mode, or

Â f1 for example, is pulling me in one direction,

Â and f2 is pulling me in the other direction?

Â And that's encoded in this condition here.

Â So it's not always true.

Â So that's why you want to check when is it going to be

Â true that I'm being pulled into different directions when I hit

Â the surface, which is g of x equal to 0. Okay, so this is pretty simple.

Â 4:48

You guys saw the derivation in class, etc.

Â And once this is true, or once you do determine that

Â yes, it is a Type 1 Zeno, then what do you do?

Â Okay, then you don't want to keep moving infinitely fast along the surface, right?

Â What instead you want to do is you want to slide along the surface.

Â So once we have found out that it is Type

Â 1 Zeno, we're going to try and induce the sliding mode instead

Â of going back and forth really fast so that, you know,

Â we kind of remove this whole annoying thing with Zeno effect.

Â 5:22

So we have this example that we just saw.

Â And now we want to find out, the first thing, is this in fact Type 1 Zeno or

Â not, right?

Â And we saw that we need to do this check to ensure if it's Type 1 Zeno or not.

Â And this check is pretty simple, again g effect equal to 0, and

Â then see if this condition holds or not, and we're going to do that.

Â 5:58

And because your g of x is x minus 10, your partial derivative of g

Â with respect to x is going to be just 1 times f1, which is just f1.

Â Which is 6 minus x, right?

Â Okay.

Â And now we want to make sure that our

Â new derivative is negative, in the f1 direction, right?

Â So in order to have this expression negative, we

Â find now that our x must be greater than 6.

Â In the same way, with the same math, you check

Â out this condition, and it gives you x greater than 0.

Â So you have these three things here: x is equal

Â to 10, x greater than 6, x greater than 0.

Â And you want to see if this makes sense or not.

Â Will this situation ever occur, right? And it turns out, of course it will occur,

Â because x equal to 10 automatically means x is greater than 6, and x is greater

Â than 0.

Â So that means when I hit the surface, I

Â am in fact going to experience Zer, Zeno effect.

Â So we have established that. Okay.

Â So yeah, x is equal to 10. Kind of make sure of that.

Â And that means that we must in fact do sliding control.

Â Because once we hit the surface, we don't want to keep moving

Â infinitely fast along that surface, we want to slide smoothly along the surface.

Â So we have to do sliding control. Okay.

Â So in general form, this is what it looks like.

Â 7:21

The thing is, once you find out that it is Type

Â 1 Zeno, or that there will be Zeno effect, now what, right?

Â You've hit the surface.

Â You know that this is Zeno effect.

Â Now what are you going to do? Now you need to move along that surface.

Â But to move along that surface, you need to know the dynamics, right?

Â You need to know x dot. How am

Â I moving along the surface?

Â So that's what this log diagram here shows.

Â This guy in particular is the dynamics or the x

Â dot that you employ in order to move along the surface.

Â And the way you get this is by taking the

Â time derivative of your guard condition, and setting it to 0.

Â And the logic behind that is because you want to move on this line, gx equal

Â to 0, obviously because you want to stay here where g is 0,

Â you, you going to say that the time derivative of g is also 0.

Â There's no change: g is going to stay constant at 0.

Â And that's the whole intuition behind how you get x dot.

Â The actual derivation is there in the lectures, so you

Â guys can, you know, go refer to it and stuff.

Â But I'm just giving you the formula here, and I'm

Â telling you how you actually get it by setting dg by

Â dt equal to zero.

Â 8:31

And okay, let's go back to the sliding mode dynamics and [COUGH] find them now.

Â So we know that for this system, we already

Â found out our guy is going to have Zeno effects, right?

Â So now I'm going to find sliding mode dynamics by this equation right here.

Â And there are two ways of doing it.

Â One is pretty much what I told you, that I know

Â it's going to be Type 1 Zeno, so I'm just going to set dg by dt equal to 0.

Â And again, g of x is x minus 10.

Â So dg by dt is going to really be just x dot, right?

Â And then when I set x dot equal to 0, well guess what, I got my dynamics.

Â So I means when I hit the sliding surface, I just stop; x dot is 0.

Â I have no velocity.

Â I have nothing. I pretty much just stop.

Â 9:19

Okay.

Â But then, there's another way of doing it, if you don't want to go through this.

Â And that's by pretty much solving it through this expression here.

Â So you actually compute these little guys, the derivatives, which we

Â have done, by the way, and plug them into this equation.

Â And then you get x dot. So remember Lf1g was our f1.

Â Lf2g was f2, so when you put this

Â stuff into this guy, this becomes f2f1 minus f1f2,

Â which is 0. And so you get x dot equal to 0.

Â So both ways we saw that we can get our dynamics, x dot equal to 0.

Â And that was really the whole point of this slide, to show you how,

Â given a system, first you find out if it's Zeno Type 1 Zeno or not.

Â Or let's say I tell you it's Type 1 Zeno, and

Â then how do you find the sliding mode dynamics for it?

Â So all together what happens is, okay, now I've got this new mode

Â here, but I need to somehow connect it, right, to my initial system.

Â So this is pretty simple.

Â I know that when I hit the surface, I'm

Â going to go into the sliding mode, whichever mode I'm in.

Â 10:25

When I'm transitioning, I hit x equal to 10.

Â I come into the sliding mode, and then, of course, when I

Â get out of it, the sliding mode, then I come back into

Â my states.

Â And if you're wondering, you know, how how do you come out of it well

Â in this case x dot is 0, so maybe you're just going to grind to a halt.

Â But there are times where, you know, your x dot is not 0.

Â And you are continuously moving, but your condition, do you remember that Lf1g

Â condition should be 0, less than 0, something else should be greater than 0.

Â Basically vectors

Â pointing opposite.

Â So while moving, if at some point your

Â vectors stop pointing opposite directions, or they start

Â pointing in the same direction, etc, suddenly now

Â you don't experience Zeno effect at that point, right?

Â And that's how your dynamics are then going to

Â just push you out off the sliding mode,

Â and you're going to get out of it and then come back to these guys here.

Â So this is just a general form of it.

Â