ADXL Accelerometer data to speed

Click For Summary

Discussion Overview

The discussion revolves around calculating the speed of a vehicle using data from an ADXL330 accelerometer, focusing on the challenges and methodologies involved in converting accelerometer readings from three axes into a speed measurement. The context includes both theoretical considerations and practical applications related to vehicle motion.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks guidance on calculating speed from accelerometer data, acknowledging the limitations of this method.
  • Another participant inquires about the type of vehicle involved in the speed calculation.
  • A participant suggests integrating acceleration over time to derive speed, emphasizing the need for regular measurements and mentioning the use of a Kalman filter for noise reduction.
  • There is a question about how to combine accelerations from the three axes into a single acceleration value.
  • One participant proposes using the square root of the sum of the squares of the three axes to find overall acceleration, while also suggesting that only certain axes may be relevant depending on the motion.
  • A participant expresses frustration with their calculations, noting discrepancies in the results that suggest incorrect motion (e.g., indicating the car is reversing when it is stationary).
  • Another participant comments on the normalcy of the observed accelerometer data and reiterates the importance of using advanced filtering techniques like Kalman filters.
  • One participant questions the meaning of a specific calibration factor in their calculations.
  • A new participant introduces a project involving an event data recorder, seeking advice on devices for accurately logging speed and direction using a 3-axis accelerometer.
  • Another participant raises a question about the challenges of using accelerometers on a vessel at sea, noting the complexity of readings in that environment.

Areas of Agreement / Disagreement

The discussion features multiple competing views and approaches regarding the calculation of speed from accelerometer data. There is no consensus on the best method or the interpretation of results, particularly concerning the integration of accelerations and the impact of noise on measurements.

Contextual Notes

Participants mention the need for calibration and filtering techniques, such as Kalman filters, to improve accuracy. There are also references to the challenges posed by noise in the data and the potential for misinterpretation of accelerometer readings.

Who May Find This Useful

This discussion may be useful for individuals interested in vehicle dynamics, data logging projects, and the application of accelerometers in various environments, including land and maritime contexts.

wa5211
Messages
10
Reaction score
0
I am in need of a little guidance.
I am trying to calculate the speed of travel using an ADXL330 accelerometer, with values in the X Y and Z directions. I know this isn't a particularly accurate way of calculating the speed of travel but its this is the only component i have at my disposal

I have been trying different formulas for converting the three output values into a speed in MPH but so far i have been having no look. Is there a generic equation that i am overlooking.

Any guidance would be greatly appreciated
 
Physics news on Phys.org
What type of vehicle are you trying to calculate the speed of?
 
Initially a car traveling in a straight line which accelerates from a motionless position to a set speed, and then decelerates back to 0 again.
 
You need to integrate the acceleration to get speed.
Measure the acceleration regularly in small time increments and multiply by the time

eg if you measure an acceleration of 2m/s^2 at 1ms then after another 1ms you are going = 2 m s^2 * 0.001 s = 0.002m/s faster

In practice you need a more complex scheme (like a Kalman filter) to smooth out noise in the data
 
Last edited:
That sounds good but how do i get from 3 accelerations in the three different axis, to one acceleration?
 
sqrt( x^2 + y^2 + z^2) gives you the overall acceleration

Or you mount the device with one axis (say X) pointing forward and just use that one for the forward speed. If you want accurate speed in corners you will need the x and y, sqrt(x^2 + y^2)
You probably don't want to include up and down bouncing on the road as part of your 'speed' so ignore Z.
 
Thats great, i have been playing around with that equation recently but will have another go tomorrow to see what i can get out of it.
I have sample data that i know acceleratesd to 60MPH so i will see if i can get some data relatively near that value

Thanks for you help so far!
 
I have been toying with this all day.

I have some sample data which i collected on a run in the car. The data is accelerometer values from the 3 axis of acceleration for a car journey in a straight line. The car accelerates from a standing start to 60 MPH and then decellerated back to a standing position. No matter what modifications i do to the calculation, it appears that the results tell me that the car is reversing very quickly at the end of the data i collected when i know for a fact the car was stationary.

If i post my data would anyone be willing to look at it and see if they get the same results i do?

File has been updated to a working version
 

Attachments

Last edited:
The file seems to be corrupted
 
  • #10
File has been updated to a working version. Sorry for the problem
 
  • #11
That looks about normal for accelerometer data.
Because of the noise and the small values you have to do more than just subtract the value from the previous one - take a look at Kalman filters.
 
  • #12
Ok, il have a look at Kalman filters, thanks for your help
 
  • #13
In file: 0-60 Raw Values.xls
I don't know why (Convert to G-Forces) = (Remove initial calibration error)/500?
what is 500?
 
  • #14
Hi..
I've taken up project on Event data recorder as my final yr project. I want to log in the speed as well as the direction of motion of vehicle into a memory card . Firstly i want to calculate the vehicle's speed using a 3-axis accelarometer and micro-controller ( interfaced with RTC )& record those values into memory device along with vehicle's path ( left,right,straight ) Could anyone suggest me the proper devices to be used for this project so that i can get the max accuracy in my calculations ?? Please guide me. I request the ones who have already tried this thing to please give me satisfactory replies.. Hope to hear from you soon
 
  • #15
Hello, any idea how does it work at sea on a vessel? On land, it is relatively easy. But at sea, I found that all 3 axes (x, y and z) show positive and negative accelerations when the vessel is moving and even stationary at terminal.
 

Similar threads

Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
11
Views
24K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
9K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K