This commit is contained in:
Roger Labbe 2017-07-27 07:48:57 -07:00
commit 40e2c8d830

View File

@ -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$):"
]
@ -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",