Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Kalman filter
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example application, technical == [[File:kalman.png|class=skin-invert-image|thumb| {{legend-line|solid light-dark(black,white)|Truth}} {{legend-line|solid green|Filtered process}} {{legend-line|dotted red|Observations}} ]] Consider a truck on frictionless, straight rails. Initially, the truck is stationary at position 0, but it is buffeted this way and that by random uncontrolled forces. We measure the position of the truck every Ξ''t'' seconds, but these measurements are imprecise; we want to maintain a model of the truck's position and [[velocity]]. We show here how we derive the model from which we create our Kalman filter. Since <math>\mathbf{F}, \mathbf{H}, \mathbf{R}, \mathbf{Q}</math> are constant, their time indices are dropped. The position and velocity of the truck are described by the linear state space :<math>\mathbf{x}_k = \begin{bmatrix} x \\ \dot{x} \end{bmatrix} </math> where <math>\dot{x}</math> is the velocity, that is, the derivative of position with respect to time. We assume that between the (''k'' β 1) and ''k'' timestep, uncontrolled forces cause a constant acceleration of ''a''<sub>''k''</sub> that is [[normal distribution|normally distributed]] with mean 0 and standard deviation ''Ο''<sub>''a''</sub>. From [[Newton's laws of motion]] we conclude that :<math>\mathbf{x}_k = \mathbf{F} \mathbf{x}_{k-1} + \mathbf{G} a_k</math> (there is no <math>\mathbf{B}u</math> term since there are no known control inputs. Instead, ''a''<sub>''k''</sub> is the effect of an unknown input and <math>\mathbf{G}</math> applies that effect to the state vector) where :<math>\begin{align} \mathbf{F} &= \begin{bmatrix} 1 & \Delta t \\ 0 & 1 \end{bmatrix} \\[4pt] \mathbf{G} &= \begin{bmatrix} \frac{1}{2}{\Delta t}^2 \\[6pt] \Delta t \end{bmatrix} \end{align}</math> so that :<math>\mathbf{x}_k = \mathbf{F} \mathbf{x}_{k-1} + \mathbf{w}_k</math> where :<math>\begin{align} \mathbf{w}_k &\sim N(0, \mathbf{Q}) \\ \mathbf{Q} &= \mathbf{G}\mathbf{G}^\textsf{T}\sigma_a^2 = \begin{bmatrix} \frac{1}{4}{\Delta t}^4 & \frac{1}{2}{\Delta t}^3 \\[6pt] \frac{1}{2}{\Delta t}^3 & {\Delta t}^2 \end{bmatrix}\sigma_a^2. \end{align}</math> The matrix <math>\mathbf{Q}</math> is not full rank (it is of rank one if <math>\Delta t \neq 0</math>). Hence, the distribution <math>N(0, \mathbf{Q})</math> is not absolutely continuous and has [[Multivariate normal distribution#Degenerate case|no probability density function]]. Another way to express this, avoiding explicit degenerate distributions is given by :<math>\mathbf{w}_k \sim \mathbf{G} \cdot N\left(0, \sigma_a^2\right). </math> At each time phase, a noisy measurement of the true position of the truck is made. Let us suppose the measurement noise ''v''<sub>''k''</sub> is also distributed normally, with mean 0 and standard deviation ''Ο''<sub>''z''</sub>. :<math>\mathbf{z}_k = \mathbf{H x}_k + \mathbf{v}_k</math> where :<math>\mathbf{H} = \begin{bmatrix} 1 & 0 \end{bmatrix} </math> and :<math> \mathbf{R} = \mathrm{E}\left[\mathbf{v}_k \mathbf{v}_k^\textsf{T}\right] = \begin{bmatrix} \sigma_z^2 \end{bmatrix} </math> We know the initial starting state of the truck with perfect precision, so we initialize :<math>\hat{\mathbf{x}}_{0 \mid 0} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} </math> and to tell the filter that we know the exact position and velocity, we give it a zero covariance matrix: :<math>\mathbf{P}_{0 \mid 0} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} </math> If the initial position and velocity are not known perfectly, the covariance matrix should be initialized with suitable variances on its diagonal: :<math>\mathbf{P}_{0 \mid 0} = \begin{bmatrix} \sigma_x^2 & 0 \\ 0 & \sigma_\dot{x}^2 \end{bmatrix} </math> The filter will then prefer the information from the first measurements over the information already in the model.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Kalman filter
(section)
Add topic