## Vertical speed estimation by Kalman filter

Vertical speed estimation can be improved by adding an accelerometer to measure vertical acceleration and using Kalman filter to process the data from multiple sensors.

Using an accelerometer requires tracking the device orientation to compute vertical component from three-dimensional accelerometer unit. This problem can be solved by integration of MEMS gyro sensor data [1].

This example simulates data from an accelerometer and altimeter based on barometric sensor at 20 samples pre second (dt = 0.05). The simulated noise distributions are typical for MEMS sensors at this rate (σh = 0.42 m, σa = 0.075 m/s2).

The state transition matrix describes the following physical model:

$$$h_{n + 1} = h_n + v_n dt + a_n \frac{dt^2}{2}$$$ $$$v_{n + 1} = v_n + a_n dt$$$ $$$a_{n + 1} = a_n$$$ $$$F = \begin{bmatrix} 1 & dt & \frac{dt^2}{2} \\ 0 & 1 & dt \\ 0 & 0 & 1 \\ \end{bmatrix}$$$

The measurement covariance matrix:

$$$R = \begin{bmatrix} \sigma_h^2 & 0 \\ 0 & \sigma_a^2 \\ \end{bmatrix}$$$

In 4 seconds, the Kalman filter gets a good estimation of the climb/descent speed. Linear regression of altitude data shows similar results only with 4-second lag.

Similar idea is used in Instantaneous VSI (IVSI), an aircraft instrument that has a vertical accelerometer and has little or no lag comparing to the typical VSI that uses only static port pressure [2].

The simulation program uses filterpy library by Roger Labbe.

## References

1. Using the Game Rotation Vector Sensor - Android Developers
2. Federal Aviation Administration, 2016 Pilot's Handbook of Aeronautical Knowledge

© Ivan Gorinov, 2016