Implement Kalman filter for your Arduino projects
-
Github project's page: https://github.com/rfetick/Kalman
-
Tested successfully on Arduino Uno and Nano (ATmega 328P old bootloader)
-
Any suggestion or issue? Please first check the issue section below and then write to https://github.com/rfetick/Kalman/issues
Other Kalman libraries already exist for Arduino, but so far I have only seen filters applied to independent scalars. The matricial implementation of this project allows to use the full power of the Kalman filter to coupled variables. It allows to merge measurements from multiple sensors such as accelerometers, GPS, ultrasound (distance) or pressure (altitude) sensors...
This library is adapted to your most sophisticated projects. In order to use it you need some knowledge about matrix formalism and be able to write (or find on internet) the actual state equations of your system.
BasicLinearAlgebra
: You might find it in the library manager of your Arduino IDE, or directly download it at https://github.com/tomstewart89/BasicLinearAlgebra
Warning
It seems that the Kalman library is not compatible with the version 4
of BasicLinearAlgebra
. You might need to install version 3.XX
. See issue#8 and issue#9.
This library is available in the official Arduino library manager. Just type Kalman
and you should find it.
Other possibility is to download (or clone) this project from GITHUB and add it to your Arduino/libraries/
folder.
See the GETTING_STARTED file.
See also the examples\
folder.
-
The library
BLA::Matrix
seems to throw errors for matrices of size<1,1>
. So the Kalman library will only work forNstate>1
andNobs>1
. For one-dimensional Kalman filters, please refer to other Arduino libraries. -
In case of issues with matrices computation please make sure to use the latest version of
BasicLinearAlgebra
. It works fine on my side withBasicLinearAlgebra
version3.2
, however compatibilities issues may occur with different versions. -
Compilation issues with ESP32. Please see issue#10
-
Size of matrices has to be relatively small due to the limited SRAM memory of Arduino. Effort has been made to reduce SRAM usage.
-
An issue has been reported with Arduino Nano IoT 33: the program compiles but is not correctly loaded to Arduino Nano IoT 33. I might investigate this in the future.