Kalman filter: how to use it without a "state transition model"?

I am working on an accelerometer from an Android phone. I want to filter out the terrible noise through which the accelerometer returns, the recording of the phone moves.

I read around the Kalman filter because low frequencies are not enough.

But I do not have a transition model from ACCELERATION(k-1) to ACCELERATION(k) , because these are user movements. Therefore, I do not have a state transition matrix (H or F in different documents, one of which multiplies 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 matrix H, I just don’t know how in my case.

+4
source share
4 answers

Kalman Filter is often seen as a linear filter in which you have all the model matrices, but the idea of ​​the filter and its first applications comes from non-linear models. In this case, you use functions instead of matrices.

If the forecasting and updating functions are highly non-linear, you can use statistical methods to evaluate your parameters online. The first glance you can take is a filter without a kalman filter , which restores the mean and covariance from the deterministic sampling method - transform without changes . I think in your case this might be the best place to start.

There are other Kalman filter options. You can start with wikipedia , but if you use Google’s adaptive Kalman filter, you can see a variety of themes.

If you want to get deeper into the topic, but don't have to start with all the math exercises, I recommend a very good book: Kalman's beginner filter to get started with Phil Kim. There are also other possibilities as a fusion of sensors, but this is another broad question.

+3
source

For the state vector [x, v_x, a_x] , that is, the position, speed and acceleration of the object in one direction (the same logic is used for two other degrees of freedom). Usually you define a state transition matrix as

 1 dt 0.5*dt*dt 0 1 dt 0 0 1 

If you write this, you will get:

 xnew = x+v_x*dt + 0.5*a_x*dt*dt vnew = v_x + a_x*dt anew = a_x 

These are the equations of motion for an object moving with constant acceleration.

The way in which an unknown user caused movements to be processed by Kalman is the result of the term “noise” of the installation. You assume that instead of continuing with the same acceleration, there are unknown random perturbations for acceleration (and, therefore, for other components of the state).

+2
source

You can use the identity matrix.

The state transition matrix is ​​used to predict the future state based on the current state in the absence of any new measurements . In your case, as you say, you have no way to predict the future state (acceleration), so it is best to assume that the future state (acceleration) coincides with the current state. This is exactly what the identity matrix does.

Many Kalman filters exist some way of predicting a future state based on the current state, and that where the transition matrix of a non-identical state will go. For example, suppose your Kalman filter estimates the position and speed of a vehicle based on GPS and a speedometer; then you could predict the future position by changing the position based on speed, even without new dimensions. Dave's answer shows how to do this using the state transition matrix.

+2
source

The thing with the Kalman filter is that it makes a prediction and then adjusts your prediction based on your observation. If your model is not very dynamic, although your model assumes a constant position, but based on your observation, you will get something in between. Identity can work.

-1
source

All Articles