Your oppinion on Simple Kalman Filter Implementation


The following is probably more a matter of belief than hard facts - sorry for that. I am currently discussing the following issue in my thesis:

Is the simple Kalman Filter in general a compact solution to the filter problem to be implemented with an 8-bit Microcontroller?

Issues to regarded are Memory consumption (Flash as well as RAM), Performance and Real-Time capabilities.


- Periodic stepwise iterations support real-time implementations.

- Most implementations of Matrix operations have a nearly constant execution time that is independent from input values.

- Matrix operations are easy to implement (at least in C language)


- Floating Point operations are very costly in terms of code size and performance without a hardware Floating Point Unit. Fixed-Point Arithmetik is probable to inexact.

- Matrix operations are time consuming and require large amounts of memory.

I have not yet decided if I should propose the usage of KF for small Microcontroller systems (eg. 8 KB FLash ROM, 1k RAM) or to call the KF time-consuming and elaborate for small MCs.

regards pb

Reply to
Peter Bencsik
Loading thread data ...

check out

formatting link
it might be helpful

Reply to
Jeff Fox

Have to say, It's cool to see Jeff Fox, of FORTH fame, posting here.

Reply to

It depends what you're trying to do with it. You can unwrap the matrix stuff so that the equations are really fast if your KF isn't too complicated (i.e. too many dimensions). Additionally, you can do fixed point math to save time as well.

For example, look at this stuff:

formatting link
Check out tilt.c

Cheers, Ed L

Reply to
Ed LeBouthillier

I don't know about "in general", but in the specific case below which is targeted for a helicopter autopilot, it is. Below is the Kalman filter code for the 'autopilot' project on SourceForge. This is implemented on an Atmel AVR ATmega163 running at only 8 MHz - which is an aging mid-range AVR MCU (16K program memory, 1K of data memory).

formatting link

True. But all CPU cores are not created equal - choose the right processor for the job and be smart about your design and anything is possble. The above implementation uses quite a bit of floating point calculations as you can see from the source code of the filter. They are using the fast RISC based AVR core. And that is even running at only half the clock rate, only 8 MHz vs 16 MHz that nearly all modern AVRs are rated at these days.

So - based at least on the very tangible autopilot project on SourceForge, some 8-bit microcontrollers can adequately handle the processing required by Kalman filters in at least some circumstances.


Reply to
Brian Dean

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.