checkpoint; in midst of big re-org.

This is not a 'useful'checkin. I'm heavily reorganizing teh
multivariate chapter (spliltting in two) and I am getting
worried about losing edits.
This commit is contained in:
Roger Labbe committed 2015-07-12 18:57:43 -07:00
1 parent d739e6418b
commit 878e4a5578
7 files changed
+2455 -1618

No files matched your search

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+16 -1
View File
@@ -881,7 +881,22 @@
"The final equation is:\n",
"$$\\mathbf{P} = \\mathbf{FPF}^\\mathsf{T} + \\mathbf{Q}\\tag{2}$$\n",
"\n",
"$\\mathbf{FPF}^\\mathsf{T}$ is the way we put $\\mathbf{P}$ into the process space using linear algebra so that we can add the process noise $\\mathbf{Q}$ to it."
"$\\mathbf{FPF}^\\mathsf{T}$ is the way we put $\\mathbf{P}$ into the process space using linear algebra so that we can add the process noise $\\mathbf{Q}$ to it.\n",
"\n",
"\n",
"**needs edit**\n",
"\n",
"I admit this may be a 'magical' equation to you. If you have some experience with linear algebra and statistics, this may help. The covariance due to the prediction can be modeled as the expected value of the error in the prediction step, given by this equation. \n",
"\n",
"$$\\begin{aligned}\n",
"\\mathbf{P}^- &= E[(\\mathbf{Fx})(\\mathbf{Fx})^\\mathsf{T}]\\\\\n",
" &= E[\\mathbf{Fxx}^\\mathsf{T}\\mathbf{F}^\\mathsf{T}] \\\\\n",
" &= \\mathbf{F}\\, E[\\mathbf{xx}^\\mathsf{T}]\\, \\mathbf{F}^\\mathsf{T}\n",
"\\end{aligned}$$\n",
"\n",
"Of course, $E[\\mathbf{xx}^\\mathsf{T}]$ is just $\\mathbf{P}$, giving us\n",
"\n",
"$$\\mathbf{P}^- = \\mathbf{FPF}^\\mathsf{T}$$"
]
},
{
+1 -1
View File
@@ -38,7 +38,7 @@
"\n",
"The Kalman filter uses the equation $P^- = FPF^\\mathsf{T}$ to compute the prior of the covariance matrix during the prediction step, where P is the covariance matrix and F is the system transistion function. For a Newtonian system $x = \\dot{x}\\Delta t + x_0$ F might look like\n",
"\n",
"$$F = \\begin{bmatrix}1 & \\Delta t\\\\0 1\\end{bmatrix}$$\n",
"$$F = \\begin{bmatrix}1 & \\Delta t\\\\0 & 1\\end{bmatrix}$$\n",
"\n",
"$FPF^\\mathsf{T}$ alters P by taking the correlation between the position ($x$) and velocity ($\\dot{x}$). This interactive plot lets you see the effect of different designs of F has on this value. For example,\n",
"\n",
+4 -2
View File
@@ -355,14 +355,16 @@ def plot_correlation_covariance():
import book_plots as bp
def plot_track(ps, zs, cov,
def plot_track(ps, zs, cov, std_scale=1,
plot_P=True, y_lim=None,
title='Kalman Filter'):
print(std_scale)
count = len(zs)
actual = np.linspace(0, count - 1, count)
cov = np.asarray(cov)
std = np.sqrt(cov[:,0,0])
std = std_scale*np.sqrt(cov[:,0,0])
std_top = np.minimum(actual+std, [count + 10])
std_btm = np.maximum(actual-std, [-50])
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/bash
echo "merging book..."
#echo "merging book..."
python merge_book.py
echo "creating pdf..."
+1
View File
@@ -39,6 +39,7 @@ if __name__ == '__main__':
'../02_Discrete_Bayes.ipynb',
'../03_Gaussians.ipynb',
'../04_One_Dimensional_Kalman_Filters.ipynb',
'../05_Multivariate_Gaussians.ipynb',
'../05_Multivariate_Kalman_Filters.ipynb',
'../06_Kalman_Filter_Math.ipynb',
'../07_Designing_Kalman_Filters.ipynb',