This is my Matlab implementation of Ted Broida's "Estimation of Object Motion
Parameters from Noisy Images." This is a very early work using Kalman Filtering to perform object tracking. The paper makes many assumptions such as the structure is known and we are given a 1D view of a 2D object, but it paved the way for future methods.
From the perspective of a new person to adaptive filtering, I believe this creates a perfect example problem to apply an IEKF because it is simple and you can concentrate on how the algorithm works. Plus the inputs to the filter have a physical meaning.
The best way to start will be by reading the .pdf file. This is the write up I did for this project and hopefully should explain how it works clearly.
Then next thing will be to simply run "CompleteSimulation.m" I tried to make the code very readable so hopefully you can just read the script.
The largest reason for submitting this to the file exchange is "f_IEKF.m" This is the function that actually implements the filter and took several days of headache to write. It isn't commented line by line, but I choose the variables to be consistent with the theory sections seen in most books. I hope it will be clear and help someone out there.
Lucas Chavez (2020). Object tracking with an Iterative Extended Kalman Filter (IEKF) (https://www.mathworks.com/matlabcentral/fileexchange/42156-object-tracking-with-an-iterative-extended-kalman-filter-iekf), MATLAB Central File Exchange. Retrieved .
@Richi. Just read you comment. I don't remember exactly why I wrote it like that. However, using both my method and yours, R turns out to be a diagonal matrix with noise. So, I can see both ways working.
The IEKF does not seem to be correct. You write:
R = (.01*randn(2,1))*(.01*randn(2,1)).';
Rdiag = diag(R); R = diag(Rdiag);
This doesn't make sense, R should be
R = eye(2)*noise^2;
Adding link to video on youtube that has results of code.
Inspired by: Adaptive Robust Numerical Differentiation