Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kalman filter: how to use it with no "state transition model"?

I am working on accelerometer from an android phone. I wish to filter the horrible noise the accelerometer is returning recording the phone's moves.

I was reading around on Kalman filter, because low pass are just not enough.

But I don't have a model of the transition from ACCELERATION(k-1) to ACCELERATION(k) because it is the movements of the user. So I have no state transition matrix (H or F in different papers, the one that multiply Xk-1 in the equation Xk = HXk-1 + Bcommand+noise)

I saw some people taking the identity matrix in simple examples. How can it work for dynamic acceleration?

I know Kalman Filters, people always produce some H matrix, I just don't know how in my case.

like image 533
Poutrathor Avatar asked Jan 22 '13 18:01

Poutrathor


People also ask

Does a Kalman filter need a model?

In order to use the Kalman filter to estimate the internal state of a process given only a sequence of noisy observations, one must model the process in accordance with the following framework.

When can Kalman filter be used?

Kalman filters are used to optimally estimate the variables of interests when they can't be measured directly, but an indirect measurement is available. They are also used to find the best estimate of states by combining measurements from various sensors in the presence of noise.

What is an unscented Kalman filter?

The Unscented Kalman Filter (UKF) is a novel development in the field. The idea is to produce several sampling points (Sigma points) around the current state estimate based on its covariance.

What is an adaptive Kalman filter?

A Kalman filter estimates the state of a dynamic system with two different models namely dynamic and observation models. The dynamic model describes the behaviour of state vector, while the observation model establishes the relationship between measurements and the state vector.


2 Answers

Kalman Filter is often thought of as a linear filter where you have all model matrices but the idea of filter and its first applications come from non-linear models. In that case you use functions instead of matrices.

If the functions for prediction and update are highly non-linear you can use statistical methods to estimate your parameters on-line. The first look what you can take is unscented kalman filter which recovers mean and covariance from deterministic sampling technique - unscented transformation. I think in your case this could be the best to start with.

There are other variants of Kalman Filter. You can start from wikipedia but if you google "adaptive kalman filter" you can see the variety of the subject.

If you want to get deeper into the subject but not necessary start with all maths I recommend very good book: Kalman Filter for Beginners to start with by Phil Kim . There are also other possibility as sensor fusion, but it is another broad subject.

like image 161
tomasz74 Avatar answered Sep 29 '22 09:09

tomasz74


You can use the identity matrix.

The state transition matrix is used to predict the future state based on current state, in the absence of any new measurements. In your case, as you say, you do not have any way of predicting future state (acceleration) - so your best guess is that future state (acceleration) is the same as current state. This is exactly what identity matrix does.

In many Kalman filters, there is some way of predicting the future state based on current state, and that's where a non-identity state transition matrix would step in. For example, suppose your Kalman filter estimates vehicle position and speed based on GPS and speedometer; then you could predict future position by changing position based on speed, even without new measurements. Dave's answer shows how to do it using state transition matrix.

like image 36
Ahti Avatar answered Sep 29 '22 09:09

Ahti