Next topic linearization of the dynamical system. This is an important tool, linear analysis, linear system theory, linear control theory. They all have amazing tools available to say exactly if you put your roots here, you can have you're going to be coming in critically damped, slightly under damped. This is your half life of your errors. You will know how quickly errors will decay. So a lot of performance questions can readily be brought up from that. So while we do a lot of nonlinear control, when it comes to predicting the performance of the closed loop system, we often still linearize. And it's something that's there. And I'm just going to quickly review this again highlights. It's amazing how often people have trouble linearizing around a general system. So here we're going to say we have some reference which is given by some dynamical system this could be us some spring that's going back and forth. And then you have an actual system that's just a free falling rock or your lander and you want your land or over the moon to do this perfect sign, your soil emotion doesn't happen naturally. So we would like to come up with a control such that this becomes stabilizing and the tracking errors converge to zero. But we're doing in a linear sense. So we want to linearize about the reference. So you noticed in the reference, if you notice here there's a ur part if you add those to zero. What is your reference, then? Yeah, it's it's a natural motion that you would have If your references, look this is where I started out with with my lander and later I'm going to be down here. There was this acceleration happening at exactly what gravity gave you. It takes no effort to follow that reference right. So if the UR goes to zero then we're good. But very often it's not exactly how you want to land because that's more called an impact. It's different than landing. So we might want to put thrusters on and guide and slow down and then gently touched down right. And maybe there's a reference profile on how to come in and when to fire and do that. So there will be enough. So that's why this is your open loop guidance that you do basically you say, okay, if you're on this trajectory you've computed this is how you have to solve. This may have come out of an optimizer that you ran trajectory optimizer or something that says, okay. This is the continuous thrust profile I would need if the thruster does exactly what I think it should do, right. And then that's your reference and then that's the trajectory and that's the effort you should do regardless. So if you're tracking errors or zero, your effort does not go to zero because you still have that open loop part of the control right. So that's why the feedback control is the actual control with the reference subtracted. Or you could say the actual control is UR the open loop reference control plus delta U. Which is that's the part I'm calling feedback because open loop this landing trajectory won't be very good. Well it might be depends on robustness right. But if you have errors, the thruster fired five seconds too long and it was harder than you expected it to fire. You're going to be off in your trajectory and if you want to correct for that then you will sense where you are and you apply delta U that says, okay, the next thrust. Make it a little bit smaller. We were a little bit far earlier right. And it does it automatically. That's the feedback part. And with this you can take something open loop that by itself, mate that was quick. May not be stable with the feedback. You make it stable. All right, so this is a classic feed forward feedback control strategy and we can use if you have small departures, do you see this all over the place in space. Also aircraft robotics. If they just have small departures, they didn't throw linearized analysis across of it. And then everything is good. So sometimes you have to do that. We're going to be using a lot of nonlinear control because we can't I don't just because with linearization you're going to guarantee stability but only locally right. Versus with a nonlinear control we can guarantee stability for any attitude, which is much stronger prediction of performance than just saying. Well, if I'm not within within 5 degrees, I'm happy. Anything else declare emergency. And but people flying like that. So how do we do it? Classic Taylor series expansion. Again, complicated systems make it look complex. The algebra might get very complex if you've got this whole weird gravity field from an asteroid, the moon, whatever you're coming in with. But it's really breaking down that you break up your closed loop dynamics here with which was delta X right. You take the derivative, you've got X dot minus x r dot x dot is the actual one. Xr is the reference. And I'm expanding the reference for small departures. So like a Taylor series. All right, you get F at the reference plus the partial of F with respect to x times delta X. But we also have variations in control. That's our feedback. And then you get higher order terms and you subtract the actual dynamics from it and evaluate everything at the reference. Again, those two f functions here will vanish completely, leaving you just with these two terms. This partial becomes a matrix. That's the matrix evaluated at the reference and you call these things A and B. They should look very familiar to you now, all of a sudden that's your classic state matrix and controllability matrix of the system. We're not dealing with observers here. Let's go back to linear systems class. For that all right. So this is something we can always do and I want to highlight again. So, in projects, some of you might want to do that and compare non linear linear, try different strategies because you can do all kinds of stuff with linear control. That's quite interesting as well from a performance from a robustness. Looking at stability margins. So, depending on what background you have, I just want to highlight this is something we could do for a variety of things. Any questions on linearization of systems here, one example. And this is also an assignment. So if we have a linear system here, why is this interesting here? If you just look at this, it's very hard to say is it's stable, unstable what's going to happen out of it? Of course your favorite routines how to simplify it. But this dynamical system, why not. It's equal to eight times. Why is in there? So the control, if there is any has already been embedded into this, you can look at the eigen values and Eegen values of the systems and they're going to be real. The spectral decomposition. This is going to be a column of eigen vectors. This is your diagonal matrix of eigen values and then that eigen vectors stuff transposed again and it's actually orthogonal. So you have these nice properties. And so here, I'm giving you the eigen vectors and eigen values of this a matrix that you're going to have here for the system. But if the eigen Values of -10, 0 10, what does that mean from a stability point? It's the system stable. No, which one is a troublemaker. The last one plus right. You want negative eigen values. That would be a negative decay. This is the first order system right. And you'd have that mode. So sometimes you have coordinates and they go, eigen values are great. Something is going to be stable, but how do I know? And so depending on the dynamical systems, we can sometimes do a change in coordinates. That actually makes it much more illustrative because it's not just the X. Direction or the y, but maybe it is y + x over 2. That's a new coordinate. And that's the direction where we're stable. But stuff orthogonal to that were unstable. Like you see this also with the three body problem, those liberation points there saddle equilibrium along one axis, they're actually stable and other access their unstable. And if you just use the inertial frame, you don't get that, but you do according transformation, you do get that right. So that's something we can do often. So we introduced new coordinates. They're basically scaled version instead of base vectors of 100010001. We're using these eigen vectors to really form a new base set and then we have ada coordinates. That's my new coordinates that are something times this eigen vector direction. because those were the interesting directions, anybody know manifolds yet we've done manifold stuff, heard of it a little bit, that's kind of what we're talking about, right. because for a nonlinear system, I don't need that anymore. There we go. For nonlinear system. What's literally happening is you've got some nonlinear behavior and you're getting a local first order approximation of what's happening. So that's the full manifold, the curved thing, the linearize system is there, and this is what gives us some if this is stable, then maybe we can argue stability here. Does anybody know when we can do that? Can we always linearize a nonlinear system? >> No, I know, I think it's when the eigen value is zero. >> What's the problem, then? Okay, if you linearize the system and your eigen values are all negative or you have of all routes in the complex left hand plane, then you're strictly stable, strictly her bits for that system. Right, then the theorem goes, if you've linearize and the system is strictly stable, so no zero routes, no zero imaginary things. No zero eigen values, then there exists a neighborhood where that linearization holds. Now that neighborhood might be itsy bitsy small or it might be gargantua. So it might be really big. It depends if you have something that does this and then comes down and does something else and you linearize about here, there is a neighborhood, but it might be only goods within 1/100 of a degree. Because after everything drops off again and acts very differently right. Or like here, this might be a pretty large neighborhood where does approximate it pretty well. But the issues become in if you have what's called a zero manifold and that comes from roots that are purely on the imaginary axis or eigen values that are zero. That's the problem. And then for that mode, I cannot predict if it's stable because two first order, you're right on a saddle. A man, if that second order term is stabilizing your good, if it's destabilizing, you're not good. Long term short term, it looks like it just kind of act like marginal spring mass system. But long term that spring mass may get bigger and bigger or it may actually decay. You just don't know. So that's where the linear so be careful when you make arguments on a linearize system on stability. If you have zero manifold routes, that are marginal. >> But that's something on the linear system. >> On the linear system yeah, so that's where the prediction of stability. Everything was negative or zero, you go well then you may still have unstable components and you have to do more testing check the high, do student numerical simulations check the higher order terms. So here these ada coordinates, what's nice is we can break this down. This is a decoupled system. Now, once you put it in, you can find, okay, if ada is defined this way then y you plug it in. Y becomes a white dot is eight times fi times ada and why dot this is a constant. It's just feet times data dot ada dot this here. If you go back and look at the eigen value eigen matrix just becomes your diagonal one. And now you have a nicely decoupled first order system and you can solve each individually and find out what ada are with time. Either exponentially dropping constant or exponentially growing right. If you want back the original system, you plug it in there. So these coordinates will be multiplied times the subspace of these eigen vectors. So one acts on one plane one way or the other and these solutions are put in there. So you could actually say what's happening and that's nice. We also have something that's conserved. If we see these kinds of things, that's nice. No matter what happens, this coordinate must be for even six years later. That should still be four. That's a great thing to check in integration. Make sure you did it all right. When you solve these differential equations, it might be something you can exploit in your dynamical analysis. It's like having momentum or energy being preserved, you found the coordinates that was preserved. That wasn't exactly energy or momentum, but something in between. So one in wide spaced emotions might look kind of, I'm not sure sometimes it goes to zero. Sometimes it doesn't, with this kind of analysis you get much more precise and go well on this plane. It's like the liberation point. If I move in the radial direction, I think that's the one that's stable, but if you move in the libration point in the off radial direction, then it's not stable, right. So instead of just going well on Thursday, it worked and on Friday didn't work. You can actually be much more precise and give the sub manifolds of space where things are stable and unstable. So anyway, I just like this thing to dig a little deeper. This might be useful for projects. We're doing a lot of non linear, but if you've taken linear system, that's not the focus of this class. But you're welcome to apply it to a project. There might be some really cool things if it's part of your research that you can bring it together linear systems theory is still really, really handy.