Page 1 of 2

Video: My IMU sensor in action

Posted: 23 Mar 2011, 17:56
by aswin0
Hi,

Here is a nice HD (!) video of my home made IMU (gyro+accelerometer) sensor. I recently finished the software part. The sensor uses a nonlinear complementary filter to get a low noise and drift free output signal. It is accurate enough to detect whether the NXT is exactly horizontal or resting on a single grain of sugar. (That's why I needed a HD webcam, to be able to film this grain of sugar.)



Re: Video: My IMU sensor in action

Posted: 23 Mar 2011, 19:03
by mightor
Wow, pretty impressive!

- Xander

Re: Video: My IMU sensor in action

Posted: 23 Mar 2011, 19:13
by HaWe
very sophisticated! :)
what is your complementary filter like?

Re: Video: My IMU sensor in action

Posted: 23 Mar 2011, 20:52
by gloomyandy
Hi,
Very impressive. Just read your blog and printing the article right now... One question though you mention that you get to read the sensor once every 15msec with high speed i2c but every 24Seconds with normal speed are these figures really correct? Is the fast mode really 1600 time faster?

Andy

Re: Video: My IMU sensor in action

Posted: 23 Mar 2011, 20:59
by aswin0
Here is a link to a paper describing the filter (and the basics of matrix math).
The filter is based on the idea that in the long term the sensor will have zero acceleration. So, in the long term the accelerometer can be used as a tilt sensor. In the short term this isn't true, but in the short term integrated output from the gyro gives the tilt. The tilt data from the accelerometer can be used to correct the tilt calculated from the gyro, it can also be used to correct the drift of the gyro sensor.

I used robotC and made my own library of matrix functions to implement the filter. I got a stable output rate of 40 Herz. That is one reading every 25 Msec. (Thanks for pointing that out, Andy)

Re: Video: My IMU sensor in action

Posted: 23 Mar 2011, 21:03
by HaWe
Here is a link to a paper describing the filter (and the basics of matrix math).
oh my God, don't you have it decribed a little easier?

Re: Video: My IMU sensor in action

Posted: 23 Mar 2011, 22:21
by aswin0
How about this:
Der Filter basiert auf der Idee, dass auf lange Sicht wird der Sensor-Beschleunigung sein soll. Also, auf lange Sicht den Beschleunigungssensor kann als Neigungssensor eingesetzt werden. Auf kurze Sicht ist dies nicht wahr, aber kurzfristig integriert Ausgabe des Kreisels gibt die Neigung. Die Neigung von Daten aus dem Beschleunigungsmesser eingesetzt werden kann, um die Neigung der Kreisel korrekt berechnet werden, kann es auch verwendet, um die Drift des Kreisel-Sensors zu korrigieren.
The idea behind the is very simple, just a PI feedback loop. The math isn't simple. You just have to reread the article until you understand it. You'll have to do this yourself. You're on your own now.

And, as you like Science Fiction quotes so much, the Universe is actually made of math!

Re: Video: My IMU sensor in action

Posted: 25 Mar 2011, 00:08
by HaWe
The filter is based on the idea that in the long run, the acceleration sensor should be. So, in the long run the acceleration sensor can be used as a tilt sensor. In the short term, this is not true, but integrated in the short term issue is the tendency of the gyro. The slope of data can be used from the accelerometer to the inclination of the gyro are calculated correctly, it can also be used to correct the drift of the gyro-sensor.
(?)
...
I had the faint hope you would delight us with your code ;)

Re: Video: My IMU sensor in action

Posted: 25 Mar 2011, 00:21
by aswin0
Oh, you should have asked. I'll post it this weekend when I'm at my computer.

Re: Video: My IMU sensor in action

Posted: 25 Mar 2011, 08:15
by HaWe
thank you! Maybe I'm lucky and can learn something from it for my own filter problems!