Stability and Eigenvalues [Control Bootcamp]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay welcome back everyone so in the last part we looked at a linear system of equations X dot equals ax okay so this is a vector state with n components and is how many things I'm keeping track of in my system a is a matrix that tells me how X dot is a function of X and what we did was we essentially figured out that if we found the eigenvalues and eigenvectors of a that essentially defines a new coordinate system where it's easier to represent the dynamics and solve them so in MATLAB very very simple to get a matrix of eigenvectors T and a diagonal matrix D that has only the eigenvalues this should be lambda and only the eigenvalues on the diagonal and zeros everywhere else and then in terms of this matrix of eigen vectors and eigen values it's easy to solve the system X at some later time T in terms of the initial condition and these relatively easy to compute matrices T again matrix of eigenvectors e to the diagonal b times time which is easier to compute because it's diagonal and T inverse okay and so what we're going to talk about now is essentially stability okay so we're going to talk about the stability of the system which basically means what does the system do as time goes to infinity does it blow up does this all go to 0 does something weird happen okay now there's whole classes on ordinary differential equations and linear algebra and dynamical systems then we'll talk about phase portraits and saddles and sinks and centers and you know all kinds of deep and very interesting stuff but we're just going to get kind of the bare minimum that you need to understand stability here okay and it all has to do with this e to the diagonal matrix B times time so this is where things happen as time goes to infinity or in this term and what's nice about diagonal matrix of eigenvalues D and this is just a rehash of last time is that e to the diagonal T is easy to write okay it's just e to the lambda one time e to the lambda two times dot dot dot e to the lambda n time on the diagonals and zero everywhere else okay and so basically what we're going to find is that if any of these matrix Exponential's blow up to infinity then this whole mixture so I think if these eigenvectors T and T inverses almost like taking some mixture of these different basic frequencies or time dynamics these each e to the lambda 1 lambda 2 lambda n dynamics and you're mixing them up to get what the dynamics are of your original state ax okay and so if even one of these blows up to infinity then essentially if you add that into the mix then X is also going to more or less blow up to infinity okay especially if you take some random initial condition that has some component in all of these eigen vector directions the chances are it'll have some component in an unstable eigen vector direction and that will blow up to infinity okay and so what do I mean when I say blow up to infinity well each of these eigenvalues has a real and an imaginary part so let's say lambda equals a plus IB and this is just kind of going through complex analysis so if I take e to the lambda T then that equals what I'm going to write down is just Oilers formula so it's going to equal e to the a T that's a real valued function of a two real scalar arguments a and T times cosine of BT plus I times sine of B T okay now it's a little weird in a real valued system so like let's say all of X are real they're real and all of the coefficients of a are real then this should be real forever so why am I getting an imaginary here that's a little weird basically it's because if I ever had an eigenvalue with an imaginary a part for a real-valued system it would always come in a plus or minus pair so that I would have this plus or minus lambda T and I will get a plus or minus I sine BT and basically the physics or the math of the situation would be so that the solution when you take that mixture and add them up the imaginary parts cancel and you just get real value outputs again a little deeper but all I want you to know is that essentially if I have a complex eigenvalue a plus IB this is how it breaks up now notice the coasts plus I sine this never has an amplitude larger than one it's always equal to one and so this tells me if my solution is growing in time or decaying in time okay and so if if a is greater than zero then essentially what that means is that I have this exponentially growing envelope maybe my system is oscillating sinusoidal e but it's doing so in that's exponentially growing envelope and it will eventually blow up to infinity and if a is less than zero then I have an exponentially decaying envelope and so my system is going to decay to zero as time goes to infinity so this is really simple to understand if all of my eigenvalues D in D if all of these lambdas in D have negative real part in all of the real parts the A's of all of these eigenvalues are negative the real part is negative then all of my dynamics are stable all of them are multiplied by e to the negative number T which gets closer and closer to zero as T goes to infinity and so this system is stable if and only if all of the real parts of all of these eigenvalues are purely negative if even one of these eigenvalues has a real part that's positive then that component will blow up to infinity and it will cause my state X to also blow up as T goes to okay so it's really simple to say and it's also pretty simple to write down and so what I like to do is I think about these eigenvectors and sorry eigenvalues as living in the complex plane and so if I say lambda is in the complex plane it is stable everywhere here where the real part is negative everywhere in the left half plane this is where a is negative a real part remember this is real sorry this is failing this is real and this is imaginary so anywhere that the real part of lambda the a part is negative its stable and anywhere where the real part is positive its unstable and this is really simple to remember is that if any of your eigenvalues have real part that's positive its unstable if they all have real part that's negative its stable and so a big part of what we're going to do in control systems is we're going to start with an a matrix where maybe we actually have some unstable dynamics maybe we have a couple of eigenvalues out here that are a little bit unstable and by adding plus bu we're going to try to drive the system into stability we're going to try to force those eigenvalues to become stable again okay so this is really cool and this is a nice picture that allows you to think about what we want the system of a to look like so we can characterize what we want a to look like almost entirely based on its eigenvalues because we want to drive them into the stable left half plane in the complex plane okay okay make sense so far we have a dynamical system the solution depends on the eigenvalues and eigenvectors but it's dynamics in time only depends on the eigenvalues in this diagonal matrix D if those eigenvalues and they can be complex if they have a real part that's positive any of them the system is unstable and it blows up so the inverted pendulum has an eigenvalue with a positive real part and that's why it's unstable and it starts to blow up okay so that's pretty intuitive and I think again most of us have that that intuition about stability and eigenvalues and so the next thing I want to do is get into discrete-time system so this is a little bit less common to a lot of you who have an applied math background or a background in Oh des and linear algebra but in control theory this is really bread-and-butter stuff in physics we write down systems X dot equals ax or X dot equals f of X in terms of this continuous v varying function X of T but in a physical system if I have an experiment or if I am recording data from a system I don't have a continuous measurement X of T what I do is I measure now and now and now and now at these fixed delta T increments okay so what I actually have in practice generally speaking is a dynamical system X at time k plus 1 equals some new matrix I'm going to call it a tilde times X at the previous time K and let's be super explicit here X of K equals this continuous X evaluated at K delta T ok so I take some system it might have an underlying continuous dynamics but I'm going to measure it at these individual delta T instances of time and there's some discrete update that tells me if the state was X at time K here's what the states going to be at the next Delta T at time k plus 1 ok and it's also nice just to write down what this a tilde is in terms of a so this is also super simple a tilde is just e to the a delta T ok and we spend a lot of time just now deriving that that if I had some dynamics and I wanted to figure out what it is that the next you know plus delta T in the future all I have to do is map it by e to the a delta T ok so these two matrices are related intimately by the matrix exponential okay but we're not going to use that so much here what's really interesting is we have a notion of stability in continuous time so having to do with the real part of the eigenvalue in discrete time there's also a notion of stability but it's a little bit different and so that's what I want to walk you through right now okay and I'm just going to kind of coordinate off so the notion of stability that I want us to talk about now let's say that I have some initial condition I'm going to say I have X naught okay given that initial condition I can compute the whole trajectory or the whole set of measurements for all future times just by multiplying by a tilde okay so X if I have X naught then X 1 is just a tilde times X naught right that's exactly what this sets X naught so if I want X 1 it equals a tilde X naught if I want X 2 X equal to a tilde X 1 which is a tilde squared X naught okay so X 2 equals a tilde squared X now I'm going to say that one more time X 2 is just a times X 1 or a tilde times X 1 which is a times a times X naught so X 2 is a tilde squared of X naught X 3 is a tilde cubed of X naught and so on and so forth so X at any future time n is a tilde to the nth power times my initial condition X naught super simple pretty useful and what's really cool is I can take this exact same eigen vector and eigen value relationship and I can say well a tilde is just I figured if it's T inverse or T like T inverse be T and a tilde squared is T inverse B squared T and a tilde to the N is just T inverse D to the N T and so the only thing that really gets multiplied to all of these powers is this diagonal matrix D again okay so in the continuous-time case we saw that the only thing that got exponentiated was this matrix D if I write this in eigenvalues and eigenvectors only power that increases again is this B and so if we have some eigen value let's say lambda well here it's just you know lambda here it will be lambda squared lambda cubed lambda to the N so if I follow what happens to an eigen value as I map it through the system squared cubed fourth to the all the way to the end what we find is that it's actually the radius of this eigen value that either grows or decays okay so in the complex plane what we have I'm just going to draw a little complex plane here complex plane remember real and imaginary any eigenvalue lambda can be written as a radius and an angle theta and I really love this representation this is definitely how I always think about complex variables almost always because I can say that lambda equals r e to the I theta and when I think about things in terms of are e to the I theta and you can convince yourself expand this out and you get Coast's theta plus I sine theta and that's exactly what you get the real part is R cos theta the imaginary part is R I sine theta or I times R sine theta so this is true but if I take lambda to the nth power and you can convince yourself just multiply this out n times equals R to the N e to the I and theta so what happens is the radius either gets bigger or smaller but the angle just kind of rotates around and around and around so if this radius is bigger than 1 this lambda to the N blows up as n goes to infinity just like in the continuous-time case if you know if this lambda has has a real part a radius is bigger than 1 this will blow up as n goes to infinity as time goes to infinity and if the radius is smaller than 1 then this will decay to 0 as n goes to infinity ok so now we have kind of a dual picture here again I'm going to draw this in the complex plane where all of my eigenvalues have to live so so now what I'm going to do is I'm going to draw some unit circle where everything inside has a radius less than one so this is my unit circle inside everything is stable in discrete time so if my eigenvalues of a tilde live inside this unit circle where radius is less than one this system is absolutely stable and if my eigenvalues is even one of my eigenvalues has a real part that's bigger than one everything out here is unstable okay because and I have even one of those eigenvalues with a real part bigger than one then this term blows up to infinity and this chain will blow up to infinity okay and so I'm glossing over an important step this is if you if you're at home and you want to verify this and really kind of get expert at this what you'll do is you'll take that expression and I'm just going to derive it because I can never remember it I have a times P equals T times B this is what I always start with so a equals T be T inverse not sure if I said it right before and remember this is also true for a tilde a tilde okay so that's also true for you know put Tilda's on all these things so I have some special eigenvectors of a tilde some special eigenvalues of a tilde and what I want you to do to really convince yourself of all of this is take this expression a tilde equals T DT inverse and plug it in to all of these terms and you'll find that the only thing that could blow up or decay is this diagonal matrix D to the power N and then you can convince yourself to all of the eigenvalues of a tilde have to be inside the unit circle for the system to be stable okay now and it's interesting because if you think of this matrix exponential that relates a tilde and a then that's actually a conformal map between these two complex planes and this stable unit circle Maps exactly to this left playing under that map e to the a delta t so I think this is really beautiful kind of complex variable theory here but the upshot the thing I need you to understand and remember out of all of this is that the stability of your system in continuous-time or discrete-time completely depends on the eigenvalues of your matrix in continuous-time if the eigenvalues of your matrix have a negative real part it's always stable if a single one of these eigenvalues has a positive real part it's unstable and in discrete-time the analog is that all of my eigenvalues of a tilde has to be inside the unit circle they have to have radius or magnitude less than one and if a single one of them is outside that unit circle the system is unstable okay now why am I going through all of this discrete time continuous time math is because a lot of times a lot of things I want to show you in control theory are going to be easier to understand actually thinking about this discrete time system plus bu and thinking about this kind of discrete chain of events that that walk forward in time so I for example controllability is going to be easier for me to convince you of in discrete time than in continuous time but I just want you to know that these are kind of you know given the continuous time system there's an equivalent discrete time system and I can look at the stability in either of these okay so in the next time in the next part we're going to look at how do you get linear systems for nonlinear equations and we're going to start thinking about what happens when you add plus bu and see when it's controllable
Info
Channel: Steve Brunton
Views: 86,981
Rating: undefined out of 5
Keywords: Control, Control theory, Feedback, Closed-loop, Open-loop, Uncertainty, Modeling, Linear systems, Linear algebra, ODE, Dynamical systems, Eigenvalues, Stability, Matlab
Id: h7nJ6ZL4Lf0
Channel Id: undefined
Length: 19min 30sec (1170 seconds)
Published: Mon Jan 23 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.