Data-Driven Control: Linear System Identification

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back so in the last video we talked a lot about how you can use modern methods in data science and machine learning to tackle really hard control systems of modern interest where you might have unknown dynamics nonlinear systems very high dimensional States and limited measurements and in particular we talked about how you could get into data driven modeling you could characterize your system with data you can do data driven control you can directly use machine learning to learn effective control laws and we can also use these methods for optimization for sparse optimal sensor and actuator placement so right now what I'm going to talk about is essentially an overview of data driven modeling okay so now I'm gonna give you just the roadmap of how you would use data science and machine learning for system identification so really that's what I'm talking about is system identification and this will be a large part of this lecture series so there will be multiple lectures in the vein of system identification right now all I'm doing is giving you a big roadmap of what to expect what you're gonna find so system identification is an old subject this has been around at least since ho and calman in the mid 60s and it's had a really rich history in control theory and dynamical systems ever since then so in the 80s there was the eigen system realization algorithm that was very useful for characterizing flexible space structures aerospace structures like the Hubble and the International Space Station where it was hard to get a first principles model of the of the dynamics because you had this very complicated kind of elastic structure and they used system identification to learn a linear model of the dynamics directly from measurement data okay so so system identification and this data-driven modeling is not new this is not something that was invented with machine learning in the last 10 years this has been around for half a century okay and I again I'm a big umbrella machine learning person I think of system identification as a form of machine learning what you're doing is you're learning models that generalize based on past data so I collect data from a system I build a model and I hope that that model generally generalizes to to the future to new input measurements you that I haven't seen before and oftentimes if you get the physics right if you constrain that optimization in the right way or you train it on a rich enough data set this really does give you models that generalize to be useful in in practice in the field and so I think of system identification as being a form of old machine learning for dynamical systems okay again this is just a road map of what to expect in this kind of part on system ID so part one is really system identification sometimes I'm gonna talk about something called model reduction okay and these are very similar and related things but let me just give you the very high-level difference okay so system identification is where I collect data I measure X in time and I measure maybe u in time I kick the system and I measure what happens and I build a proxy model for F for the dynamics that's system identification I identify a system what model reduction does this is very interesting sometimes I actually have a model of my system I know the navier's stokes equation for turbulence okay so I have this ridiculously big hairy equation maybe I take my PDE my partial differential equation for Navy or Stokes i discretize it on a million grid cells in a simulation and I get a million dimensional nonlinear ordinary differential equation people do this all the time and computational fluid dynamics so I might actually have a model but I don't want a million dimensional model I want a model that only describes the dominant most important things that happen for a particular configuration so maybe I have an airfoil and that airfoil is undergoing vortex shedding so even though I would need to represent this in a simulation with a million or a billion degrees of freedom I might be able to find a reduced order model a model that captures most of the interesting dynamics maybe in terms of five or ten or 50 states instead of a million okay if I if I find a good coordinate system that's what all the physics is about is finding a good coordinate system I might be able to represent these dynamics in a reduced order representation so that's what model reduction is I have a big hairy model but I want to find a more tractable simpler model maybe in terms of a dot a state a which is much smaller than X which is equal to some F of a so a much much smaller model that captures most of the dynamics that's what model reduction is and what we're gonna find is that a lot of the same techniques can be used both for model reduction if I have the model and I want to reduce it or if I have no model and I just have data and I wanted to discover a model okay now again there's lots and lots of different layers of system identification for anything that's a half a century old I'm only going to be able to give you kind of that the shallow treatment okay so read more about this there's a rich rich history of system identification I'm only gonna tell you the highlights so a huge part of this is based around linear system identification now you might be asking yourself why linear system identification well the most powerful techniques in control theory are developed for linear dynamical systems so if I had X dot equals ax and a is a matrix so X is a vector a is a matrix plus B you there are known close form optimal control laws to stabilize and regulate these systems if I know a and B so a lot of system identification goes into learning a and B from measurement data okay that's that's probably the bulk of that half a century from this you know sixties until recently most of that went into linear system identification and again one of the things of interest here is oftentimes my system state might be very very high dimensional so what I would want to do is also learn a good coordinate system I would also want to learn a good coordinate system so that I much smaller model I'm going to write it in terms of this little a state let's call it a dot equals a tilde of a plus B tilde of U so I still have a control knob you but I only want to affect the these this small vector a that represents most of the structures I'm going to see in this high dimensional data X and we'll talk about this this is going to be a little vague at this point but basically I want to learn the dynamics and I want to learn a good coordinate system I want to learn a good representation of X so that I don't need a million degrees of freedom maybe I can get away with five degrees of freedom okay now some of these these methods include the eigen system realization algorithm we're going to talk a lot about that that's a system identification technique that was developed in I think 1985 we're gonna talk a lot about balanced truncation BT and balanced proper orthogonal decomposition so these are both techniques for model reduction if I have a model of a linear system but it's really high dimensional and I want to find just the few coordinates that matter we're gonna look at balance truncation and balance P OD we're also going to look at a more recent technique called dynamic mode decomposition d-md dynamic mode decomposition this is more recent kind of 2008 until present people are still developing this this DM D algorithm these are all methods that we're going to discuss and what the basic idea is we're going to collect data and we're going to learn representations of a and B and we're also going to learn good coordinate systems so that we can reduce this model into a more tractable form okay why might I want a five dimensional model instead of a million dimensional model well lots of reasons if I'm going to develop a control law I'm actually going to have to base my controller on some state of my system X or a and if I'm going to be flying this around in a drone using an iPhone you know as the computer I'd rather be simulating a five dimensional Oh de for my control prediction than a million dimensional so this gives me faster model predictions and faster model predictions gives me faster control and faster control means lower latencies and higher bandwidth so from the control bootcamp you should know in your heart now if I have time delays if I have a slow prediction step to get my eight my controller that's going to introduce a time delay in my system from here to here and it's going to cause my system to have instability or it'll make it so I can't track fast changes and fast disturbances so if I want to have fast tight system response I better have a really really small minimal reduced order model so that I can get really really really fast predictions and and control decisions okay so huge amount of work on linear linear system identification now oftentimes we'll focus on just learning the intrinsic the dynamics x equals a of X and I'll forget about the bu like for example DMD is based on just learning this a matrix but extensions like DMD with control also learn learn this B matrix okay for very high dimensional systems so that's something we'll talk about another interesting fact set here is nonlinear system identification so n:l non-linear system ID I'm going to just use a ton of acronyms mnl system ID means nonlinear system identification this is also a very very important branch of system identification it's not quite as prevalent as linear system ID because these models are harder to get and harder to use for control it's that simple okay if I had a nonlinear system and I want to control it it's harder to control and it's also harder to get a nonlinear model from data this is just taken a lot longer to get good at doing this this is a very very big field and a lot of great people have done work on this so there's a lot of work on what are called norm ax models nonlinear autoregressive moving average exogenous input I'm just going to say NAR max these are some of the oldest and still some of the best nonlinear modeling techniques what I'm going to tell you about now so this is for X dot equals f of X there's this new method that we've developed called the sparse identification of nonlinear dynamics the acronym is Cindy okay and basically this is a new method using sparse optimization to learn what this f of X is directly from data and there's a whole video on this I'll point you to the the link in the comments you can learn about kind of modern methods to learn dynamical systems and the cool thing about Cindy is you actually learn the structure of your nonlinear dynamic so you can write down the OD e and you can analyze the terms it's interpretable and physical and it seems to work in a lot of cases you can learn OD e's PDEs controlled systems and so on and so forth there's been some really interesting work before cindy kind of after an R max between these two which is using genetic programming to learn dynamical systems so this is work by Bongard and Schmidt and libsyn kind of in the 2007 to 2009 timeframe really really nice work using genetic programming to learn I learned this f of X so these are all techniques and this is again just just a few techniques that I'm naming right now for nonlinear system identification lots of times you will have a system that's fundamentally non-linear there's no good linear approximation and you have to model what is X dot equals f of X okay hopefully everyone's still with me so far this is just the roadmap now the last thing that I want to talk about here are models based on measurements so something I didn't talk about here I talked a little bit about it I have dynamics in terms of the state X but oftentimes I only have measurements y equals G of X ok so these measurements Y they could be some linear measurement they can just measure the states a few of the states of X or they could be these nonlinear functions of X it could be sine of X one the first component of X or X 2 squared minus X 1 cube that could be a measurement G of X and there's kind of infinitely many measurements I could take of a system okay and so there's this new emerging field which is kind of dynamics on measurements and I'm gonna put a question mark here because it's not always clear when and how this is possible so this is related to a new field it's not a new field actually this was invented in the 1930s but its newly Reimer tree emerging because of data driven modeling called Koopman theory okay so this is related to something called Koopman theory and the idea is if I have enough of these measurements why maybe I actually have a lot of measurements in my system and maybe I'm in the big data limit and I measure more than enough stuff about my system can I build a model can I learn a model why dot equals and I'm gonna call this K of Y because this is supposed to be approximating the Koopman operator can I learn a big dynamical system directly on the measurements of my system these nonlinear measurements that I take of my system ok and if I do that maybe I can take nonlinear dynamics so what Koopman Theory says actually is if I have enough of these measurements if I in the limit as Y goes to infinity if I have infinitely many measurements rich enough measurements on my system even these nonlinear dynamics can look linear this is amazing so there's one I like emphasize this point many systems are fundamentally nonlinear and need this description to be able to simulate them and predict what to do with your control and then you would do model predictive control on this even in those systems if I have enough of a rich enough measurement set Y it may be possible to embed these dynamics in a rich measurement space Y where the dynamics start to look linear this is very similar actually to what the support vector machine and support vector regression do they take your system and they embed them in this big measurement space where things start to look linear that's what this is doing and whenever I say linear you should be thinking easy optimal control in closed form if I can write a nonlinear system in a linear representation we have known optimal control solutions to handle those situations okay so this is emerging and very very promising for doing nonlinear optimal control using linear theory very cool linear theory is like textbook control theory one-line MATLAB commands so let's just put that in here one-line MATLAB control now the real trick here the the kind of modern research is how do I find a good measurement set why how do I find good measurements so that this linear approximation really does work for nonlinear dynamics that's unknown and it's emerging this is something that's still being developed okay all of these techniques once I build a model so you know why would I do data driven modeling data driven modeling is so I can do model-based control so we could do linear quadratic regulator if we have a linear model in lots of cases we're gonna do model predictive control so I'm going to put this down model predictive control this is called MPC very very important control technique this is lots of industrial control uses model predictive control it's super flexible you can build in constraints it can handle nonlinear dynamics time delay as you name it it's awesome and so a lot of the system identification is building towards this model predictive control framework this requires my dynamics to be fast to simulate I'm going to be simulating a lot of different trajectories and testing them out and so I need these simulations to be fast so again that goes back to this model reduction we want even if we have big high dimensional dynamics I want to find the minimal form necessary to describe the dynamics I care about for control okay so that's going to be a big theme is high dimensional dynamics to the intrinsic essential low dimensional representation in the context of system identification yeah I think that's about it so just last thoughts on this overview there are a lot of videos out there by by myself and my colleagues on Cindy so I'm going to point to those references we have a lot of videos out there on DMD so I'm gonna point to those videos a lot of stuff out there on Koopman the new videos that I'm going to generate for this lecture series I'm going to generate some new videos on balance truncation and BPO D I'm going to do a little bit more on kind of the history and use of DM d and Koopman er a eigen system realization algorithm really important when I don't want to forget neural networks so neural networks are actually getting really good at predicting dynamical systems so we're also going to talk about how to use neural networks to model nonlinear dynamical systems very cool so we'll talk about this as well we'll talk about model predictive control in a lot of these cases what we're going to talk about is how to extend DMD and Cindy and Koopman to handle this plus bu to handle control most of these methods DMD Cindy and Koopman are normally just used to identify unforced dynamics so we're going to have to extend them to include the effect of actuation you now really really important all of these methods all of them are fundamentally regression based so regression is an incredibly powerful tool all the way back to hoe and calman they were using essentially linear regression on data to discover these models everything we're going to talk about is regression and so this is kind of the main technique that we're thinking about in terms of machine learning and statistical learning and there's flavors of regression we could do sparse regression okay that's what Cindy is gonna do we're only going to pick a few model terms to describe F so that it remains tractable and interpreted we can have constrained regressions so I can discover models if I know that there's constraints or symmetries we can enforce those in the regression and there's there's many many others so this is all going to be about regression of data onto dynamical systems that's what system identify okay so where there's gonna be a ton of videos on this and then we'll talk about how to learn controllers and optimal sensor and actuator placement later okay thank you
Info
Channel: Steve Brunton
Views: 41,824
Rating: 4.9850559 out of 5
Keywords: Control theory, Machine learning, Data science, Dynamical systems, Machine learning control, Optimization, Control, Model reduction, System identification, Reduced order models, Regression, Feedback control, Applied mathematics, Linear algebra, balanced model reduction, balanced truncation, balanced proper orthogonal decomposition, bpod, singular value decomposition, dimensionality reduction
Id: 6F2YVsT9dOs
Channel Id: undefined
Length: 20min 15sec (1215 seconds)
Published: Sun Jun 10 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.