Kalman Filter Help: Get Started Estimating Future Location of Mobile Device

In summary, the person is trying to estimate the future location of a mobile device using the Kalman Filter. They are measuring the angle between lines at regular intervals and using that to extrapolate the device's location. They are seeking help on how to implement the Kalman Filter in their model, and are provided with a mathematical explanation of how it can be done.
  • #1
lynchtkd
3
0
Hi all,

I am trying to estimate the future location of a mobile device and I was thinking of using the Kalman Filter to do this. Problem is I don't really know where to start. All the literature I have been reading gets much to advanced to quickly.

What i have is basically, I am measuring the angle between lines (measuring movements at time intervals) so we take a set of recent movements and extrapolate the likely future location of the mobile device.

Can anyone help please.
 
Mathematics news on Phys.org
  • #2
lynchtkd said:
Hi all,

I am trying to estimate the future location of a mobile device and I was thinking of using the Kalman Filter to do this. Problem is I don't really know where to start. All the literature I have been reading gets much to advanced to quickly.

What i have is basically, I am measuring the angle between lines (measuring movements at time intervals) so we take a set of recent movements and extrapolate the likely future location of the mobile device.

Can anyone help please.
Is the sensor located at the mobile and measures the angles to other objects, or is the sensor located elsewhere and measures angles to the mobile?
In the second case, the system is observable only if the sensor follows an accelerated trajectory.
In order to help you I must have more informations about your system.
 
  • #3
As the device moves we track its location, with say GPS. At regular intervals we read the location. So for example we have three points A,B,C. We create the lines |AB| and |BC| and measure the angle of change in direction from one line segment to another.

Am I right in thinking that using/implementing a Kalman filter we can use it to estimate the future location of the user?
 
  • #4
lynchtkd said:
As the device moves we track its location, with say GPS. At regular intervals we read the location. So for example we have three points A,B,C. We create the lines |AB| and |BC| and measure the angle of change in direction from one line segment to another.

Am I right in thinking that using/implementing a Kalman filter we can use it to estimate the future location of the user?
Do you intend to estimate the motion parameters with only 3 measurements? It is not enough. But if you have several measurements at known times, you can use a Kalman filter in order to estimate the correct position (the measurements allways contain errors) as well as velocity and acceleration. Knowing those dynamic parameters you can estimate the future position.
The segments |AB|, |BC| and the angle between them are irrelevant to the use of a Kalman filter.
 
  • #5
Cheers,

I only gave three points as an example, but using Kalman would be feasible to estimate future location. How would I go about implementing that model given I can know the velocity and acceleration? I have been reading and reading to try and get a greater understanding of the Kalman filter, but if I could get a more grounded example it would help greatly.
 
  • #6
You can model your 2D movement as:
[tex]x_{k+1} = x_k + vx_k T + \frac{1}{2}ax_k T^2 + \nu_x[/tex]
[tex]y_{k+1} = y_k + vy_k T + \frac{1}{2}ay_k T^2 + \nu_y[/tex]
[tex]vx_{k+1} = vx_k + ax_k T + \nu_vx[/tex]
[tex]vy_{k+1} = vy_k + ay_k T + \nu_vy[/tex]
[tex]ax_{k+1} = ax_k + \nu_ax[/tex]
[tex]ay_{k+1} = ay_k + \nu_ay[/tex]
Or,in matrix form:
[tex]\mathbf{x_{k+1}} = \mathbf{\Phi} \mathbf{x_k} + \mathbf{w_k}[/tex]
Where
[tex]\mathbf{x_k} = \left[ \begin{array}{c}
x_k\\vx_k\\ax_k\\y_k\\vy_k\\ay_k
\end{array} \right][/tex]
[tex]\mathbf{\Phi} = \left[ \begin{array}{cccccc}
1 & T & \frac{1}{2}T^2 & 0 & 0 & 0\\
0 & 1 & T & 0 & 0 & 0\\
0 & 0 & 1 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & T & \frac{1}{2}T^2\\
0 & 0 & 0 & 0 & 1 & T\\
0 & 0 & 0 & 0 & 0 & 1
\end{array} \right][/tex]
[tex]\mathbf{w_k}= \left[ \begin{array}{c}
\nu_x\\
\nu_vx\\
\nu_ax\\
\nu_y\\
\nu_vy\\
\nu_ay
\end{array} \right][/tex]
[tex]\mathbf{w_k}[/tex] represents the process noise (uncertainties in the movement).
The measurement equation, if I understand correctly is:
[tex]\mathbf{z_k} = \left[ \begin{array}{c}
x_k\\y_k
\end{array} \right][/tex]
or
[tex]\mathbf{z_k} = \mathbf{H} \mathbf{x_k}[/tex]
with
[tex]\mathbf{H} = \left[ \begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & 0 & 0
\end{array} \right][/tex]
If you know an estimate [tex]\mathbf{\hat{x}_{k|k}}[/tex] of [tex]\mathbf{x_k}[/tex] at the instant [tex]t_k[/tex] and have a measurement [tex]\mathbf{z_{k+1}} [/tex] at instant [tex]t_{k+1}[/tex] , the best estimate [tex]\mathbf{\hat{x}_{k+1|k+1}}[/tex] of [tex]\mathbf{x_{k+1}}[/tex] is given by the Kalman filter:
[tex]\mathbf{\hat{x}_{k+1|k+1}} = [tex]\mathbf{\hat{x}_{k+1|k}} + \mathbf{K_{k+1}}(\mathbf{z_{k+1}} - \mathbf{H} \mathbf{\hat{x}_{k+1|k}})[/tex]
with
[tex]\mathbf{\hat{x}_{k+1|k}} = \mathbf{\Phi} \mathbf{\hat{x}_{k|k}}[/tex]
[tex]\mathbf{K_{k+1}} = \mathbf{P_{k+1|k}}.\mathbf{H^T} (\mathbf{H} .\mathbf{P_{k+1|k}}.\mathbf{H^T} + \mathbf{R})^{-1}[/tex]
[tex]\mathbf{P_{k+1|k+1}} = (I - \mathbf{K_{k+1}}.\mathbf{H}). \mathbf{P_{k+1|k}}[/tex]
[tex]\mathbf{P_{k+1|k}} = \mathbf{\Phi}.\mathbf{P_{k|k}}.\mathbf{\Phi^T} + \mathbf{Q}[/tex]
where
\mathbf{\hat{x}_{k|j}}[/tex] is the best estimate of [tex]\mathbf{x_k}[/tex] given the measurements until the instant [tex]t_j[/tex].
[tex]\mathbf{P_{k|j}} = E[(\mathbf{x_k}-\mathbf{\hat{x}_{k|j}}).(\mathbf{x_k}-\mathbf{\hat{x}_{k|j}})^T][/tex]
is the estimation error covariance matrix.
[tex]\mathbf{Q}[/tex] is the process noise covariance matrix
and
[tex]\mathbf{R}[/tex] is the measurement noise covariance matrix.
 
Last edited by a moderator:

1. What is a Kalman filter?

A Kalman filter is a mathematical algorithm used to estimate the state of a system based on incomplete and noisy data. It combines measurements from different sensors with a prediction of the system's future state to provide a more accurate estimate.

2. How does a Kalman filter work?

A Kalman filter works by using a series of mathematical equations to iteratively update its estimate of the system's state. It takes into account both the current measurement and the previous estimate, as well as the noise and uncertainty in the system.

3. Why is a Kalman filter useful for mobile device location estimation?

A Kalman filter is useful for mobile device location estimation because it can integrate measurements from multiple sensors, such as GPS, Wi-Fi, and accelerometers, to provide a more accurate and reliable estimate of the device's location. It also takes into account the inherent uncertainty and noise in these measurements, resulting in a more robust estimate.

4. How do I get started with estimating future location of a mobile device using a Kalman filter?

To get started with estimating the future location of a mobile device using a Kalman filter, you will first need to have a good understanding of the mathematical concepts behind it. Then, you will need to gather data from various sensors on the mobile device and implement the Kalman filter algorithm to process and fuse these measurements. Finally, you can use the output of the Kalman filter to estimate the future location of the device.

5. Are there any limitations to using a Kalman filter for mobile device location estimation?

Yes, there are some limitations to using a Kalman filter for mobile device location estimation. It relies on accurate and consistent sensor measurements, so any errors or biases in the data can affect the accuracy of the estimation. Additionally, it may not work well in environments with high levels of noise or uncertainty, such as in areas with poor GPS signal or during extreme weather conditions.

Similar threads

Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
808
Replies
1
Views
2K
  • General Engineering
Replies
1
Views
2K
  • General Math
Replies
4
Views
5K
  • Programming and Computer Science
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
896
  • General Engineering
Replies
2
Views
2K
Replies
24
Views
10K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
3K
Back
Top