diff --git a/08-Designing-Kalman-Filters.ipynb b/08-Designing-Kalman-Filters.ipynb index ba24de09..9bb7ff59 100644 --- a/08-Designing-Kalman-Filters.ipynb +++ b/08-Designing-Kalman-Filters.ipynb @@ -342,7 +342,7 @@ "source": [ "### Design the Measurement Noise Matrix\n", "\n", - "We assume that the $x$ and $y$ variables are independent white Gaussian processes. That is, the noise in x is not in any way dependent on the noise in y, and the noise is normally distributed about the mean 0. For now let's set the variance for $x$ and $y$ to be 5 meters$^2$. They are independent, so there is no covariance, and our off diagonals will be 0. This gives us:\n", + "We assume that the $x$ and $y$ variables are independent white Gaussian processes. That is, the noise in x is not in any way dependent on the noise in y, and the noise is normally distributed about the mean 0. For now let's set the variance for $x$ and $y$ to be 5 feet$^2$. They are independent, so there is no covariance, and our off diagonals will be 0. This gives us:\n", "\n", "$$\\mathbf R = \\begin{bmatrix}\\sigma_x^2 & \\sigma_y\\sigma_x \\\\ \\sigma_x\\sigma_y & \\sigma_{y}^2\\end{bmatrix} \n", "= \\begin{bmatrix}5&0\\\\0&5\\end{bmatrix}$$\n", @@ -1589,7 +1589,7 @@ "\n", "As I've mentioned, you may place the variables in $\\mathbf x$ in whatever order you choose. For example, you could define a 1D constant acceleration as $\\mathbf x = \\begin{bmatrix}\\ddot x & x & \\dot x\\end{bmatrix}^\\mathsf T$. I can't imagine why you would want that order, but it is possible.\n", "\n", - "Let's do something more reasonable. Design a second order filter for a robot moving in 2D, where $\\mathbf x = \\begin{bmatrix}x & y & \\dot x & \\dot y \\end{bmatrix}^\\mathsf T$. In this chapter we have been using $\\mathbf x = \\begin{bmatrix}x & \\dot x & y & \\dot y \\end{bmatrix}^\\mathsf T$.\n", + "Let's do something more reasonable. Design a first order filter for a robot moving in 2D, where $\\mathbf x = \\begin{bmatrix}x & y & \\dot x & \\dot y \\end{bmatrix}^\\mathsf T$. In this chapter we have been using $\\mathbf x = \\begin{bmatrix}x & \\dot x & y & \\dot y \\end{bmatrix}^\\mathsf T$.\n", "\n", "Why would you choose a different ordering? As you'll see in a moment, changing the order of $\\mathbf x$ changes the order of most of the rest of the filter's matrices. Depending on what data you want to inspect, such as the correlations in $\\mathbf P$, various orderings of $\\mathbf x$ can make that easier or more difficult.\n", "\n", @@ -1886,7 +1886,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In previous sections $\\mathbf P$ was a cicle, not an ellipse. In my code I set $\\mathbf R = \\bigl[ \\begin{smallmatrix}0.03 & 0 \\\\ 0 & 0.15\\end{smallmatrix}\\bigl ]$, which gives the measurement of $y$ 5 times the error of $x$. That's somewhat artificial, but in subsequent chapters nearly all of the covariances will be elliptical for good reasons. \n", + "In previous sections $\\mathbf P$ was a circle, not an ellipse. In my code I set $\\mathbf R = \\bigl[ \\begin{smallmatrix}0.03 & 0 \\\\ 0 & 0.15\\end{smallmatrix}\\bigl ]$, which gives the measurement of $y$ 5 times the error of $x$. That's somewhat artificial, but in subsequent chapters nearly all of the covariances will be elliptical for good reasons. \n", "\n", "Think about what this means. Statistics tells us that 99% of all measurements fall within 3 standard deviations; that means 99% of all measurements should be within this ellipse. Let's plot the measurement with the ellipse." ] @@ -2110,7 +2110,7 @@ "\n", "Because of the unknowns you will be unable to analytically compute the correct values for the filter's matrices. You will start by making the best estimate possible, and then test your filter against a wide variety of simulated and real data. Your evaluation of the performance will guide you towards what changes you need to make to the matrices. We've done some of this already - I've shown you the effect of $\\mathbf Q$ being too large or small.\n", "\n", - "Now let's consider more analytical ways of accessing performance. If the Kalman filter is performing optimally its estimation errors (the difference between the true state and the estimated state) will have these properties:\n", + "Now let's consider more analytical ways of assessing performance. If the Kalman filter is performing optimally its estimation errors (the difference between the true state and the estimated state) will have these properties:\n", "\n", " 1. The mean of the estimation error is zero\n", " 2. Its covariance is described by the Kalman filter's covariance matrix\n", @@ -2131,7 +2131,7 @@ "\n", "If this is not clear, recall that if $a$ is scalar, $a^\\mathsf T = a$ and that $a^{-1} =\\frac{1}{a}$.\n", "\n", - "So as the covariance matrix gets smaller NEES gets larger for the same error. The covariance matrix is the filter's estimate of it's error, so if it is small relative to the estimation error then it is performing worse than if it is large relative to the same estimation error.\n", + "So as the covariance matrix gets smaller NEES gets larger for the same error. The covariance matrix is the filter's estimate of its error, so if it is small relative to the estimation error then it is performing worse than if it is large relative to the same estimation error.\n", "\n", "This computation gives us a scalar result. If $\\mathbf x$ is dimension ($n \\times 1$), then the dimension of the computation is ($1 \\times n$)($n \\times n$)($n \\times 1$) = ($1 \\times 1$). What do we do with this number?\n", "\n", @@ -3977,7 +3977,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.9.13" }, "widgets": { "state": {},