0:18

If that state doesn't go to zero, you're integrating something finite.

Â Over time it goes bigger and bigger and bigger and bigger.

Â It's essentially what integral does.

Â So it's a great measure to kind of, it doesn't,

Â it's not quite what people would call a.

Â Adaptive control, but it is a way that the system learns somewhat,

Â to what is this disturbance with integral terms, and it will go there.

Â So I'm going to show you now, for linear systems,

Â it's fairly easy to add those terms.

Â And then, you look at the root, the new characteristic equation.

Â Make sure your roots are still on the left hand side and off you go.

Â With the [INAUDIBLE] theory, this gets a little trickier.

Â because we don't just want to do this for linearized close to dynamics.

Â I'd like to have a control that's globally nonlinearly stabilizing

Â on the whole system.

Â So, the trick is instead of just doing the integral of the attitude error.

Â I'm going to the integral of k times the attitude error plus the inertia times

Â the error angular acceleration.

Â 1:11

Who came up with this?

Â Professor at A&M actually kept the paper on this stuff.

Â I modified them to work with the MRPs.

Â And so, I don't know how he came up with this one.

Â But I think it's inspired through the sliding modes.

Â Some of you have heard of sliding mode controls.

Â They're a way that you have this extra measure of a sliding surface.

Â That's a measure of states and rates, and then you guarantees some stuff up there.

Â It's kind of inspired by that a little bit.

Â So in a linear system, we would just have this, K sigma integrated.

Â Here, we're going to have both.

Â because otherwise, we can't get our controls analysis to give us the v

Â dots that are really negative-definite, or negative-semidefinite.

Â If you just put feedback on this, it might seem stable, but

Â I don't have any analytic guarantees it's going to be stable.

Â 2:31

Yes.

Â Question? No.

Â Okay, so that's the new Lyapunov function.

Â This stuff, we've just done.

Â So now, you've already seen that math.

Â I'm just going to show you the differential math on top of that,

Â another layer.

Â So if we differentiate this, it turns out you can factor out not delta omega,

Â but you can factor out delta omega plus z.

Â Delta omega's happen here, here, and we differentiate this one.

Â That's how many terms are in here they appear.

Â And I'm going to set this now equal to

Â this negative semi definite function again.

Â 3:05

And the sigmas don't appear so you know right away it's negative semi-definite.

Â But you can also have a delta omega that's equal to minus KI times Z

Â which also drive it to zero.

Â So it's negative, or zero.

Â So it's negative semi-definite, which gives us stability.

Â And to do that, you make this control equal to this, and

Â that's what will be plugged in.

Â 3:25

So compare to the earlier control, you regain the proportional rate feed back.

Â There's the same feet forward compensation on some parts feedback dynamics on

Â the linear part with feedback compensating the known torque.

Â All of these is the same as the control we have this morning when we derived that.

Â The new term that appears is this one.

Â That's going to give us the integral term that works, but

Â we can still guarantee global stability.

Â To compute the Z, you can see it's the integral of attitude, okay, but

Â it's the time integral of a time derivative.

Â 3:58

That works for the derivation, but it's kind of a tedious thing to implement.

Â You don't want to take signals differentiated and then integrated again.

Â Why do you do all that?

Â It seems like very much a wasted effort, right?

Â So this part here, to implement it you can actually just integrate this.

Â This is a constant.

Â The integral of that is this at the current time minus at the initial time.

Â So you can rewrite the z variable like this if you want to.

Â And that's an easier implementation.

Â 4:25

So now I put that definition in there for z and this is how the stuff rewrites.

Â I still have proportional here, I have the rate feedback here.

Â But it's not just the P matrix, the KI term impacts the rates here.

Â So from a performance point of view.

Â This gives you your feedback.

Â Which K comes in, P comes in, and KI comes in.

Â This is the term for the initial rates, which you could include.

Â And the rest of it is the classic control that we've had.

Â So you can see with the gains and performances,

Â it's not just proportional and rate gains and interval gains.

Â With this setup, it kind of mixes.

Â But it allows us to still guarantee global stability.

Â So that's a modified, it's like a pid non-linear control that you would have.

Â 5:10

So with the v dot that we set for this system, we had this function.

Â So V-dot will go to 0 when this bracketed term goes to 0,

Â because P is a symmetric positive-definite matrix.

Â So okay, we know delta omega has to become minus KI sigma at some point.

Â Then what we can do is you can use Mockito chain.

Â Take the second derivative of this, take the third derivative of this.

Â Evaluate it on this set.

Â A bunch of algebra later.

Â You end up with this expression.

Â Which is pretty cool, because that is negative, semi-definite and

Â negative definite in terms of the sigmas.

Â And that's nice because this actually tells me I'm quite sure what happens to

Â this combination, but here my sigmas will go to zero.

Â 5:58

You can actually also argue the smoothness that the rates must be zero.

Â This is not a weird system a lot of chatter or infinite jumps that can happen.

Â This is a nice continuous control.

Â So if my states, if that happens and this must go to zero.

Â And if this part is zero that means the interval measure at the end would

Â also have to go to zero.

Â But this is without external disturbance.

Â We know everything.

Â So this just shows you the system would actually be globally asymptotically

Â stabilizing if we know everything that's in there.

Â 6:28

What we want to do next is what if we have an unmodeled torque?

Â So you go through the same stuff.

Â You add that one delta l, it's just one extra term that appears in the equation.

Â And as before we had minus p omega squared and

Â then a p dotted with this, which is written slightly differently.

Â The same arguments can be held there.

Â And, Yeah, what we can conclude

Â here basically is that this product or this sum of states has to be bounded.

Â Because if this is a bounded influence at some point the quadratic particle always

Â over rule the first order part.

Â You can't just be spinning up to infinity.

Â So [COUGH] if that is bounded,

Â especially if z is going to be bounded.

Â That means the only way z can be bounded is

Â if this part term here eventually goes to zero.

Â If these states don't go to zero,

Â then your integrating off to infinity they would grow up to be infinite.

Â So, enforcing that z is bounded, actually tells me sigma has to be bounded.

Â And therefore also the Delomega has to be, actually goes to zero.

Â 7:34

Which is a nice result.

Â So now with unmodeled torques, I can actually argue that I will have asymptotic

Â error as long as the torque is constant.

Â That was one of the requirement that we have.

Â If it's not constant, then doesn't quite work.

Â But, the z will not go to zero with unmodeled torques.

Â So, following the earlier steps, you can do this,

Â plug it in into the exclusive dynamics.

Â Evaluated on these sets.

Â And we know del omega's going to go to zero.

Â In the end, you can predict now what the z variable is going to be.

Â If this is some unmodeled torque,

Â I know what the inertia is, I know what this gain is.

Â This is what that value will convert to.

Â So your integral term, as it builds up, it actually, in fact,

Â learns what that external torque is.

Â And it brings you to zero because at zero it has to compensate.

Â Something's pushing me one direction one Newton meter.

Â This integral term has to push back one Newton meter,

Â otherwise you wouldn't stay in place.

Â So it's a way of doing a simple form of doing adaptation.

Â It's learning with an external forces.

Â Which is nice, so if we wanted the same simulation we had.

Â That's the same external force.

Â We want to derive this to zero.

Â Before the rates went to zero, but the attitudes didn't go to zero.

Â Now by using this new control with the z interval term in there,

Â this large departure tumble and recovers, comes down.

Â You can see our attitudes do go to zero, which is nice.

Â And from the analysis we're predicting here that.

Â I'm using a single inertia here, so delta l over iki should give me these z values.

Â That's where this integral term should converge to.

Â And I believe yup there we go.

Â There's the z's plotted out and they actually match the 1.6, 3.3 and minus 3.3.

Â So the numerical results match up very well with what we analytical predicted,

Â this is going to be the off set.

Â And the control as expected doesn't converge to zero here.

Â It can't.

Â because when its holding the heading,

Â there's always a torque that's pushing you out of that heading.

Â So, it has to converge to a non-zero torque and that can be a challenge.

Â If you do this for example with reaction wheels.

Â What do you think Brian?

Â If I'm using reaction wheels to create this torque and

Â you have to have a non-zero torque all the time just to hold the heading,

Â any problems you can envision?

Â >> Couple.

Â >> A couple?

Â [LAUGH] Give me one.

Â >> I know your reaction wheel is always going to be changing or

Â 10:04

So if I'm putting a reaction with torque on there,

Â I'm spinning up the wheels more and more.

Â I need continuous torque, that means I'm continuously spinning up.

Â At some point,

Â they will literally fall apart or break at these maximum speeds that you can reach.

Â So, these kinds of controls are great but

Â let's say we use thrusters, no gyroscopics.

Â I'm just using thrusters and

Â I have to continuously thrust to generate this torque.

Â 10:27

>> Run out of fuel.

Â >> You run out of fuel, right?

Â So you have to be very careful.

Â This is great, if you have to have precision-pointing, and

Â you want disturbance rejection.

Â Orbit insertions is a big one, if you're doing trajectory correction maneuvers.

Â I'm burning for 15 minutes, and

Â I want to be really careful I'm burning in exactly the right direction.

Â Maybe for that time period this makes sense.

Â And gives you, because if that thruster works stronger than you think,

Â you want to be robust to uncertainties.

Â And if it's always running 10% hot, you get this constant offset.

Â This would be a perfect control to make it quite robust.

Â But you wouldn't do this Kepler, staring at stars for months and months at a time.

Â Those wheels would be spinning so quickly, the fuel would be depleted very,

Â very quickly.

Â So, this is nice math.

Â Keep in mind the realities of flying in space and

Â the resources that are very limited.

Â 11:14

So good.

Â This is now, we've shown stability, we've shown global stability.

Â We've also talked about asymptotic stability.

Â And we've talked about unmodeled torques.

Â That without the integral feedback you have steady set offset errors which we

Â can predict.

Â Maybe you can live with that.

Â Pick the right gains as you say and you can control it to some degree.

Â But you, with unmodeled airs it's only Lagrange-stable.

Â If you want to have Lyapunov stability,

Â you have to go something that's smarter, like an integral term.

Â I showed you how you could implement that.

Â