Wednesday, August 22, 2012

Kalman Filter, finally

After pouring over lots of kalman filter articles and examples, I finally got around to building a 1D kalman filter. After some tweaking, I also coded a low pass filter, and I was stunned to see how close they are in performance. I thought it was my code that was having some issues, but after reading some blogs, it seems that for the kalman filter is really meant for sensor fusion, and requires at least two sensors working in complementary fashions to each other to really utilize the kalman filter.

Also, I read another link about how a 1D kalman filter basically converges its kalman gain into a steady state gain, basically becoming a low pass filter. If I can find the link again, I'll post it up. Here we go.

In light of these "discoveries", I'm going to just play around with the 1d kalman filter abit, see if I can get a bit more out of it. For the breath controller project, I will look into using an analog low pass filter as a antialiasing filter for the ADC. I believe using the analog filter will remove any unwanted frequencies above the nyquist rate I'm sampling at (I'm thinking at least 4x oversampling), and then use a digital low pass filter internally to smooth things out.

Other news, London's weather is really nice now, but it was really very hot over the weekend, a sudden change. Not taking it well, I'm kinda having a feverish spell the last few days, it's one of those feeling ill but not ill enough to take a sick day things. Gah.

No comments: