From f942a8abfc1b30d4c506b4c5a51a1b94ab31f11e Mon Sep 17 00:00:00 2001 From: Peter LeVasseur Date: Thu, 20 Jul 2017 11:02:26 -0400 Subject: [PATCH 1/2] Fixed text describing Gaussian prediction calculation, in particular changed to use sigma, instead of mu when describing the variance update. --- 04-One-Dimensional-Kalman-Filters.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04-One-Dimensional-Kalman-Filters.ipynb b/04-One-Dimensional-Kalman-Filters.ipynb index 8b336e3..55666bd 100644 --- a/04-One-Dimensional-Kalman-Filters.ipynb +++ b/04-One-Dimensional-Kalman-Filters.ipynb @@ -538,7 +538,7 @@ "$$\\begin{aligned}\\bar x &= \\mu_x + \\mu_{f_x} = 10 + 15 &&= 25 \\\\\n", "\\bar\\sigma^2 &= \\sigma_x^2 + \\sigma_{f_x}^2 = 0.2^2 + 0.7^2 &&= 0.53\\end{aligned}$$\n", "\n", - "It makes sense that the predicted position is the previous position plus the movement. What about the variance? It is harder to form an intuition about this. However, recall that with the `predict()` function for the discrete Bayes filter we always lost information. We don't really know where the dog is moving, so the confidence should get smaller (variance gets larger). $\\mu_{f_x}^2$ is the amount of uncertainty added to the system due to the imperfect prediction about the movement, and so we would add that to the existing uncertainty. \n", + "It makes sense that the predicted position is the previous position plus the movement. What about the variance? It is harder to form an intuition about this. However, recall that with the `predict()` function for the discrete Bayes filter we always lost information. We don't really know where the dog is moving, so the confidence should get smaller (variance gets larger). $\\sigma_{f_x}^2$ is the amount of uncertainty added to the system due to the imperfect prediction about the movement, and so we would add that to the existing uncertainty. \n", "\n", "Here is our implementation of the predict function, where `pos` and `movement` are Gaussian tuples in the form ($\\mu$, $\\sigma^2$):" ] From b752bc3afece0518a3a096bb88be7cb3f82acee1 Mon Sep 17 00:00:00 2001 From: Peter LeVasseur Date: Thu, 20 Jul 2017 15:34:41 -0400 Subject: [PATCH 2/2] In Introduction to Designing a Filter updated to use the temp_change variable when setting up the process model. --- 04-One-Dimensional-Kalman-Filters.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/04-One-Dimensional-Kalman-Filters.ipynb b/04-One-Dimensional-Kalman-Filters.ipynb index 8b336e3..305b844 100644 --- a/04-One-Dimensional-Kalman-Filters.ipynb +++ b/04-One-Dimensional-Kalman-Filters.ipynb @@ -1639,9 +1639,10 @@ "voltage_std = .13\n", "process_var = .05**2\n", "actual_voltage = 16.3\n", + "dt = 1. # time step in seconds\n", "\n", "x = (25, 1000) # initial state\n", - "process_model = (0., process_var)\n", + "process_model = (temp_change*dt, process_var)\n", "\n", "N = 50\n", "zs = [volt(actual_voltage, voltage_std) for i in range(N)]\n",