From 4671efef15f11f3b580db57ddfd64fdaaac2e7c7 Mon Sep 17 00:00:00 2001 From: Saurav Date: Wed, 30 Nov 2016 12:25:52 -0500 Subject: [PATCH 1/5] Fix LTI system theory equation for phi(t) --- 07-Kalman-Filter-Math.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/07-Kalman-Filter-Math.ipynb b/07-Kalman-Filter-Math.ipynb index 2255d45..b81d667 100644 --- a/07-Kalman-Filter-Math.ipynb +++ b/07-Kalman-Filter-Math.ipynb @@ -718,7 +718,7 @@ "\n", "[*Linear Time Invariant Theory*](https://en.wikipedia.org/wiki/LTI_system_theory), also known as LTI System Theory, gives us a way to find $\\Phi$ using the inverse Laplace transform. You are either nodding your head now, or completely lost. I will not be using the Laplace transform in this book. LTI system theory tells us that \n", "\n", - "$$ \\Phi(t) = \\mathcal{L}^{-1}[(s\\mathbf{I} - \\mathbf{F})^{-1}]$$\n", + "$$ \\Phi(t) = \\mathcal{L}^{-1}[(s\\mathbf{I} - \\mathbf{A})^{-1}]$$\n", "\n", "I have no intention of going into this other than to say that the Laplace transform $\\mathcal{L}$ converts a signal into a space $s$ that excludes time, but finding a solution to the equation above is non-trivial. If you are interested, the Wikipedia article on LTI system theory provides an introduction. I mention LTI because you will find some literature using it to design the Kalman filter matrices for difficult problems. " ] @@ -1758,7 +1758,7 @@ "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python [default]", "language": "python", "name": "python3" }, From 9b9c3f2aaa17b84dd9afc3f98338d2e503b48d9a Mon Sep 17 00:00:00 2001 From: Matt Heard Date: Thu, 29 Dec 2016 19:53:18 +1300 Subject: [PATCH 2/5] Correct minor typo --- 01-g-h-filter.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01-g-h-filter.ipynb b/01-g-h-filter.ipynb index 63bed5a..91f7b82 100644 --- a/01-g-h-filter.ipynb +++ b/01-g-h-filter.ipynb @@ -3441,7 +3441,7 @@ "\n", "We use a *process model* to mathematically model the system. In this chapter our process model is the assumption that my weight today is yesterday's weight plus my weight gain for the last day. The process model does not model or otherwise account for the sensors. Another example would be a process model for an automobile. The process model might be \"distance equals velocity times time. This model is not perfect as the velocity of a car can vary over a non-zero amount of time, the tires can slip on the road, and so on. The *system error* or *process error* is the error in this model. We never know this value exactly; if we did we could refine our model to have zero error. Some texts use *plant model* and *plant error*. You may also see *system model*. They all mean the same thing.\n", "\n", - "The predict step is known as *system propagation*. It uses the *process model* to form a new *state estimate*. Because of the *process error* this estimate is imperfect. Assuming we are tracking data over time, we say we *propogate* the state into the future. Some texts call this the *evolution*. \n", + "The predict step is known as *system propagation*. It uses the *process model* to form a new *state estimate*. Because of the *process error* this estimate is imperfect. Assuming we are tracking data over time, we say we *propagate* the state into the future. Some texts call this the *evolution*. \n", "\n", "The update step is known as the *measurement update*. One iteration of the system propagation and measurement update is known as an *epoch*. \n", "\n", From 59ea48d4d95d6fda7e60022f8958db02c327d58e Mon Sep 17 00:00:00 2001 From: Matt Heard Date: Mon, 2 Jan 2017 11:52:08 +1300 Subject: [PATCH 3/5] Fix minor typos --- 02-Discrete-Bayes.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/02-Discrete-Bayes.ipynb b/02-Discrete-Bayes.ipynb index 62cfb26..0b42946 100644 --- a/02-Discrete-Bayes.ipynb +++ b/02-Discrete-Bayes.ipynb @@ -7032,7 +7032,7 @@ "\n", "With that said, this filter it is not used often because it has several limitations. Getting around those limitations is the motivation behind the chapters in the rest of this book.\n", "\n", - "The first problem is scaling. Our dog tracking problem used only one variable, $pos$, to denote the dog's position. Most interesting problems will want to track several things in a large space. Realistically, at a minimum we would want to track our dogs $(x,y)$ coordinate, and probably his velocity $(\\dot{x},\\dot{y})$ as well. We have not covered the multidimensional case, but instead of an array we use a multidimensional grid to store the probabilities at each discrete location. Each `update()` and `predict()` step requires updating all values in the grid, so a simple four variable problem would require $O(n^4)$ running time *per time step*. Realistic filters can have 10 or more variables to track, leading to exorbitant computation requirements.\n", + "The first problem is scaling. Our dog tracking problem used only one variable, $pos$, to denote the dog's position. Most interesting problems will want to track several things in a large space. Realistically, at a minimum we would want to track our dog's $(x,y)$ coordinate, and probably his velocity $(\\dot{x},\\dot{y})$ as well. We have not covered the multidimensional case, but instead of an array we use a multidimensional grid to store the probabilities at each discrete location. Each `update()` and `predict()` step requires updating all values in the grid, so a simple four variable problem would require $O(n^4)$ running time *per time step*. Realistic filters can have 10 or more variables to track, leading to exorbitant computation requirements.\n", "\n", "The second problem is that the filter is discrete, but we live in a continuous world. The histogram requires that you model the output of your filter as a set of discrete points. A 100 meter hallway requires 10,000 positions to model the hallway to 1cm accuracy. So each update and predict operation would entail performing calculations for 10,000 different probabilities. It gets exponentially worse as we add dimensions. A 100x100 m$^2$ courtyard requires 100,000,000 bins to get 1cm accuracy.\n", "\n", @@ -7064,7 +7064,7 @@ "source": [ "### Simulating the Train Behavior\n", "\n", - "We need to simulate an imperfect train. When we command it to move it will sometimes make a small mistake, and it's sensor will sometimes return the incorrect value." + "We need to simulate an imperfect train. When we command it to move it will sometimes make a small mistake, and its sensor will sometimes return the incorrect value." ] }, { From bfeeab05f7b85718576078195f69e96b4c267d01 Mon Sep 17 00:00:00 2001 From: marcae777 Date: Fri, 13 Jan 2017 00:27:13 -0500 Subject: [PATCH 4/5] Fixed formula in Kalman Filter Math --- 07-Kalman-Filter-Math.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/07-Kalman-Filter-Math.ipynb b/07-Kalman-Filter-Math.ipynb index 2255d45..a0953d9 100644 --- a/07-Kalman-Filter-Math.ipynb +++ b/07-Kalman-Filter-Math.ipynb @@ -388,7 +388,7 @@ "\n", "However, we are not interested in the derivative of $\\mathbf x$, but in $\\mathbf x$ itself. Ignoring the noise for a moment, we want an equation that recusively finds the value of $\\mathbf x$ at time $t_k$ in terms of $\\mathbf x$ at time $t_{k-1}$:\n", "\n", - "$$\\mathbf x(t_k) = \\mathbf F(\\Delta t)\\mathbf x(t_{k-1}) + \\mathbf B(t_k) + \\mathbf u (t_k)$$\n", + "$$\\mathbf x(t_k) = \\mathbf F(\\Delta t)\\mathbf x(t_{k-1}) + \\mathbf B(t_k)\\mathbf u (t_k)$$\n", "\n", "Convention allows us to write $\\mathbf x(t_k)$ as $\\mathbf x_k$, which means the \n", "the value of $\\mathbf x$ at the k$^{th}$ value of $t$.\n", From 345e2e46eff97ee15e9913db507a6eacb7758bd6 Mon Sep 17 00:00:00 2001 From: Stefano Probst Date: Sat, 14 Jan 2017 14:41:40 +0100 Subject: [PATCH 5/5] Fix typo in README.md Fix typo in README.md. jupter -> jupyter --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03fe91f..64caa6a 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ This will create a directory named Kalman-and-Bayesian-Filters-in-Python. Follow the instructions in **Installation and Software Requirements** below to install all the supporting sofware require. Then, navigate to the directory, and run IPython notebook with the command - jupter notebook + jupyter notebook This will open a browser window showing the contents of the base directory. The book is organized into chapters. To read Chapter 2, click on the link for chapter 2. This will cause the browser to open that subdirectory. In each subdirectory there will be one or more IPython Notebooks (all notebooks have a .ipynb file extension). The chapter contents are in the notebook with the same name as the chapter name. There are sometimes supporting notebooks for doing things like generating animations that are displayed in the chapter. These are not intended to be read by the end user, but of course if you are curious as to how an animation is made go ahead and take a look.