The Kalman Filter [Control Bootcamp]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay we're finally ready to build the common filter okay so the common filter is basically the analog of the linear quadratic regulator for estimation it's the optimal full state estimator given some knowledge about the types of disturbances and types of measurement noise that I'm going to experience okay so in practice we're going to assume that WD is a Gaussian white noise process so Gaussian white noise process with variance let's call it V so let's say it's variance is V D and this is going to be lets say covariance so this will be a square matrix of size n by n okay so however many states I have this will be yeah for disturbance it will be an N by n matrix and then let's say that W n is also Gaussian so this is the first one is my disturbance the second one is my noise and it also has some noise covariance some V n variance and so basically if I think that my process noise the kicks that my system is going to experience are larger or smaller than the noise that my measurement has then I get to trust one or the other more than more so remember my common filter is measuring U and Y and it has a model it has a model of a B and C but if it has really bad sensor noise it can't trust Y very much so it has to rely on its model more but if it has really really big disturbances if it can get kicked way off where it thinks it is then it should trust its measurements why more so this there's some reason to think that based on the ratio of these these various matrices if I have bigger disturbances than noise then I should trust my measurements and if I have bigger noise than disturbances I should trust my model okay and so there's this balance of how remember we had we we found that we can essentially write the error of our prediction equals a minus Coleman filter C times error okay so we could essentially make this error we could make our estimate X hat converge arbitrarily quickly to X remember error was just X minus X hat we could make this thing converge arbitrarily quickly by choosing the Coleman filter Gaines to make this very stable very negative eigenvalues but again just like in the lqr case in real life I'm constantly balancing how much noise I have on my measurements and how much disturbances I have in my system so there will be a sweet spot for these eigenvalues too and in fact they max they minimize a cost function J which is essentially the expectation value of X minus X hat the column vector X minus X hat and I'm pretty sure this is transpose times X minus X hat and so this is a little bit more tricky to picture but basically if I had an ensemble of different disturbances and noise is sampled from these distributions then I'd want to choose this common filter gain to minimize the expected error between my state my full state and my estimate okay and it doesn't look like it but this can be written in a form that's almost identical to this lqr cost function and so in fact I can use the exact same linear algebra guts that I used to solve for this gain matrix K regulator I can use the same linear algebra to search to solve for this column and filter gains KF and in particular we saw something called an algebraic riccati equation to find these gains again it's order n cubed in the state dimension of X but for moderately you know the size systems its tractable and we can do that and then you can get these optimal common filter gains for your full state estimator so in MATLAB it's pretty simple I think it's something like K F equals lq e so now remember we use lqr for the quadratic regulator full state control this is a linear quadratic estimator so lq e is basically synonymous with calm and filter I do lqe of a C and then you know V I forget if it's BD and then VN or what the order is that you can look at the help file but basically these now serve the role of the Q and the are matrices in lqr for this this column and filter design okay so very very similar you can actually a good exercise I would recommend you try try to develop these calm and filter games using the lqr command use the fact that there is a duality between a B and a C and try to massage this so you can actually use this lqr command to solve the algebraic riccati equation to get this common filter okay so I'm not going to go as much into the analysis of this I think what we should do is try it out on an example where we have a full state but we're only measuring one or two variables and see if we can design a common filter to estimate what the full system is actually doing okay
Info
Channel: Steve Brunton
Views: 103,560
Rating: undefined out of 5
Keywords: Control, Control theory, Linear algebra, Eigenvalues, Closed-loop, Feedback, Observability, Gramian, Applied Math, Matlab, Estimation, Kalman filter, LQG, Optimal control
Id: s_9InuQAx-g
Channel Id: undefined
Length: 6min 11sec (371 seconds)
Published: Mon Feb 06 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.