From 740f189d1a77f3be8aac0387a0161ba49d96c65b Mon Sep 17 00:00:00 2001 From: MuhammedM294 Date: Mon, 20 Mar 2023 22:07:26 +0200 Subject: [PATCH 1/3] Fix typos in chapter 6 --- 06-Multivariate-Kalman-Filters.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/06-Multivariate-Kalman-Filters.ipynb b/06-Multivariate-Kalman-Filters.ipynb index 47a40945..4d90c377 100644 --- a/06-Multivariate-Kalman-Filters.ipynb +++ b/06-Multivariate-Kalman-Filters.ipynb @@ -2224,7 +2224,7 @@ "\n", "The filter that incorporates velocity into the state produces much better estimates than the filter that only tracks position. The univariate filter has no way to estimate the velocity or change in position, so it lags the tracked object. \n", "\n", - "In the univarate Kalman filter chapter we had a control input `u` to the predict equation:\n", + "In the univariate Kalman filter chapter we had a control input `u` to the predict equation:\n", "\n", "```python\n", " def predict(self, u=0.0):\n", @@ -2832,7 +2832,7 @@ "source": [ "Specialized knowledge of your problem domain may lead you to a different computation, but this is one way to do it. For example, if the state includes velocity you might take the first two measurements of position, compute the difference, and use that as the initial velocity.\n", "\n", - "Now we need to compute a value for $\\mathbf P$. This will vary by problem, but in general you will use the measurement error $\\mathbf R$ for identical terms, and maximum values for the rest of the terms. Maybe that isn't clear. In this chapter we have been tracking and object using position and velocity as the state, and the measurements have been positions. In that case we would initialize $\\mathbf P$ with\n", + "Now we need to compute a value for $\\mathbf P$. This will vary by problem, but in general you will use the measurement error $\\mathbf R$ for identical terms, and maximum values for the rest of the terms. Maybe that isn't clear. In this chapter we have been tracking an object using position and velocity as the state, and the measurements have been positions. In that case we would initialize $\\mathbf P$ with\n", "\n", "$$\\mathbf P = \\begin{bmatrix}\\mathbf R_0 & 0 \\\\0 & vel_{max}^2\\end{bmatrix}$$\n", "\n", @@ -3139,7 +3139,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.9.13" }, "widgets": { "application/vnd.jupyter.widget-state+json": { From 7dad42e3fab25b2d3f60a0d6640fffc30fdb4b27 Mon Sep 17 00:00:00 2001 From: MuhammedM294 Date: Wed, 22 Mar 2023 20:35:19 +0200 Subject: [PATCH 2/3] Fix typo in chapter 6 --- 06-Multivariate-Kalman-Filters.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06-Multivariate-Kalman-Filters.ipynb b/06-Multivariate-Kalman-Filters.ipynb index 4d90c377..a5931794 100644 --- a/06-Multivariate-Kalman-Filters.ipynb +++ b/06-Multivariate-Kalman-Filters.ipynb @@ -2904,7 +2904,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The batch filter takes an optional `filterpy.common.Saver` object. If provided, all of the filter's attributes will be saved as well. This is useful if you want to inspect values other than the state and covariance. Here I plot the residual to see if it appears like noise centered around 0. This is a quick visual inspection to see if the filter is well designed. If if drifts from zero, or doesn't look like noise, the filter is poorly designed and/or the processes are not Gaussian. We will discuss this in detail in later chapters. For now consider this a demonstration of the `Saver` class." + "The batch filter takes an optional `filterpy.common.Saver` object. If provided, all of the filter's attributes will be saved as well. This is useful if you want to inspect values other than the state and covariance. Here I plot the residual to see if it appears like noise centered around 0. This is a quick visual inspection to see if the filter is well designed. If it drifts from zero or doesn't look like noise, the filter is poorly designed and/or the processes are not Gaussian. We will discuss this in detail in later chapters. For now consider this a demonstration of the `Saver` class." ] }, { From 13898d7980217847da4b1522adebef7e841ef6e8 Mon Sep 17 00:00:00 2001 From: MuhammedM294 Date: Wed, 22 Mar 2023 21:11:26 +0200 Subject: [PATCH 3/3] Fix typo in chapter 6 --- 06-Multivariate-Kalman-Filters.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06-Multivariate-Kalman-Filters.ipynb b/06-Multivariate-Kalman-Filters.ipynb index a5931794..a6e3d6c1 100644 --- a/06-Multivariate-Kalman-Filters.ipynb +++ b/06-Multivariate-Kalman-Filters.ipynb @@ -2943,7 +2943,7 @@ "\n", "Let's assume that we are tracking a car that has been traveling in a straight line. We get a measurement that implies that the car is starting to turn to the left. The Kalman filter moves the state estimate somewhat towards the measurement, but it cannot judge whether this is a particularly noisy measurement or the true start of a turn. \n", "\n", - "However, if we have future measurements we can decide if a turn was made. Suppose the subsequent measurements all continue turning left. We can then be sure that that a turn was initiated. On the other hand, if the subsequent measurements continued on in a straight line we would know that the measurement was noisy and should be mostly ignored. Instead of making an estimate part way between the measurement and prediction the estimate will either fully incorporate the measurement or ignore it, depending on what the future measurements imply about the object's movement.\n", + "However, if we have future measurements we can decide if a turn was made. Suppose the subsequent measurements all continue turning left. We can then be sure that a turn was initiated. On the other hand, if the subsequent measurements continued on in a straight line we would know that the measurement was noisy and should be mostly ignored. Instead of making an estimate part way between the measurement and prediction the estimate will either fully incorporate the measurement or ignore it, depending on what the future measurements imply about the object's movement.\n", "\n", "`KalmanFilter` implements a form of this algorithm which is called an *RTS smoother*, named after the inventors of the algorithm: Rauch, Tung, and Striebel. The method is `rts_smoother()`. To use it pass in the means and covariances computed from the `batch_filter` step, and receive back the smoothed means, covariances, and Kalman gain. " ]