## Interpreting the speed from the acceleration (Wii remote)

Sep 24, 2007 at 9:25am

# Interpreting the speed from the acceleration (Wii remote)

Hello,

I am using a Wii Remote from Nintendo as 3D accelerometer. Thanks to the great aka.wiiremote external, it’s possible to capture all Wimote signals and one can calibrate the acceleration quite accurately, using a simple transformation that makes the acceleration range between -1.0 and 1.0 (0 corresponds to no acceleration, for example when there is no movement) instead of 0-255.

Then, I am interested in getting the speed (velocity) of the movement.

As acceleration is the derivative of speed, one solution is interpreting the speed as the integral of acceleration. If we call A the acceleration and V the speed, at a given time Tk we have V(Tk) = A(T=0) + A(T=e) + A(T=2e) + … + A(T=Tk) — where e repeasents the interval between the measures.
For some reason, this solution doesn’t seem to work : for example, when taking the Wimote, moving it a bit and then laying it again on the table, the speed should be zero at the end and it’s clearly not the case. I tried different time resolutions (the e factor above), but this doesn’t help.

Maybe this method only works if you have a very accurate and high time resolution measure of the acceleration … Any idea ?

Best,
-j

#33781
Sep 24, 2007 at 11:33am

Is it necessary to remove the effect of gravity when using the Wimote ? G-vector points to Earth center or close to, and its norma is 9.81 m.s^(-2). It can be measured by some accelometers, which adds a perturbation to any local acceleration measure …

I don’t know if there is already a compensator inside the Wii, or if I have to do it myself. Also, I don’t know how to compensate this gravity problem, especially because I don’t know how much should the vertical axis offset be to significate constant -9.81 m.s^(-2) for the Wimote.

Has anybody calculated speed from a measure of acceleration here ?

#113030
Sep 24, 2007 at 2:37pm

Yeah, but due to Newton’s third law, when it’s on the table, the table exerts an equal but opposite force upwards cancelling gravity. The only time gravity acts is when you let it drop – in wiich case it is accelerating. So you don’t have to worry about gravity here…

#113031
Sep 24, 2007 at 4:39pm

#113032
Sep 25, 2007 at 2:56am

hi

you ned to subtract the planet to your calculaions.

1. the wii remote on the table points “1 g” in Z axis.

so

you need to build a patch capable of detect (calculate) where the planet is (to wii remote).

with this,

you know where to subtract the planets force, and then you can apply the acceleration formula

I think!

#113033
Sep 25, 2007 at 3:04am

in other words

you need a virtual gyroscope

#113034
Sep 25, 2007 at 8:41am

Actually, probably because of accelerometer technology, when you tilt the Wimote around the X or Y axis it outputs a small acceleration that corresponds more or less to the tilt angle. This is useful as a continuous controller.

Alternatively, it’s easy to detect a violent movement (and its direction), which can be used as a trigger (if you want to see it live, try to find some Wii Sports demonstration on Youtube).

I don’t think I will ever integrate the acceleration for getting the speed ; it looks like requiring a more accurate sensor.

#113035
Sep 26, 2007 at 9:03pm

Actually, this is not correct. If you look at the help patch for
aka.wiiremote, you can see that the blue line (y axis) has a positive
offset relative to the x & z — that is due to effect of gravity. In
fact the reason it works as a tilt sensor at all is also because of
gravity. Think about it: how could you get an acceleration value
from an unmoving object unless gravity was exerting force on it?
(The way to eliminate the effect of gravity, by the way, is by
dropping it — in freefall, there is zero acceleration, though I
wouldn’t recommend it.)

Not that knowing any of that has helped me figure how to do the
derivation needed to get velocity from it either…..

M

On Sep 24, 2007, at 10:37, Andrew Robertson wrote:

>
>
> Yeah, but due to Newton’s third law, when it’s on the table, the
> table exerts an equal but opposite force upwards cancelling
> gravity. The only time gravity acts is when you let it drop – in
> wiich case it is accelerating. So you don’t have to worry about
> gravity here…

#113036
Mar 21, 2009 at 2:26pm

you’re right – I’m shocked to read my own post here.

Basically, there is acceleration in your hand to counter the effect of gravity and so as you twist the Wii, the accleration is changing. Therefore the only way to really combat is to get a megnetometer to tell you the direction of the earth’s field. There is a crude one on the Wii telling you which way it is facing.

Integration of the accleration results in pretty bad drift. Has anyone managed to get around that?

#113037

You must be logged in to reply to this topic.