Added animation of dog tracking.

I animate the dog update->predict cycle with both the estimate
and variance being shown.
This commit is contained in:
Roger Labbe 2014-09-14 11:58:32 -07:00
parent 0952f14c75
commit 1fca111567
4 changed files with 60 additions and 136 deletions

View File

@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:ce50ae76601ee29b27998c3d04ed65d7a05c21cf63a83e520527e96fff2359e3"
"signature": "sha256:6bbf3b69472f466f37cf43314d0391a512ece3f8f9592b3b02ec292d425f2c17"
},
"nbformat": 3,
"nbformat_minor": 0,
@ -1227,6 +1227,31 @@
"> Before I go on, I want to emphasize that this code fully implements a 1D Kalman filter. If you have tried to read the literature, you are perhaps surprised, because this looks nothing like the complex, endless pages of math in those books. To be fair, the math gets a bit more complicated in multiple dimensions, but not by much. So long as we worry about *using* the equations rather than *deriving* them we can create Kalman filters without a lot of effort. Moreover, I hope you'll agree that you have a decent intuitive grasp of what is happening. We represent our beliefs with Gaussians, and our beliefs get better over time because more measurement means more data to work with. \"Measure twice, cut once!\""
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Animating the Tracking"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If you are reading this in IPython Notebook you will be able to see an animation of the filter tracking the dog directly below this sentence.\n",
"<img src='dog_track.gif'>\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The top plot shows the output of the filter in green, and the measurements with a dashed red line. The bottom plot shows the Gaussian at each step. \n",
"\n",
"When the track first starts you can see that the measurements varies quite a bit from the initial prediction. At this point the Gaussian probability is small (the curve is low and wide) so the filter does not trust its prediction. As a result, the filter adjusts its estimate a large amount. As the filter innovates you can see that as the Gaussian becomes taller, indicating greater certainty in the estimate, the filter's output becomes very close to a straight line. At `x=15` and greater you can see that there is a large amount of noise in the measurement, but the filter does not react much to it compared to how much it changed for the firs noisy measurement."
]
},
{
"cell_type": "heading",
"level": 2,

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 KiB

After

Width:  |  Height:  |  Size: 465 KiB