0:06

So, okay, we've just wrapped up,

what does it mean to be positive definite, positive semi-definite?

Now we want to tie this back to stability, right?

We care about what if I perturb something slightly?

What if I perturb it a lot?

I don't want to have to linearize.

How do I now apply this?

This is going to fall into place very quickly.

This is the Lyapunov direct method basically.

It says now, [LAUGH] the next step is we're talking about, besides definiteness,

what is a Lyapunov function?

And once we've proven we have a Lyapunov function, actually we've proven stability.

You will see the last step is very anticlimactic.

So a Lyapunov function is always a scalar function like kinetic energy, right?

But it's in terms of whatever all your states are, which could be omegus.

If you use kinetic energy of a rigid body,

it's one over two omega transposed i omega, right?

And we just mentioned i is a symmetric

posit definite matrix which makes kinetic energy actually.

It's only going to be zero at zero speeds, and

everywhere else it's nonzero, that's something we'll be using a lot.

So a Lyapunov function is always a scalar function subject to this dynamical system.

And we're going to throw in our equations of motion, and attitude, and rotation and

everything.

And we're talking, if it is continuous this function and

there exists in neighborhood, such that for

any states, that we are arguing local stability here with Lyapunov.

There is a neighborhood that if you're staying within that one,

this v function is positive definite about x r.

So you know what that means.

It's kind of like x squared is the bowl shape, right?

There is a Lyapunov function, this Lyapunov function has continuous partial

derivatives, that's one of the requirements.

It takes two lectures to explain why, but that's important.

And then the last one is V dot is negative semi definite.

So once you define this V, you can take its time derivative.

Like we've done this with kinetic energy, and

then we took the time derivative kinetic energy which gave us the power equation.

And actually you had to derive that in your exam.

We're reusing the same math here.

It just doesn't have to be explicitly kinetic energy,

you can throw any mathematical function in here that satisfies these properties.

And you will see some things that we do there.

But if it has these properties, then we're good.

Then this function is a Lyapunov function.

2:30

So this part in particular, V dot being negative semi-definite is important.

Because that means Vdot being negative everywhere, or zero,

if I have zero power loss.

That would be no external torque acting on it or it's acting in very particular ways.

Then the v function just stays constant and it's kind of like boundedness.

Okay you've got some tumble, you've got some air but

you can bound how big they are.

They're not going to get worse, they're not going to get bigger.

So an object tumbling without external torques may have a tumble.

But you can come up with bounds around that to say,

hey it's not going to spin up, it's not going to slow down and come to zero.

But it will be within this area, all right?

Being negative is good because that means we lose energy.

And our energies are,

these V functions are always defined relative to a reference.

So these things start to always decay, these Lyapunov functions getting smaller.

You're constraining yourself to be around that reference trajectory.

And now we start to get closer and closer, doesn't guarantee conversions yet.

So that's because they're semi-definite.

Now, there are sports where you might have saddle points and it doesn't go on.

But that's the key properties, the things we always check for is we come up with

the v, prove it's symmetric, sorry, prove that it's positive definite about xr.

And prove that v dot is negative definite.

When you evaluate this, v is a function of x.

So to get the time derivative you do basically chain rule.

You take the partial of v with respect to x.

And then the derivative of x with respect to time, which is x dot, and

x dot is nothing but f.

So, visually, that's a scalar function,

that's the gradient operator times your dynamics.

So they often draw these balls in this graph.

And what it guarantees is that projection is always, if this is less than here,

you're either getting closer to the origin.

Or you're staying the same distance if this v dot is equal to 0.

So, you're kind of orbiting the origin, and that's what it means graphically.

4:50

And we can do this, you'll see examples in the homework.

We do this pendulum problem specifically in the homework where you come up with

the simple Lyapunov functions, do these derivatives, prove these properties.

And you can prove, for this one at least, it's stable.

Again, not asymptotically stable, Lyapunov stable just means you can pick any epsilon

finite, and then there's an initial set of conditions that will get you there.

5:16

Any questions on this?

This is a lot of definitions today, Teebo.

>> Negative semi-definite, that means the derivative,

that means it actually goes like this?

>> Yes exactly.

>> Does that, okay.

>> No this is the bowl V, not the V dot part.

But the derivative, the gradients of that have to be always pointing inward or

not outward at least.

Your v function, my v function itself never gets bigger with this stuff.

I'm not driving in outward in a sense.

So let me draw a quick example, just to visually kind of highlight that.

If this is your v function, basically no matter where you are here.

And this is a multi-dimensional thing, if you keep losing energy levels

then these levels are going to, by the nature of this function are going to con

strain you closer and closer and closer to being through the origin.

But if we have a Lyapunov function that's not just an x squared,

in multi-dimensional space.

Let's say we have a Lyapunov function that does this, and then goes to zero.

You can see here we took the gradients protected by that.

You get regions where yeah, this works well here.

But all of a sudden on the outside with the gradients

you're actually going to be driving it further out.

This wouldn't be a globally stable system,

this would probably just be a locally stable system in this case.

>> My point is that the derivative V dot close to zero is positive.

6:46

But it's negative on the left and positive on the right, I mean I guess I don't-

>> This is v not v dot.

>> Right.

>> I'm just trying v.

>> And v dot would look like?

>> And vdot would have to have a negative form, that if you're here,

if this is a stable region for example.

If you do the v dot times, that's the partial of v,

get it's gradient dotted with f, your equations of motion.

So now you have to put in the right equations of motion with this function.

I can't prove it without applying it to a specific dynamical system.

But basically, this is going to be a region where you are actually being

driven, the gradients are driving you towards there.

Whereas out here, the gradients are driving you away.

I mean, that's a little bit of a visual interpretation, not particularly rigorous,

but sometimes it helps people understand that.

7:31

So we'll pick up here, this is called Lyapunov's Direct Method.

It's a way to prove the stability properties without

ever solving its differential equations.

So we get these energy like Lyapunov functions.

And so we've gone through definiteness.

This is the Lyapunov function that we have.

We just went through this three different conditions, and

it's all defined relative to a reference.

And this includes regulation and tracking and everything.

And basically v dot, these here,

this is not an explicitly time dependent function.

So to get the time derivative, you have to use chain rule.

Take the partial of v with respect to the states,

times the derivative of the states at the expected time, that's your x dot.

You plug in your differential equations, and it's basically the gradient

of your Lyapunov functions mapped on to your dynamical system has to be negative.

So it means that at best you're always converging to the origin,

at worst it's negative semi-definite.

If this v dot is zero, that means over time you're holding the same v value.

So if you think of a two dimensional ball it just means you're moving along a rim.

That's exactly what would happen with a spring mass system.

You could think of this as kinetic energy, and

in that case with a spring mass potential kinetic energy right.

Energy is constant and you have a v dot that is zero, that's what's happening.

So that's what makes this Lyapunov stability means you can find such

a function with all these properties around the states of interest.

Here I put it as the origin, but it also could be the [INAUDIBLE].

So let's look at spring mass system mathematics.

A spring mass is quite simple, we've go mx double + kx = 0.

No damping, I'd have to come up with the Lyapunov function, here, and

basically using total energy.

And you will find that anti, when we do the Lyapunov function,

they're often inspired by energy, but they don't have to be precisely energy.

Any function that satisfies these properties is useful.

But energy is a good source of inspiration to come up with mathematical structures

that are quite convenient, as we'll see.

So, this first part, mass over 2 velocity squared is kinetic energy.

Spring stiffness over 2, times deflection, squared is your.

9:38

No, that's kinetic energy and then spring energy.

So that's potential, kinetic, that's a total energy.

If we use this, you take its time derivative.

So with chain rule you get mass over 2, times 2, times x dot, times x double dot.

2s cancel out, and you're left with m, x double dot times x dot.

I factored out x dot, this one I'm going to do, again, same thing.

You're going to get k2 xx dot divided by 2.

The 2s all cancel, you end up with k times x times x dot.

Great, now the last step is here.

This is just taking this Lyapunov function, differentiating it.

You still have to plug in the equations of motion here.

So this bracketed term, you could solve for x double dot, plug it in.

Or just realize mx double dot + kx, by definition, is equal to 0, right?

So the v dot in this case is 0, which I'm labeling as negative semi-definite.

It satisfies the properties, it's 0 at the origin [COUGH] and it's negative or zero.

In this case, only zero, but that includes that case everywhere else, all right?

So this a Lyapunov function, and therefore,

the spring mass system is Lyapunov stable, within these things, which is good.