We've seen now how to do prototypical rate Lyapunov functions,

typically energy like things.

We have states which is sometimes the spring mass,

the spring energy like things or these natural log functions

or other kind of- I've shown you convenient ones for CRPs,

MRPs, all the parameters and euler angles.

We're not going use euler angles as much.

Now we're going to put this all together.

This becomes kind of a lego block.

We've done some of the math already.

You will do more of it then by hand.

I want to really focus on the concept again.

This is where- It's not- You're not going to learn if I just do all the math.

I'm going to show you substeps.

So, right now unconstrained control, that's a key assumption,

that we are not including saturation of our,

you know, we have infinite thrust.

And we get whatever thrust or torque we are asking for.

It's not just bang, bang like some thrusters are only on-off.

We're assuming this is magic thrusters that's,

you know, tunable, variable, gets you everything.

But that's where we start with the control theory.

A lot of it is based on this.

So now our dynamical system,

this is a rigid body.

We have our control vector, it's you,

and I'm actually also including L which could be some other disturbance.

This could be your gravity gradient torque,

this could be a disturbance torque you know about,

this could be the solar radiation pressure, atmospheric drag torque.

If you know about it,

you might as well throw it in your control,

it'll make it easier to converge, right?

So we're assuming we know all the environmental torques acting on the system here,

and then we'll relax that assumption and show you what happens if we

have unmodeled torques and how is impacted.

That'll be next lecture this afternoon, yay.

OK, so external stuff, this is our control vector.

So in the end our goal, right,

now we're not just driving Del Omega to zero or Sigmas to zero,

I want both to go to zero.

I need my attitude to lock in and point directly at Maurice and be steady.

And no matter what happens with my translation this becomes a time varying reference,

right, that I want to track a landmark on an object.

So, we're going to solve the reference tracking problem first,

which is always a little bit more complicated.

The regulation one is the same math,

it's just a lot of other terms drop out.

You don't have omega Rs or omega R dots and so forth, ok?

But this is what we've seen,

we've discussed that already,

Delta Omega is omega B relative to R,

omega is B relative to N,

Omega R is R relative to N. Sigma,

in this case, is Sigma B relative to R. So in the book I am keeping the same notation.

I don't make it explicit otherwise those equations just become incredibly verbose.

That's a little bit engineering common sense comes in.

This is a tracking problem I understand,

this is B relative to R, right?

In your simulation if you implement this you're actually integrating B relative to N,

and you keeping track of R relative to N,

kind of like your project you're doing right now too.

And then somewhere in that math you are going to compute what is B relative to R with

DCMs or MRP addition subtraction formulas or whatever you want to use, right?

So that's what we've assumed we've already done.

We have B relative to R. And we want to bring both of these to zero,

that means I'm really aggressive and I want to asymptotically stabilizing one,

and in fact I'd like it to be globally asymptotically stabilizing, why not?

So, let's go through that.

You've seen the kinetics equation,

this is a kinematics equation.

So again, the sigma is B relative to R Delta Omega is

omega B relative to R. This is just written out in the classic control formulation.

Already Lyapunov function this becomes cookie cutter.

We're going to use our kinetic energy like turn which was, you know,

inertia over to Omega squared,

but instead of omega we're throwing in Delta Omega for a tracking problem.

And for the attitude we've chosen this beautiful positive definite function.

If the attitude errors are zero,

natural log of one is zero so that's good.

And if attitude errors are non-zero,

it's a number bigger than one,

which with the natural log is always a positive number.

And it actually also,

is this a readerly unbounded function, Kelly?

You were asking earlier.

If Delta Omega go to zero- go to infinity, does this function go to infinity?

Delta Omega goes infinity?

Yes. Right, for radially unboundedness we're talking. Trevor.

What you think?

Matt?

Look it does to me.

Yeah. It's basically, you know, this is

just a constant inertia tensor of rigid body times Delta Omega squared essentially.

If Delta Omega goes to zero,

this term is going to blow up very, very aggressively.

So, if it goes to infinity,

it's going to blow very aggressively to infinity.

Now, let's look at this one,

is this one radially unbounded?

What do you mean?

If you're switching then it's not because-.

Ok. Let's not switching. Let's do first

without switching but we'll talk about switching afterwards.

If Sigma goes to infinity what happens to the natural log?

Goes to infinity as well.

So, without switching this is a radially unbounded function.

And even if we do switch at least this

monotonically increasing onto that point which will take advantage of.

So the switching is a separate discussion.

I will get to right now.

Let's just show off that quickly.

I just said, l'm just looking at general Omegas.

So both of them - this is true for any initial condition -

is always positive definite and it's radially unbounded, right?

So we're on the right track to have a globally stabilizing control.

Wow, what did I do?

Now, we take derivatives again as before.

We actually- this needs a time derivative of a scalar,

so we get to choose as long as we are consistent,

this is in terms of tensors and vectors,

this sigma is not a vector.

There's no body frame derivative of MRPs.

MRPs are just three coordinates.

This is a matrix in this notation.

So keep track of that. We use the same transposes and sometime, you know.

But attitude are not vectors.

So in this case it's just pure matrix math and we know Sigma dot was

equal to all of this stuff in terms of matrix math.

In fact, this vector had to be expressed in the B frame for all this to work out.

This side though we get to choose and, of course,

we pick B frame as before because it's rigid and this derivative goes to zero.

But you're still left with this which we've already done in the rate tracking function.

Now I'm going to set all these derivatives equal to this function here.

Minus P transpose, minus Delta Omega transpose P Delta Omega,

and P again is symmetric positive definite.

So, what we had before?

If I do that what you find with me doing the complete sixth off,

this is Omega squares, this is attitude squares.

If I differentiate you could have added two times acceleration,

and for this one which is attitude's square,

you're going to have attitude times rates.

Both of them are going to have rates always,

and you can factor out the rates.

That's what I've done here.

So this gives me the derivative from the rate part,

this is the derivative that we have on the MRP.

You're proving that the derivative of this in your homework is equal to this.

But you get that linear term,

but I can factor out Delta Omega.

This is how we can now if we set the V dot equal to this.

Because we can factor out Delta Omega,

the right hand side can only be a function of the Delta Omega,

otherwise this trick doesn't work.

You can now plug in the equations of motion

and set this bracketed term equal to minus P Delta Omega,

kind of what we did with the general mechanical systems.

It's the same trick that we're applying.

And from here this has to be equal to this which I can bring over.

This gives me my closed loop dynamics.

I need to find the control now that achieves this,

and if I can do that,

I have proven a certain level of stability.

What type of stability are you going to have if V dotis equal to this?

What we will have proven?

Mendar.

Brian.

Stability.

OK, why? What is a definiteness of V dot?

Is it negative definite or negative semi definite?

Negative definite or

Negative semi definite?

Why?

Cause if Delta Omega is zero, is equal to zero.

Well, that's always needed for definiteness.

Sigma is also [inaudible].

Yes, this is what we had with the spring mass damper system.

Remember? As soon as we put that dumping in there,

we still got a V dot that was just minus C times X dot squared.

So V dot is going to be zero,

if extortive is X dot squared.

This V dot it's going to be zero,

if Delta Omega is squared but we care about Delta Omega and Sigma.

That's where I really- I don't write it here on purpose because I want you guys to think.

But if you are writing out, I would really recommend keep writing the dependency,

that way you don't lose track from one problem to another.

What are the goals.

So we know Delta Omega is going to have to go to zero for V dot to be zero,

but we don't know what the attitude will be as it come to rest pointing 10 degrees off,

or does it come to rest pointing precisely where it needs to be.

So this is actually, as Brian saying correctly, it's Lyapunov stable.

I have not proven

asymptotic stability but that doesn't mean it's not asymptotically stable,

that's a phenomenal stuff.

I've just come up to this level of stability argument.

We have to do additional stuff.

The higher order derivatives which will get to.

So with this- if we can find a control that

satisfies this stuff which leads to disclose the dynamics,

we've guaranteed at this point actually globally stable system but not convergence yet.

So, how do we get this control?

Here before we already- we've seen what this is,

I'm just reviewing it here.

You plug all this stuff in and then here you have your I Omega dot,

that's where you plug in your actual dynamical system,

the rigid body differential equations.

And you do that and then you solve for the Y that makes all of this balanced.

And that's what we have here.

And you can see this control, thanks to this Lyapunov function,

that's a natural log with this linear term that we ended up with here.

The control is basically a linear with a scalar gain,

I can't get a matrix gain here with this proof.

But I've got a proportional feedback,

I've got a rate feedback, right?

Here I can have a fully populated P-matrix because that's how I wrote that one.

And then these other parts are your feed forward

feedback compensations that you have to guarantee complete stability.

It still has the quadratic rate part,

so if you wish you could replace Omega Tildy with

Omega R Tildy as I showed you earlier with the rate based control.

And that gives you also globally stabilizing but a slightly different performance, right?

So, they're all good but that's it and again,

implied in here is I just have vectors,

and then I have a matrix but I am assuming

all these things are going to be computed in the right body frame.

So Omega R, if that's given to you in the reference frame,

you have to map it.

If it's given to you in the inertial frame,

you have to map it to the body frame,

make sure all these things are mapped to the right frame first. Yes, sir.

Talk about how you would go about populating metrics like P.

You want to have like some sort of properties

but there's like just tones of degrees of [inaudible].

Yeah, I'm smiling cause that's a whole other class by itself to do as well.

For now, we're just going to say the P equal to as a single scalar,

and times identity that goes there,

will have a class period on feedback gain selection where I show you

what we can- and what's good here is this control, just jumping ahead.

This control linearizes extremely well,

and as son as we linearize a closed loop response.

We can now use classic linear control theory

and do root locus placements or Nyquist a bit,

you know, you can get all that stuff.

Now, why do we even have to linearize it?

Take a look at this equation.

That's part of our closed loop dynamics.

This doesn't look nonlinear.

Where does the nonlinearity appear in our closed loop dynamics?

So, all these little subtleties.

Jordan, what do you think?

Would you agree nothing here is non-linear in terms of the Delta Omega and sigma?

Delta Omega and Sigma is all appeared linear.

It looks like it.

OK. So, what else?

This is only... How many differential equations do we need for this?

The state vector is actually six dimensional, right?

This gives you differential equations for three,

this is a three dimensional vector set or matrix math.

What are the other differential equations we have to solve?

The kinematics, right?

So with this control,

with this Omega Tildy not omega R Tildy,

I end up with this which is the kinetic side of it,

the closed loop is perfectly linear but my kinematics is non-linear.

But we've argued with MRPs.

Man, these MRP kinematics linearize extremely well like up to 120 degrees,

it's just barely smidgen off.

And up to 180, yeah, it gets off but it's not crazy off, you know?

So from a feedback perspective this is really

attractive because now you can pick games where with

linearized theory I can really predict what the performance is going to

be and the actual thing is off by a fraction of a percent.

So, we'll get to that more when we get to gains. Yes.

Wouldn't like implement our linearized version

you would linearize to try to tune in again?

Yes.

Then you use those like a starting point when you

want to tuning in in the non-linear setting?

Exactly. And those gains are really good for errors that are,

you know, 60 degrees, 90 degrees, all kinds of rates.

I don't do any post tuning,

I just pick them because I know from closed loop performance I want

this kind of stiffness for disturbance rejection.

Now I use all the classical theory.

So that's the beauty of this control with MRP.

I did it with constraints,

everything is there and I have global stability argued right now.

OK. Because V dot is only negative semidefinite.

There is no Sigmas that appear here.

If you added Sigmas here,

you can't do this math to solve for a control.