https://github.com/xylambda/kalmankit
Multidimensional implementation of standard and extended Kalman Filters. Filtering and smoothing.
https://github.com/xylambda/kalmankit
extended-kalman-filter filter kalman kalman-filter kalman-smoother numpy python rts-smoother signal-extraction signal-processing smoother
Last synced: about 10 hours ago
JSON representation
Multidimensional implementation of standard and extended Kalman Filters. Filtering and smoothing.
- Host: GitHub
- URL: https://github.com/xylambda/kalmankit
- Owner: Xylambda
- License: apache-2.0
- Created: 2020-05-17T18:00:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2026-06-05T22:17:47.000Z (25 days ago)
- Last Synced: 2026-06-30T13:00:47.051Z (about 10 hours ago)
- Topics: extended-kalman-filter, filter, kalman, kalman-filter, kalman-smoother, numpy, python, rts-smoother, signal-extraction, signal-processing, smoother
- Language: Python
- Homepage: https://xylambda.github.io/kalmankit/
- Size: 3.21 MB
- Stars: 17
- Watchers: 1
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README




[](https://xylambda.github.io/kalmankit/)
The Kalman filter is an optimal estimation algorithm: it estimates the true
state of a signal given that this signal is noisy and/or incomplete. This
package provides a multidimensional implementation of:
* **Standard Kalman Filter**: if the noises are drawn from a gaussian
distribution and the underlying system is governed by linear equations, the
filter will output the best possible estimate of the signal's true state.
* **Extended Kalman Filter**: can deal with nonlinear systems, but it does not
guarantee the optimal estimate. It works by linearizing the function locally
using the Jacobian matrix.
## Installation
**Normal user**
```bash
pip install kalmankit
```
**Developer**
```bash
git clone https://github.com/Xylambda/kalmankit.git
pip install -e "kalmankit/.[dev]"
```
## Tests
To run tests you must install the library as a `developer`.
```bash
cd kalmankit/
pytest -v tests/
```
## Usage
The library provides 5 examples of usage:
1. [Moving Average](examples/moving_average.py)
2. [Market Beta estimation](examples/market_beta.py)
3. [Pendulum estimation with EKF](examples/pendulum.py)
4. [Standard RTS smoothing for constant-velocity tracking](examples/constant_velocity_smoothing.py)
5. [Extended RTS smoothing for a nonlinear pendulum](examples/pendulum_smoothing.py)
Install the `examples` extra to run the examples:
```bash
pip install -e ".[examples]"
```
## References
* Matlab - [Understanding Kalman Filters](https://www.youtube.com/playlist?list=PLn8PRpmsu08pzi6EMiYnR-076Mh-q3tWr)
* Bilgin's Blog - [Kalman filter for dummies](http://bilgin.esme.org/BitsAndBytes/KalmanFilterforDummies)
* Greg Welch, Gary Bishop - [An Introduction to the Kalman Filter](https://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf)
* Simo Särkkä - Bayesian filtering and Smoothing. Cambridge University Press.
## Cite
If you've used this library for your projects please cite it:
```latex
@misc{alejandro2021kalmankit,
title={kalmankit - Multidimensional implementation of Kalman Filter algorithms},
author={Alejandro Pérez-Sanjuán},
year={2021},
howpublished={\url{https://github.com/Xylambda/kalmankit}},
}
```