Skip to content

Commit 40e2c8d

Browse files
committed
2 parents 5c25643 + 5a7257d commit 40e2c8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

04-One-Dimensional-Kalman-Filters.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@
538538
"$$\\begin{aligned}\\bar x &= \\mu_x + \\mu_{f_x} = 10 + 15 &&= 25 \\\\\n",
539539
"\\bar\\sigma^2 &= \\sigma_x^2 + \\sigma_{f_x}^2 = 0.2^2 + 0.7^2 &&= 0.53\\end{aligned}$$\n",
540540
"\n",
541-
"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",
541+
"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",
542542
"\n",
543543
"Here is our implementation of the predict function, where `pos` and `movement` are Gaussian tuples in the form ($\\mu$, $\\sigma^2$):"
544544
]
@@ -1639,9 +1639,10 @@
16391639
"voltage_std = .13\n",
16401640
"process_var = .05**2\n",
16411641
"actual_voltage = 16.3\n",
1642+
"dt = 1. # time step in seconds\n",
16421643
"\n",
16431644
"x = (25, 1000) # initial state\n",
1644-
"process_model = (0., process_var)\n",
1645+
"process_model = (temp_change*dt, process_var)\n",
16451646
"\n",
16461647
"N = 50\n",
16471648
"zs = [volt(actual_voltage, voltage_std) for i in range(N)]\n",

0 commit comments

Comments
 (0)