0:07

Now we're coming to the last topic in control theory.

Â I don't have any explicit homeworks on this.

Â This took actually quite a bunch of algebra, where was this?

Â Either my postdoc year or my last years of PhD student,

Â we were just publishing some work and

Â one of the reviewers self-identified which they don't typically do.

Â And he said it was really nice work and everything else but

Â you don't cite my work.

Â Which is, happens.

Â But he was right, we hadn't seen it.

Â There's always just pockets of community beside each other and

Â then sometimes you just haven't seen that group, and didn't read that journal,

Â and didn't know it existed.

Â And this was a paper I just honestly didn't know existed.

Â From it's a very interesting paper.

Â And so far we started out with, these are the dynamics.

Â I have to have a way to come up with the control to guarantee stability.

Â So we use Lyapunov methods, and the Lyapunov method kind of dictates

Â to make v dot this form, this is what the control must be, right?

Â Sometimes we can tweak some things and still guarantee negative and so forth.

Â But it's pretty much dictated by that.

Â They took a very different approach.

Â They're going to approach is going to see,

Â let's have a perfectly linear closed-loop dynamics.

Â Not something that's almost linear, like with MRPs that we're getting.

Â We want perfect linear closed-loop dynamics.

Â 1:19

How do we come up with a control to achieve that?

Â And that's what I'm going to show you here.

Â It's kind of fun, elegant, it brings all the stuff together.

Â Has a lot of kinematic properties that we've seen back from chapter three that

Â are going to come back again.

Â And some amazing math that simplifies to levels I didn't think it would.

Â [LAUGH] So you do the math, this is really pages.

Â We think all the primary addition property is bad, this gets pretty bad.

Â But it's fun, it's nice.

Â So linear closed-loop dynamics, that means their epsilon here is actually

Â the quaternion vector part, that's beta one, two, and three, right?

Â If epsilon goes to zero, your attitude error went to zero.

Â Maybe you went the short, maybe you went the long way, but

Â your attitude errors went to zero, right?

Â So, and if you want to deal with unwinding, you can switch.

Â We know how to handle that, but if you start out with these, you can specify,

Â look, I want something that looks just like this.

Â It's perfectly linear in terms of my attitude errors.

Â 2:12

And you can add now things like integral feedback pretty readily and

Â you can do all kinds of classic linear control formulations you can throw in

Â here quite readily.

Â And this is the closed-loop response.

Â So these gains, this will be perfect.

Â It'll tell you precisely what the settling time is, what's the natural frequency,

Â what's the damped frequency?

Â With my MRP one, I was close within a few percent, but this will tell you for large

Â motions precisely because it is a linear system once you've feedback compensated.

Â Some of the nice aspects of their control is when we had our control, and we put

Â everything in the closed-loop dynamics from the kinetic side, we have this.

Â This is all linear but

Â we know that sigma differential equations are slightly nonlinear.

Â But it's also inertia in here.

Â So we're closed-loop response.

Â If I pick certain piece in case and then make my inertia ten times larger,

Â I'm going to have a different response, right?

Â Here in their form, they don't want any system parameters appearing.

Â So there's no inertia happening up here.

Â Which is nice because then you get to control automatically.

Â I want it critically damped,

Â you pick the right P's and K's that will be critically damped.

Â And you can throw in the inertias but

Â you don't have to change the gains, it will be critically damped.

Â So just subtleties, conveniences.

Â One doesn't exclude the other.

Â So this is what we'd like to have.

Â This is what we have had.

Â And we know there's a nonlinear relationship between this and this.

Â So these aren't exactly linear yet.

Â How do we get this other form?

Â 3:37

And so really what you have to do is here, if you wanted to substitute everything

Â with del omega, we know sigma dot was one over four B.

Â I think there's a one over four missing here.

Â But times the del omega, if you had del omega dot,

Â you have to differentiate those B's, you've seen that matrix, lots of terms,

Â you have to take its sine derivative, chain rule, that's more terms, all right?

Â And substitute, and that's definitely going to be messy.

Â 4:01

All right?

Â It's going to be messy, but the question is, does that mess lead somewhere elegant?

Â And I think it's one of the reasons why I love astrodynamics so much.

Â These other fields, structural mechanics, fluids,

Â really complicated, complex nonlinear systems.

Â Strongly coupled, nanofine, and all that stuff.

Â 4:18

If you look at complicated systems, it just gets even more complicated.

Â You add an extra thing, it gets even more complicated.

Â In astrodynamics, in translation and in attitude.

Â It's amazing how often with the right formulation, the right kinematics,

Â we end up incredibly elegant,

Â simple solutions that comes out of this stuff which, to me, is very exciting.

Â So occasionally we get a little carrot,

Â it's not just being beat over the head, prove all the parameters from property.

Â But at the end, it was a beautiful simple one.

Â This was another case, so I want to show you, outline you, how this math and

Â logic works.

Â You won't be following all the details of the substeps.

Â But the logic of how we have to implement it, and why these quaternion properties,

Â and also vice versa similar MRP properties can be exploited,

Â becomes very apparent in this formulation.

Â So, that's why I've chosen to kind of end the control discussion with this one.

Â So our desired thing here is I'm going to follow up.

Â Which did it in terms of quaternions.

Â So their epsilon is beta one, two, and three,

Â the vectorial part of the quaternion.

Â And they want a perfectly linear closed-loop dynamics.

Â And we have this dynamical system.

Â So the question is what control u do we have to create

Â such that the error response perfectly satisfies this?

Â And this becomes basically an inverse dynamics approach.

Â We start out with a desired closed-loop dynamics and

Â then we have to back substitute everything and solve all the algebra back for u.

Â So right now here there's no u in site so we have to get there.

Â All right?

Â So this is a step.

Â How do we make this work?

Â Well this is the definition of epsilon, you can see the classic definition.

Â If you go back and look in our quaternion notes, there was some other formulations,

Â this is the T matrix, it's a three by three.

Â The quaternion, the beta dots had these four by three times omega so

Â that's that lower three by three part.

Â Basically that's where that T matrix is.

Â It's a three by three matrix defined here and you can see it's a diagonal of betas

Â so zero times a diagonal of identity and the other three that's actually nothing

Â but a skew-symmetric matrix, that's nothing but epsilon tilde.

Â So, different forms.

Â You can look it up.

Â Nothing too fancy yet.

Â 6:22

Now, we want to start to simplify all this stuff, and

Â we want to be able to substitute it back.

Â We had epsilon in equation, epsilon dot, and epsilon double dot.

Â Epsilon, we have.

Â What is epsilon dot?

Â In the end, everything has to come out something in terms of our control.

Â So we have epsilon dot, good, we take its derivative, with chain rule,

Â that would be a T dot and there'll be an omega dot.

Â Go okay, that's moving along.

Â How do we find T dot?

Â Well, T was defined as beta nought times identity plus this epsilon tilde so

Â T times omega is this term.

Â If you just differentiate T, you get a dot here.

Â And you will also have a tilde dot, but

Â epsilon tilde omega is the same thing as minus omega tilde epsilon, so

Â if I just differentiate the epsilon part, you can put that dot outside.

Â And you get it.

Â The B dot has this differential equation,

Â again you can go look at your quaternion math side, you can quickly validate that.

Â And go okay, we've got that term, so we can plug it in.

Â The epsilon dot, we've already got defined up here, so that's good.

Â So we can plug that in.

Â And what we're really looking for is the epsilon double dot.

Â So now we've plugged all these in here, we can take this term and plug it in there.

Â As you can see, lots of algebra.

Â Even when you know how to find the answer.

Â So in the end, we get, after substituting all that stuff,

Â this is our epsilon double dot expression.

Â 7:45

So we're going to look at that second term that's right there that will make it tilde

Â T omega and explore that a little bit.

Â T was to find as beta naught identity plus epsilon tilde so

Â I put that in front But you can see here, several things are going to happen.

Â You've omega tilde times identity, that's omega tilde, times omega.

Â That term is going to go 0 exactly.

Â So we can factor it out, and this is going to vanish in a moment.

Â The other one is just going to be omega tilde,

Â epsilon tilde and omega, so that one vanishes.

Â And I reverse the order, so that vector cross product,

Â epsilon tilde omega is minus omega tilde epsilon.

Â So now I have that form, and you go, okay, that would go here but

Â it doesn't really help yet.

Â So omega tilde, the omega tilde's really a double cross product rule.

Â And we've actually used this earlier in class and some homeworks.

Â We had I think e hat, e tilde squared, it's one of those proofs we had to use.

Â You can prove this then with cross product rule.

Â This has to be equivalent to this.

Â So if this gets applied here, this becomes this expression in the end.

Â 8:56

And you can actually carry omega transpose, epsilon as a scalar so

Â I can shift it in front.

Â And this is just omega squared, identity times epsilon is just epsilon.

Â And now you plug this in here, you can see this term and this term perfectly cancel,

Â which is very nice, because we had enough terms to carry along.

Â So after all of this math, in the end,

Â epsilon double dot just has this expression.

Â Which is encouragingly simple [LAUGH] at this stage, at least.

Â So now we have epsilon double dot in terms of this stuff.

Â We have epsilon dot already that we had from the differential kinematic

Â equation from quaternions.

Â You plug all this stuff in and in the end you get this expression.

Â 10:03

It does break down, at 180 degrees.

Â But otherwise, this is always full rank so we can do this.

Â But already here, we get a little bit of an inkling that while we're using

Â quaternion that are always a non-singular, you can describe any attitude.

Â There are some odd things happening on 180 argument.

Â And this will reflect itself in the control.

Â But that basically means this bracketed term must be 0.

Â So let's see, this T inverse we can actually simplify.

Â You can show that T inverse is the same thing as T transposed plus this

Â outer product.

Â And the T itself, we can plug in.

Â So you can put all that terms in there, or algebra.

Â And quite a bit of algebra actually, but

Â this can be crunched down to this form in the end.

Â 11:01

And it's -P omega, that look just like our classic proportional feedback and rates.

Â There is some 2 times K instead of just K, times epsilon, so

Â that's kind of our proportional feedback on attitude.

Â Here we have omega squared times epsilon, definitely a non-linear term.

Â But it's essentially this one little non-linear term that was needed to turn

Â this other system into a perfectly linearized closed loop dynamics.

Â So that was a bunch of algebra, you get down to this form.

Â So how do you implement this?

Â Well, this is still the system we're controlling.

Â And again, I'm showing a single rigid body.

Â Next lectures we're going to talk about CMGs and reaction wheels and so forth.

Â It's just extra gyroscopics, it's still the same.

Â What this dictates is this is the angular acceleration you must

Â achieve on your dynamical system.

Â So you just plug it in here, you put this omega in here and then back solve for

Â your control.

Â And if it's reaction other things,

Â it's just a different term of the control you solve for.

Â So this scales and you can lift it up from this problem to other

Â classic actuation methods very readily.

Â So now if you solve for the control, like before, we feedback compensated for

Â the omega tilde i omega with the of one that we derived.

Â We had a minus again times omega, so that's here, but

Â here that gain gets scaled by inertia.

Â That kind of makes it work, that's fine.

Â And, because you can compensate, whatever the inertia is you can adjust, but

Â this also comes out of the fact that our closed-loop dynamics didn't depend on

Â inertia.

Â We knew at some point, if your craft it's ten times heavier than the first one,

Â 12:32

your control has to be stronger to get the same critical response.

Â That's why it's the gains times inertia, this gives you that automatic scaling.

Â But then the last part we've got a gain times the attitude error and

Â that's the non-linear part that happens still.

Â So that's actually pretty neat.

Â It's not that different structurally than our earlier derived control.

Â Fundamentally, the only new term is this one, this coupling with the attitude.

Â That was it.

Â But do you see any issues with this control?

Â >> Need to know the inertia, so it's not robust.

Â >> Right, so, well, you can't guarantee it's not robust, but it's, you have to

Â know the inertia, so you'd have to investigate robustness, how robust is it?

Â And I've tried it, actually, with inertia errors of 40%, 50%, 60%,

Â still works pretty well, so it's not necessarily sensitive to that, but

Â you do need to know inertia, absolutely.

Â >> The fact that the inertia is in the control doesn't mean that it's not robust.

Â >> Right. >> Okay.

Â >> It just means you have to do extra tricks, because maybe it does.

Â Maybe the control performance is impacted by it but it doesn't.

Â 13:38

Well, it's only to know inertia.

Â Yeah, just because it depends on inertia, doesn't mean it's very sensitive to that.

Â Sensitive would means hey, a small epsilon off and I get three times the error or

Â something.

Â If you're off by 5, 10%, it actually converges just fine.

Â It may take two seconds longer,

Â three seconds longer, some small differences like that.

Â But what's the other issue?

Â There's one big glaring pink elephant in this slide.

Â Nobody's raised your hands yet with this control.

Â 14:38

>> Theta 0?

Â >> Right, so what is the vectorial part of quaternion divided by the scalar part?

Â What do we call such coordinates?

Â >> CRP. Yes, it is CRP.

Â All right, we took beta i over beta naught, that was the definition.

Â This is just written in vectorial form.

Â So even though we derived everything in terms of quaternion thinking, yeah,

Â it's going to be non-singular, wonderful,

Â global, the control that dies it turn our it's feeding back CRPs.

Â Which means this beautiful perfectly and linear stabilizing control,

Â actually turned out to be quite robust, cannot handle this.

Â 15:37

Very similar, this is very similar.

Â But again, the inertias appear somewhere, and

Â this has to do with how we define this.

Â So there's not much difference to this, so that's good.

Â But in essence, despite using quaternions in deriving it,

Â we end up with essentially a slightly modified CRP feedback control.

Â With some nice closed-loop properties,

Â at least from a performance prediction perspective.

Â There's nothing inherently better with linear versus nonlinear but

Â you have more tools for that.

Â If you wanted to add integral terms, it's really, we've already computed this,

Â we've computed this.

Â This just becomes an extra term you kind of carry along in all that algebra.

Â And this stuff stays all the same but this extra term,

Â once you do this t inverses and plug it in and do stuff.

Â You end up with this extra term that you have to compute.

Â So you can pretty readily now include robustness enough on model

Â torques by using an integral feedback term on the closed-loop dynamics.

Â But still you can't do this.

Â It would've blown up several times right there, 180.

Â But whatever you do with this method the strategy is always you solve for

Â angular acceleration.

Â And then plug it into dynamical system and back solve for the control.

Â This is the control that will make this act this way, except for

Â 180 which is a problem.

Â If you're doing tracking it's the same mathematics again the kinematics

Â are the same.

Â This exelon is b relative to r now, instead of b relative to n.

Â And you need omega b relative to r which we often call del omega.

Â All right, it is omega b relative to n minus omega r relative to n.

Â So when you solve for del omega dot,

Â you've actually found omega dot minus omega r dot.

Â And to plug into the equations you need omega dot not omega r dot.

Â So all you have to do is put this over to the right hand side which is what

Â we have here.

Â And now so with that little simple modification I can do a tracking problem

Â with perfectly linear closed loop dynamics.

Â But I still can't track with errors exceeding over 180 degrees, right.

Â But there's nice simple extensions that you can do with this stuff.

Â So this is why I love MRP's, right.

Â 17:47

it's inverse was very analytical.

Â It was just a transposed plus an extra term.

Â So it had some nice easy analytical inverses.

Â If you take a three-by-three general matrix and go to mathematic and ask for

Â an inverse it takes half a page already.

Â And you can imagine the algebra you have to grind through and try to reduce and

Â simplify.

Â It will put all the parameters in property to shame.

Â So MRP's, were not orthogonal then that b matrix but it was almost orthogonal.

Â Let's see if we can use that.

Â So that was the property we used for the quaternions and

Â we want to use MRP's now which are, okay if a single MRP can't handle this but

Â I can switch it 180, right?

Â So I'm hoping I get a control in terms of MRP's because it handles 180 and

Â then I simply switch the descriptions.

Â And this inverse is like this.

Â Now, I'm not going through the same, it's basically the same type of derivation.

Â But different kinematics thrown in and

Â your inverse kinematic dynamics, everything you're solving it.

Â This is what we're looking for, perfectly linear MRP differential

Â 18:47

close to dynamics essentially differential equations.

Â And much, much, much algebra later.

Â This is the omega rate you have to have.

Â It's still the same minus p omega.

Â I get a gain times sigma, but you can see that gain now get's modified by this term.

Â I still have an omega squared times the attitude measure and there's an omega,

Â omega transpose that comes in.

Â So not quite as elegantly simple as the quaternion control, okay.

Â 19:14

But the best part is this thing is now feeding back on MRP's.

Â There's nothing dividing by zero ever unless I have sigma go

Â to infinity which of course I wouldn't.

Â Because at some point I can reset my state errors and say, okay,

Â I know I'm guaranteed stable up to this point.

Â Now flipped upside down, I'm simply resetting my control problem.

Â And even then with a switched linear system you can guarantee global stability.

Â So I can switch my MRP's and run this control.

Â And this gives me very predictable close loop performance in that sense for

Â extremely large motions.

Â And it's also very robust.

Â I've tried it with pretty large errors because inertia errors and tumble rates.

Â because this omega dot you put back in the equation which gives it an inertia tense

Â a times that again.

Â 20:00

So this is kind of the last slide on this when I actually applied it.

Â You can see a simulation with some inertias and I've got some attitude

Â errors, I don't tumble to crazy here actually I don't flip.

Â But this gives me if you would super impose this on top of the linear

Â post dynamics I gave with these initial conditions, it's a one to one match.

Â So you found the control that perfectly give you the linear system.

Â And it's a little bit more complicated than the quaternions.

Â But compared to the quaternion one, which ended up being a CRP feedback,

Â these can handle tumbling, tumbling, tumbling bodies.

Â And if I back in my post-doc days I've ran lots of simulations like this.

Â And I was quite impressed with the overall performance.

Â So even dealing with saturation, uncertainties, and

Â inertia, all of that stuff It

Â gave very nice-looking performance in a closed loop sense as well.

Â And you can handle tumbling whereas the original formulation couldn't.

Â But they really helped identify that this inverse kinematics approach actually has,

Â if you used to write all coordinates has some very elegant stuff.

Â