Page 1 of 1

Integration and speed

PostPosted: Mon Oct 12, 2020 5:23 pm
by qorwkwkd20
Hi,

I use IMU(inertia measurement unit), and it shows vehicle acceleration in x-axis, y-axis and z-axis.
So, what I want to derive from those ax, ay and az is 'speed' in all 3 axis - Vx, Vy, Vz

From mathematics, speed is an integration of acceleration, so I used math in i2 Pro.
However... I am very lack of knowledge of using function - 'integrate ( )'.
After through reading Function help section, but still no idea how to use them.

To derive Vx, Vy and Vz, I used as following;

integrate('Acceleration X Axis' [G],0,range_change("Outings:Laps"))

I put 'ax' data from IMU in the first blank, since it is an object to be integrated,
In the second blank, I can't really figure out which value should be put into, so I just put 0.
Last blank, range_change("outings:laps:) was applied, to reset integrated value every lap.

Is my approach correct?
Can you recommend any better math expression? Every Vx, Vy and Vz?
What is 'condition' and 'reset' terms in integrate function?

Looking forward your reply,
Regards,

Travis

Re: Integration and speed

PostPosted: Tue Oct 13, 2020 7:42 am
by David Ferguson
Good Luck. There is drift and errors in doing this type of integration. The best systems use the inertial data to integrate speed, and correct it with the "relatively slow" GPS data.

A non trivial problem for sure. Good luck!

Re: Integration and speed

PostPosted: Tue Oct 13, 2020 10:22 am
by adrian
The condition in the second part of the equation is simply when you want it to calculate the integral. So if you always want it to calculate just put '1'.

Below is an image showing what David is talking about. "Calculated Speed" is the integral of the G-Long channel, with no resets. The biggest problem with integrals is any noise in the signal (of which there is a lot in a G Sensor trace) creates an offset that continually accumulates.

When compared with wheel speed sensors you can see it is pretty accurate for the first 1/4 of the lap and then after that the error just gets bigger and bigger. Determining when to calculate and when to reset is the most difficult bit.

I would suggest testing your maths on some data where you have a known speed trace to compare against (the sample data provided with i2 will work).

Re: Integration and speed

PostPosted: Wed Oct 14, 2020 12:15 am
by qorwkwkd20
Thanks, both of you.

Also I reviewed my race data to compare GPS speed and integrated Ax, Ay and z, it was a total difference.
Mine could not even match with samples in screenshot!

As pointed out the drift in acceleration signal makes a lot difference.
Should find out better way out....