Next, we're going to be now talking about Lyapunov's direct method. We have to define several functions here. One of them is a positive definite function. This is a review, so let me take away the answer and ask you guys. Andrew, what's the difference between a positive function and a positive definite function? I am full of great questions, I agree. [inaudible]. What is the difference between a positive function and a positive definite function? Positive definite function. Let's start there. Everybody claims they know positive definite. Then we'll go back to basics. Andrew, you know positive definite. What is positive definite? [inaudible]. We write it like this but what is it geometrically? You're saying it's always positive? It's never zero? I suppose it could be zero [inaudible]. It could be? Yeah. [inaudible]. It is zero. It must be zero. Otherwise, it turns out it's not a positive definite function. We write it like this, but really, positive definite means it's greater than zero if x is not equal to your reference. Let's just for the sake of simplicity, assume the reference is always the origin. You can always do a coordinate transformation, delta x, right? Where that becomes it. We require a positive definite function to go to zero at the origin, but be positive everywhere else. I think I saw you wave your hand around. Let's just draw that out. Some function like this would be a positive definite function. Let me ask that simple question, what is a positive function then? I guess [inaudible] doesn't exist, it's just [inaudible]. It's always positive. It's always greater than zero, regardless if you add the reference or not. That's the only difference. A positive definiteness just means you do pinch it to zero but at a precise point. That's what we need from a control perspective. That's where we want things to go to zero. But outside I've got a positive measure of my error, and that's what I need. So that makes it positive definite. Let me get a different color. If I have V is equal to x squared, is that positive definite or not? I see heads nodding, yes. Is it globally positive-definite or locally? Locally. Julian, is it radially unbounded? Yes. Yes. What does it mean, Anthony, to be radially unbounded? It means that there does not exist any boundary in [inaudible] one-dimension and x dimension, that it returns to zero. I didn't follow that. Sine x would be radially bounded because it's locally really unbounded. If we have a state vector, V of a state vector or a state set multiple numbers, what must happen? What's the mathematical thing to describe this? It's greater than zero to all x. No. Because then I could just have V of the xz is equal to five. Except for [inaudible] but then [inaudible]. You could make an ATAN function that goes from zero and then finite bounded, then that wouldn't be radially unbounded. What must happen to the V function? It has to be increasing throughout. How much increasing? Up to the. As the state norm goes to infinity. That means along any radial direction. You can't just say, well, along x it goes to infinity, y, I don't talk about y, but x, it goes to infinity. No, across any direction radially outward. You go to infinity, should be increasing, increasing indefinitely. Radially unboundedness. [inaudible] when we talk about inactive sets. Yes. There's an inactive set.. Yes, there are. Many of them don't go to infinity, right? No, but some do. But the ones who don't [inaudible] We don't talk about them. Like quaternions too, they don't, they're bounded, they're sets. We have to talk about other elements of that to see global stability there. Let me go through that, or they're increasing. With MRPs too, they are actually radially unbounded. We just switch them. We switch, so then we have things called switch to Lyapunov Functions. With quaternions, you're actually switching as well. If you're interested, that's another topic you could study up in this class if you wanted to. If you have competing objectives, you can switch between the Lyapunov functions. But there are additional constraints on this Lyapunov functions. Because you can have one Lyapunov function that decreases monotonically, and then you go, "Okay, I'm going to switch to a new cost and make it do something else, and I'll switch back to this one." You're switching between the two, trying to drive both costs to zero. You can actually drive the system unstable, even though each one individually is stable. Because as you switch, if the Lyapunov cost is not continuous, you can have a case where all of a sudden every time you switch, you make it worse and then you get better. But it doesn't get better enough and then make it worse again. There's additional constraints. There's whole books and papers on switched Lyapunov systems. With MRPs, we do it, but we have MRPs continuous as we switch. The norm. Therefore, that Lyapunov function remains continuous, and in-between we're going to have finite energy. We're going to be dumping it. We'll do that next week. Let me refer those questions to there. But anyway, I just want to get back to definiteness, semi-definiteness, just review those basic concepts. There are things called radially unbounded. It's globally positive definite because you can be globally positive-definite and not radially unbounded. That would be if you do this and then just settle to a fixed value, it's positive definite, but not radially unbounded. What happens if, I'm running out of colors, we do this and come back down and touch it again, and then you mirror on the other side? Is that positive-definite? Semi definite. No. How is it positive definite? [inaudible] Locally. It's locally positive definite, but globally positive semidefinite. With this, you could not argue global control because you need your Lyapunov to be globally to begin with. Otherwise, it's a showstopper. If your Lyapunov function is not globally positive definite, does that mean your control is not globally stabilizing? Is it a necessary and sufficient condition? Ricardo, what do you think? [inaudible]. No. It's a necessary, but not sufficient condition. Keep that in mind. With all the Lyapunov stuff, just because you haven't thought of a cool Lyapunov function for which you can put this control, and then improve all the other Lyapunov stuff that we need to, it doesn't mean that the control isn't stabilizing. It just means this proof does not guarantee it. It's a necessary, but not sufficient condition. So everything we're doing with Lyapunov is necessary. Just because it doesn't work, doesn't mean it's not stabilizing. Everything with Lyapunov, you can flip signs. There are instability theorems. If you want to prove instability of this pendulum, you would then have a negative definite V function and prove that all the V dots are positive definite, then you'd guarantee the system is actually unstable. You can do that. But positive definite, negative definite, I'm going to use red now, I always like red as a professor, that's my color, this function, what is that one? Positive definite, negative definite , locally positive definite? Garbage. No, it's not garbage. There's a more mathematical name for it. It is garbage practically, I agree. Indefinite. Yes. So sometimes you have functions that are indefinite, especially when you get to your derivatives, uv dots, you find, oh wait, man, I just can't tell. It could be positive or negative, then it's indefinite and you cannot make conclusions. It doesn't mean you've proven it's not stable, it just means you cannot make conclusions. Keep that in mind. These are always necessary, but not sufficient conditions, and sometimes we end up with indefinite. You cannot argue it's positive definite, but only in the plus x direction, because we always need our neighborhoods, or balls. That means in 1D, you have to have a segment around that reference where it is positive. That segment can't just be just look right, just don't look left. We don't do that. That's not going to work. We have positive definite, negative definite, semi-definite. If we have purple, positive semi-definite is v of x is greater or equal to zero, v of x equal to xr, has to be zero. It has to be zero still at the origin, but it could also be zero elsewhere, like sine of x squared is one of them. Zero at the origin, grows locally positive definite, but it's globally positive semi-definite because it keeps returning to zero indefinitely and it's not radially unbounded. Make sense? Just some quick exercises. You've got a few also in your assignments to practice the statements. Let's go back through these definitions that we've had. We have our reference, positive-definite, has to be zero at the reference, and then there's a neighborhood for which it is positive around that. If you're not at the reference or if it's negative definite, you flip it, and if the neighborhood is all possible states, it's globally. If it's a bounded set like with attitudes, if it's good for all possible rotations, we still consider that globally positive definite in that case. Semi, you just have a greater than or equal. That's where it goes back to zero. Pretty straightforward. Simple example. Here we use something x squared over 2, x dot over 2. V depends both on state and rate. That would be an example. Zero at the origin, this would be radially unbounded and it is globally positive definite, this function. What does the first term look like? X squared over 2. In fact, through a k in front of that. What would that be? Kx squared over 2. Not kinetic energy. Which energy? Potential energy, like a spring energy or something. The x dot over 2, if I throw an m in front of it, that looks like kinetic energy. We often use potential kinetic energy like terms, but it's not required. If you have a matrix, actually, if you have set of stuff, we often write it like this. This matrix is said to be positive definite if this product always yields positive numbers unless x is zero. Again, that's the reference. Then it's positive definite. If it's zero, or positive, or zero positive, semi-definite and so forth. What must be true of K? If I gave you a K matrix, how can you check in MATLAB quickly, if this is positive definite or not? Eigenvalues. Eigenvalues. What must the eigenvalues be? All positive. All positive. If one of them is zero, it's positive semi-definite. If one of them is positive, one of them is negative, as we saw in the other example, that would be indefinite, it's an indefinite thing, garbage for most cases, but the mathematical term is indefinite. All make sense? You have a function v of x, that's positive definite. Is this going to be positive definite? Yeah. You can always multiply. It is not just a unique Lyapunov function. That's the big problem. There's not just one, there's an infinity. You can take as something positive definite, and multiply times a positive number and you're still positive definite, and that's fine. But there might be lots of functions. Maybe you can use x squared to argue stability. Maybe you use x^4 to argue stability, and you get different math, and both give you the stability arguments. Doesn't give you more insight. It's just sometimes harder algebra. How do you come up with good Lyapunov functions that really gets you there quickly? 5010 showed you some of that stuff in the earlier class, especially with MRPs and different attitude coordinates. That's what are convenient functions.