Let's look at the linear system that also impact one of the homeworks you're doing, and then we'll look at global. Can we use the outcome of theory to prove stability of a linear system? Seems overkill, because you can use you can use Nyquist, you can use all the other stuff full in your systems. But sometimes you have linear parts of a system, and then you have nonlinear parts. And so, this particular methodology is handy in that case. So we'll spend just a little bit of time on this. There's a homework I'm having you work on this area. And then the rest of it we're doing is going to be nonlinear systems. So assuming our system is x dot = [A]x, A is not time dependent, it's just a bunch of coefficients. Then we're going to come up with the Lyapunov function. So P, this notation means it's a posi-definite matrix, it's actually also symmetric, so s, p, d is often symmetric posi-definite. In which case, it's kind of like kinetic energy, right? X transpose p times x has to be positive away from x's all being zero, so that's a posi-definite function. Can we use this to prove if the system is stable, that V dot would be negative? Definite. So if you take the derivative of this, P is a constant matrix. There's just a dot here and a dot there with chain rule. And then you can plug in x dot transpose, that's going to give you x transpose times a transpose in here, and x dot here will just give you a times x, both cases we've got x in the left and right, so you can factor them out. So now our V dot is x dot times this bracketed matrix times x. And for asymptotic stability, we need this matrix to be negative definite. So, how do you prove that? Well, that's actually one of the theorems there, you've got a algebraic, the Lyapunov equation, that's basically this one, A transpose P plus P times A is a theorem that says an autonomous linear system x is stable. Now, again, for a linear system stable means roots are all on the left hand, on the imaginary plane, on the left hand side. Negative real numbers, not to zero real numbers, otherwise it's marginally stable, this is only true for true stability not marginal stuff. Then it's stable if and only if, so Tebow, there you go, right? Now something the arrow points both ways, so if this is stable, then for any symmetric positive matrix [R], there exists a corresponding symmetric positive matrix [P] such that this is true. So with this theorem, we're basically saying, if the system was stable to begin with, you can always from here, if you do this math, this is guaranteed to be a negative definite function, because if R is positive definite then minus R has to be negative definite, it comes out of this definition, right? But the key is if and only if, so in your homework you're doing this for a very simple spring-mass system. Once we're damping, once or beginning without damping then with damping. So when you're doing this, keep in mind the stability really says, without damping you only have marginal stability, which is going to raise issues. And this if and only if means for any R, this P can be found. And if it's just a two by two, it has to be symmetric. Everyone, these matrices only has three terms. You can pretty much carry out the matrix math, and in the one case without damping, we know this is going to have issues. In fact, you will find the contradiction that if I pick an arbitrary P11 and a P22, I'm getting contradictory R results that can't possibly be true or vice versa, right? That's kind of what you're looking for in that homework statement. And then if you add damping, you end up with a bunch of terms and you have to show that this is really negative definite, don't do an eigenvalue analysis, the easy way here is really, it's a two by two, you can pretty much carry out the math and you get quadratic equations, you complement the quadratics and you can write it as something squared plus something squared, everything with a big minus sign. This is clearly negative definite about that something, so just complete the squares by two by two, that's my suggestion. Some people do eigenvalue, do other strategies to prove that. But that's just a bunch of tips and tricks. So if you hear algebraic, the Lyapunov function, this is often used to the stable system to come up with something that's guaranteed to be a negative definite function.