I am trying to develop motion detection application for Android. App should be able to track motion of phone in space and map it to motion on computer screen. I am using 3-axis accelerometer and since data is very noisy I am using Kalman filter.
Internal state is 6 component vector [speed-x, speed-y, speed-z, accel-x, accel-y, accel-z] and measured state is 3 component vector [accel-x, accel-y, accel-z].
Filter works very well on measured values, but speed is still very noisy.
Now I am wondering if this is normal behavior or am I doing something wrong, since my understanding of Kalman filter is very basic. I am using JKalman library and following state-transition matrix (dt is 1/15 which is approximate sensor refresh rate)
double[][] A = { { 1, 0, 0, dt, 0, 0 }, { 0, 1, 0, 0, dt, 0 }, { 0, 0, 1, 0, 0, dt }, { 0, 0, 0, 1, 0, 0 }, { 0, 0, 0, 0, 1, 0 }, { 0, 0, 0, 0, 0, 1 } };
I have also set up my own covariance matrices with covariances calculated from test data. This improved acceleration signal a bit, but had no effect on speed.
Currently I am able to achieve stdvar
[0,0632041857 0,0607274545 0,0886326602] for speed [x, y, z]
[0,0041689678 0,004423822 0,0074808552] for acceleration [x, y, z].
I am quite happy with acceleration signal and I guess i cannot improve it much more, but I would love to improve quality of speed signal.