0:00

What we saw in the previous lecture was how to model switch systems in a rather

Â general way using these things called hybrid automaton.

Â today, I want to show that just because we know how to design good linear time

Â invariant controllers and we know how to draw a hybrid automaton, doesn't mean

Â that we can just say, [SOUND] we're done, we can do everything we want to be able

Â to do. In fact, what I want to do today is talk

Â to you about a rather famous counter example that makes thinngs hard when

Â you're in the hybrid world. So, I'm going to answer the following

Â question, what can possibly go wrong when you start switching between different

Â controllers. And this tangle of yarn here is supposed

Â to illustrate what can happen when you start switching and messing things up

Â together in, in rather surprising manners.

Â Well, lets let's start rather modestly. Let's say that I have two modes.

Â I have x dot is equal to A1x and x dot is equal to A2x and this A1 and A2 matrices

Â they look rather innocent, if you ask me.

Â Some small negative value on the diagonals, same small diagonal negative

Â values, their epsilons is positive. And then, on the off-diagonals, you have

Â one and negative two here, and two and negative one there. Well, well let's

Â check the eigen values, that's the first thing we should always

Â do. Well, it turns out that no matter which

Â system you have, both A1 and A2, the eigenvalues are both -epsilon plus

Â -1.41j. Well, what does this mean? Well, the real

Â part is equal to -epsilon, which is strictly negative, so both systems are

Â asymptotically stable, meaning that x will die down to the

Â origin. And both of them have a nonzero imaginary

Â component, which means that you're going to have

Â oscillations, alright? So, we have asymptotically

Â stable systems with oscillations. And, in fact, let's see what happens when

Â we start combining these different modes. Before we do that though, let's actually

Â look at the modes a little bit more carefully by themselves.

Â So, here is mode 1, x dot is A1x and what I've plot that here on this axis is x1

Â and what I've plot that here is x2. What this would look like if I have time

Â here and let's say, x1, is I would gets decaying oscillations.

Â Well, we don't have that now because I plotted x1 and x2.

Â And this is where I start, in this case, I guess, I started at 1,1 and the system

Â starts flowing. And because epsilon is small, you're

Â going to get closer and closer to zero but slowly.

Â And you're going to spiral in like this. And, you know, t goes to infinity.

Â You're going to end up at the origin because you have indeed an asymptotically

Â stable system. So, A1 is well-behaved.

Â It spirals a little bit but what do we care? We're not afraid of spirals.

Â Here's A2. It also looks like a spiral but instead

Â of a tall and skinny spiral, it's a short and chunky spiral.

Â Again, we start at 1,1. And this system starts spiraling and it

Â goes inwards and then, [SOUND] it goes like this so it's also asymptotically

Â stable as it should but because of the particular eigenvectors of these two

Â systems, we end up spiraling in slightly different ways.

Â But the point is we have two stable systems.

Â Now, let's put them together in a hybrid automaton.

Â So, this is hybrid automaton number 1. I'm going to spiral, tall, and skinny,

Â until [0 1]x=0. this means that the second component, so

Â x2=0 is what this guard means, right? And when x2=0, I switch to my short and

Â chunky ellipsoid or inward spiraling system.

Â And then, when x1=0, I switch back. So, this is my first hybrid automaton.

Â Well, let's see what that actually looks like if you do it.

Â So, as always. we start at 1,1. I start in mode 1

Â [SOUND] until this point, right, where x2=0, then I switch to mode 2 which as

Â the short and chunky ellipsoid. Here, x1 becomes 0 and now I switch to

Â mode 1 again so we have 1,2,1. Now, we switch to mode 2, to mode,

Â mode 1, and so forth. And as we keep doing that, we spiral in,

Â and one thing that you're going to notice then is that we're actually ending up at

Â the origin at a much faster rate. So, this system is not just

Â asymptotically stable, it's asymptotically stabler, which is not a

Â word, by the way than the original systems, because it actually converges at

Â a faster rate. So, by switching, we were able to get to

Â the origin faster, which makes you wonder, why am I calling this a counter

Â example? Well, this is not a counter example.

Â But aha, hybrid automaton number 2,

Â maybe that is the counter example. It's the same as hybrid automoton number

Â 1, but I switched the guard conditions. So I'm switching from mode 1 to mode 2,

Â when x1=0 and I'm switching from mode 2 to mode 1, when x2=0.

Â This seems like a modest enough modification if you ask me, but modesty

Â in all modesty, it turns out that that is a huge deal.

Â Now, 1,1 is hiding somewhere here and what's happening is that we're now

Â starting to spiral out. So now, here we have, for instance, that

Â x1 became zero. Now, we're switching to the, the fat

Â spiral. Here, x1 becomes 0 and we're switching to

Â the skinny spiral. And in this way, we're going to end up

Â getting further and further out. And this is indeed an unstable system and

Â this is a little bothering to us because I took two stable systems and I put them

Â together in a hybrid system, and I got instabilities.

Â So the punchlines here is, first of all, stable modes by themselves,

Â that's not enough to guarantee that the resulting switch to hybrid systems is

Â stable. In fact, you may induce instabilities

Â through switches. And that's a little bit of a downer, to

Â be completely honest. The other thing is that you can actually

Â reverse this and say, you could even design unstable modes, which we're never

Â going to do. But you could and actually get a switch

Â system that is stable. So basically, you could reverse time when

Â we, what just looked at. And we get to unstable modes that renders

Â the switches But here is how we actually will approach this.

Â We will design stable modes because it would be suicidal to design unstable

Â modes and then hopefully, miraculously hope that the switches will, will take

Â care of it. So, we're going to design, design stable

Â modes but we need to be aware of the fact that the new system is not stable.

Â And, in fact, it would be nice if we could check that either analytically or

Â at least in simulation because the hybrid world is a little bit scarier than the

Â nonhybrid world.

Â