0
$\begingroup$

I have created an app that uses the power of a WiFi signal to determine distance to the WiFi access point. Problem with that power reading is that it is not very stable. I have been looking into filtering techniques and a Kalman filter seems perfect, albeit not trivial.

Could you help me create a model or give some hints on the use of the Kalman filter to filter out the noise?

$\endgroup$
  • 1
    $\begingroup$ Is wiki so trivial for the start? $\endgroup$ – Caran-d'Ache Jan 1 '14 at 14:27
  • $\begingroup$ also i think cross validated might be more suitable for this question. $\endgroup$ – Lost1 Jan 1 '14 at 14:34
  • $\begingroup$ Well, I found an implementation that needs a process and measurement model. I have no idea where to start to create these models. $\endgroup$ – Bart Friederichs Jan 1 '14 at 14:47
0
$\begingroup$

Kalman filter can be explained in these simple terms:

1) It assumes that you have a probabilistic model for how system changes with time. In your case how the power of the source changes. From what you tell me, for a stationary source, you can assume this to be constant.

2) It assumes how the measurement system works. For example, you may assume that the received power follows inverse squared law. Note, if either the source or the detector moves, then you have to model the motion as part of (1) above. Probabilistically you can assume that the jerk (change in acceleration) is a zero mean random variable.

3) You have a probabilistic model in your measurement errors.

In your case, if you assume a stationary source and stationary detector, then you can assume nothing changes in the system. In this case Kalman filter reduces to least squares solution. So you just average the last $N$ measured values, or use some form auto regression. If $P$ is the measured power, and $\hat P$ is the filtered value, then a simple recursive formula which you update at every measurement: $$ \hat P = \hat P + \theta (P -\hat P),~~ 0 \le \theta \le 1 $$ where $\theta$ is a measure of how much you trust the measurement. Note that if $\theta = 1$ then there is no filtering $\hat P = P$. If $\theta =0$ then measurement is rejected (no change in $\hat P$). You can change $\theta$ from one measurement if you have an independent way to asses the confidence in the measurement.

$\endgroup$
  • $\begingroup$ Thanks for getting me started. I'll have to dust off my math skills I guess. $\endgroup$ – Bart Friederichs Jan 1 '14 at 15:12
0
$\begingroup$

http://www.amazon.co.uk/Kalman-Filter-Beginners-MATLAB-Examples/dp/1463648359/ref=sr_1_1?ie=UTF8&qid=1388589013&sr=8-1&keywords=Kalman+filter

this book gives nice examples with code (in Matlab)

The book is very easy to understand.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.