# Fuse two sources of linear acceleration with a Kalman filter

How would I fuse two different sources of linear acceleration with a Kalman filter (perhaps linear acceleration readings from an IMU and from a dedicated accelerometer)?

My state is defined by distance and velocity; it is very similar to the following post, except for my availability of two sources of linear acceleration:

Using the Kalman filter given acceleration to estimate position and velocity

I'm not sure which acceleration reading I would use for my control vector ($$u_{k}$$) in the predict function.

If the IMU and the 'extra' accelerometer were in perfect alignment (and if their statistics are Gaussian), then the optimal combination of their outputs would be a simple weighted sum: $$\vec {\hat a} = k_1 \vec a_1 + k_2 \vec a_2$$ where (assuming equal scaling), $$k_1 = \frac{\sigma_2^2}{\sigma_1^2 + \sigma_2^2}$$, $$k_2 = 1 - k_1$$, and $$\sigma_1$$ and $$\sigma_2$$ are the noise variance of each accelerometer.
If you look at that first equation, you'll see that if one accelerometer is markedly quieter than the other, then unless it has other problems (misalignment, scaling, initial offset, etc.) your best bet is to just ignore the noisy accelerometer altogether. Even at the point where one accelerometer has three times less variance than the other, the ultimate contribution of the "noisy" accelerometer ends up being $$1/9^{th}$$ of the total -- which is definitely tending into "why bother?" territory.