New facebook book page with info on my updates and new developments in science/engineering.

Kalman Filter: "Cause knowing is half the battle" - GI Joe

As mentioned in the bayesian discussion, when predicting future events we not only include our current experiences, but also our past knowledge. Sometimes, that past knowledge is so good that we have a very clear model of how thinks should pan out. For example, when you run and reach out to catch a ball, it's only because you have a very good model of how ballistic objects move on earth that you can catch it (or at least not get hit by it). The Kalman filter is an optimized quantitative expression of this kind of system. By optimally combining a expectation model of the world with prior and current information, the kalman filter provides a powerful way to use everything you know to build an accurate estimate of how things will change over time (figure shows noisy observation (black) and good tracking (green) of accelerating Ninja aka Snake-eyes).

Bayesian Ninja Consulting!

Do you need help implementing an idea? Do you need code? Do you need help understanding some concepts? Shoot me an email at scienceguy5000@gmail.com or submit to my feedback bar on the homepage! happy quail hunting!

clear all%% define our meta-variables (i.e. how long and often we will sample)duration = 10 %how long the Quail fliesdt = .1; %The Ninja continuously looks for the birdy,%but we'll assume he's just repeatedly sampling over time at a fixed interval

%% Define update equations (Coefficent matrices): A physics based model for where we expect the Quail to be [state transition (state + velocity)] + [input control (acceleration)]A = [1 dt; 0 1] ; % state transition matrix: expected flight of the Quail (state prediction)B = [dt^2/2; dt]; %input control matrix: expected effect of the input accceleration on the state.C = [1 0]; % measurement matrix: the expected measurement given the predicted state (likelihood)%since we are only measuring position (too hard for the ninja to calculate speed), we set the velocity variable to%zero.