cancel
Showing results for 
Search instead for 
Did you mean: 

finding Speed of moving vehicle with Accelerometer

NMale.1
Associate III

Dear,

I am trying to find speed of a moving vehicle using accelerometer. Is there any acclerometer with you(ST) ? Please Suggest me one. If any body done with this Project, please Share your Experience.

Thank You.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @NMale.1​ ,

I tried to answer to your question on this thread.

-Eleon

View solution in original post

14 REPLIES 14
Eleon BORLINI
ST Employee

Hi @NMale.1​ ,

you can use, at first order, the basic kinematic formula of physics and thus V = V0 + a*t.

where "t" is your sample period (1/ODR), "V0" is your previous velocity (0m/s if yoor vehicle starts from stationary position), "a" is your axis acceleration value. You need to understand that the velocity is the vector sum of each of the x,y,z axes. However the actual velocity may differ due to noise on each of the axis inputs. That's where using just acceleration data as the only input to the system will cause a noticeable error in the velocity after a couple of periods.

So you need to periodically check the acceleration value, low pass filtering the sensor output, maybe averaging in time.

A standard accelerometer such as the recent LIS2DW12 can face this task.

If however you want to be more precise, for example monitoring the current position of a device, an automotive sensor combining accelerometer and gyroscope data can be used, for example the ASM330LHH (or ISM330DHCX). I suggest you to check the X-CUBE-MEMS1 package running on STM32 MCUs for the ST sensors, which has a lot of examples and applications for the position recognition of an object, such as MotionPE library that estimates the real position of a device.

-Eleon

NMale.1
Associate III

Hi Eleon Borlini,

Thank you for your replay.

Above given accelerometers, will they give me -Ve values(2's complement) while in deceleration? and +ve values(2's complement) in Acceleration?. can you Please explain me , How they behave in dynamic motion?. Is offset of accelerometer (after Factory Calibrated) is constant when the accelerometer is in Rest? or it changes with time?. Is anybody tried this project before?

I want above specifications , Please explain clearly .

Thank you in Advance.

Hi @NMale.1​ ,

when you write "Ve", do you mean the velocity calculation or the acceleration module (i.e. sqrt(a_x^2+a_y^2+a_z^2))? I ask you because the "V" indicates sometimes the overall acceleration vector.

In the first case, the velocity / speed is not an output of the acceleration sensors, but should be calculated in post processing, since the integration function is delicate and must take into account of the integrated acceleration noise. For this reason, you have to periodically calibrate the accelerometer (e.g. initial offset cancellation), and trigger the acquisition and the integration on the actual ODR. These algorithms (at least ST ones) are not open, so for this you should contact Sales and representatives from your geographical area.

There is another possibility, that is using quaternions (that estimate the position of the device in the 3D space), that uses accelerometer, gyroscope and magnetometer. You can see the MotionFX user manual for this purpose.

Moreover, in ST portfolio there is a dedicated module that is designed for calculating the vehicle’s position, height, heading and velocity in an automotive environment, i.e. TESEO-DRAW.

-Eleon

NMale.1
Associate III

@Eleon BORLINI​ 

it(Ve) was not Velocity. I am asking for wheather accelerometer gives me negative values or positive values in Deceleration condition

Please answer me.

Hi @NMale.1​ , of course if the acceleration is negative (deceleration), the dataout of the accelerometer will be negative, while velocity will be positive from the above formula calculation V_dec = V_max - a*t.

-Eleon

NMale.1
Associate III

I am asking about the values from Accelerometer sensor through I2C . Have you Tested Practically the values of accelerometer in deceleration and acceleration. If you have the reports of test Please share me.

Please answer

NMale.1
Associate III

Greetings,

In TESEO_DRAW they are using ODOMETER. I want to find the speed without ODOMETER, with only accelerometer or IMU sensors.

Please answer my doubts.

You can simply turn upside down the accelerometer: in one case, you will see the earth (gravity) acceleration with positive sign in one position, and negative in the other position...

0693W0000059aBNQAY.png0693W0000059aBSQAY.png-Eleon

NMale.1
Associate III

Greetings,

I want to calculate speed from acceleration, I have to integrate the acceleration data, means every time i have to add the samples of the axis which was parallel to the ground (not affected by Gravity of earth). It was not actually depends on gravity. the movement of the vehicle suppose assume in X direction , i have to add X axis acceleration values every time after Certain time (let 1 Sec). When it accelerate it should give positive values and when it decelerate(means speed is not Zero, difference in speed is Negative) it should have to give negative values.

I want an accelerometer with that Qualities ; if You have that type of accelerometer Please suggest me one. Please check wheather it giving Negative values in deceleration or not

Please reply me