filter_kalman(9)

filter_kalman9

Unidimensional kalman filter, also known as linear quadratic estimation (lqe)

Usage

loadrt filter_kalman [count=N|names=name1[,name2...]]

Overview

Useful for reducing input signal noise (e.g. from the voltage or temperature sensor).

More information can be found at https://en.wikipedia.org/wiki/Kalman_filter.

Adjusting Qr and Qk covariances:

Default values of Rk and Qk are given for informational purpose only. The nature of the filter requires the parameters to be individually computed.

One of the possible and quite practical method (probably far from being the best) of estimating the Rk covariance is to collect the raw data from the sensor by either asserting the debug pin or using halscope and then compute the covariance using cov() function from Octave package. Ready to use script can be found at https://github.com/dwrobel/TrivialKalmanFilter/blob/master/examples/DS18B20Test/covariance.m.

Adjusting Qk covariance mostly depends on the required response time of the filter. There is a relationship between Qk and response time of the filter that the lower the Qk covariance is the slower the response of the filter is.

Common practice is also to conservatively set Rk and Qk slightly larger then computed ones to get robustness.

Functions

filter-kalman.N (requires a floating-point thread)

Update xk-out based on zk input.

Pins

filter-kalman.N.debug bit in (default: FALSE)

When asserted, prints out measured and estimated values.

filter-kalman.N.passthrough bit in (default: FALSE)

When asserted, copies measured value into estimated value.

filter-kalman.N.reset bit in (default: FALSE)

When asserted, resets filter to its initial state and returns 0 as an estimated value (reset pin has higher priority than passthrough pin).

filter-kalman.N.zk float in

Measured value.

filter-kalman.N.xk-out float out

Estimated value.

Parameters

filter-kalman.N.Rk float rw (default: 1.17549e-38)

Estimation of the noise covariances (process).

filter-kalman.N.Qk float rw (default: 1.17549e-38)

Estimation of the noise covariances (observation).

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Author

Dmian Wrobel <[email protected]>

License

GPL-2.0-or-later

From linuxcnc-uspace 1:2.9.4-2+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's man source.