Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

calculate speed using accelerometer

Status
Not open for further replies.

s13v3n

Junior Member level 1
Junior Member level 1
Joined
Jul 24, 2007
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
accelerometer speed

i using a adxl202 accelerometer and i want to calculate speed using the accerelation calculate from the accelerometer.anyone know how to do so?
 

accelerometer math

Simply speed is acceleration time integral. That means, a speed measurement could only work for short time intervalls. As an example, an acceleration measurement error of 0.1 g sums up to 60 m/s speed error within a minute.
 

speed from accelerometer

You can of course, but the math will be super complex. (well not really that complex, it became complex just because microcontroller only recognize arithmetic).

Case:
--> 10 kph for 10s =...? Yes, 0G!
--> 1G for 10s =...? Yes, 98m/s! Good!
--> 1G for 1s, 1.2G for 0.8s, -0.8G for 1s, etc=...? Uuuuuuuummm??? Gee don't know!! Anyway that's the correct answer.
 

accelerometer to measure speed

u mean not possible to calculate the speed or not complex in calulating the speed?
 

speed accelerometer

I meant not complex. I thought, the calculation would be obvious from general physical knowledge. The said integration is approximated by addition. Have a fixed measurement interval of e. g. 10 ms and new acceleration measurement for each interval. After correcting the offset, simply add measurements in an accumulator, that's your speed measurement.

As already mentioned, there will be considerable drift problem.
 

using accelerometer to determine speed

Yeah the math is not so complex for us, but you should consider cleaning up noises...e.g on a bumpy road, accelerometer tends to make fail calculation. You can compensate this thou, but like I said, the math will be complicated.

Complicated math that I mean is the real world math, not just v=a*t
Easily you can compensate using Newton's law:
F=M*x"+B*x'+K*x
There you got the bumpy road compensation using the shock absorber constant... Oh no.., I forgot, you should compensate down hill up hill, hard breaking, dragging (momentum force), slope, and the tilt of where you put your acceleration sensor.

So what is the equation for those? Use triple axis accelerometer and find a good book about measurement and instrumentation.
 

measure speed with accelerometer

I think, your considerations aren't applicable for cars. Did you understand the meaning of acceleration measurement error for this application, as I calculated it in the example? If you know a sensor, that has factor 100 or 1000 better accuracy than said ADXL202, we can continue the discussion.
 

accelerometer calculate speed

Yes, your calc is absolutely correct. I'm just adding some more base on experience. I've built one, but never use it to measure speed. But it is still applicable to measure horse power, tilt angle, and G-Force. Anyway, conventional car's G-force was only around 1.5G max.
If you want to measure speed, use speedometer, much easier to apply.
 

accelerometer calculations

Yes, I aggree. Of course, it would be very interesting to measure speed based only on inertial sensors, but it's effectively impossible by today's state of the art.
 

hi
I really need help. I want to calculate speed from a tri axial acclerometer.
I tried calculating the speed from data which i mentioned below
Calculation of velocity from discrete acceleration data:

Integral of acceleration will give velocity value. Since data given for acceleration is discrete so we have calculated velocity value at x direction (Vx) through integrating under discrete acceleration data at x direction by using matlab programme. Similarly Vy and Vz was calculated. Total velocity value will be sqrt(Vx*Vx + Vy*Vy + Vz*Vz)

but the speed which i am getting through this method is 30m/s for one subject which is impossible.
I didnot process the data before calculation (which could be the reason behind inaccuracy).
Please. somebody help me in processing my data and correcting the method of calculating the speed.
I am using tri axial acceleromter (glink), and i attached it on sacrum during run. The subject ran on 400m track which is not bumpy . distance was 50m on plane surface.
Please some body help
 

Seems like you wanted to emphasize my previous statement by an experiment?

I see two points:
- Genereal uncertainty of acceleration measurement. Did you estimate expectable error limits for your experiment?

- Gravitation and sensor inclination. Ideally, you would compensate the z acceleration measurement for g. But you can't expect an exactly upright sensor position, it has actually a varying inclination angle. How do you deal with this problem in your calculation?
 

hey thanks a tonn for your reply.
To tell you the fact. Its embarassing but I am not really good in mathematics, data processing and physics.
I am physical education and sports science students. So I dont know how to estimate the error limit for this data.
I am so sorry if i sound a bit dumb.
It would b a great help if you could tell me steps which i should do..
I am using accelerometer for the first time in my life and i hv never dealt with these kind of calculation.
in conclusion, i am totally in a mess.
please help!!
I can also send a set of data to you
please reply.
 

As a starting point, you should know the accuracy of the accelerometer and the maximum inclinitation angle that can be expected during the experiment.

To understand the basic problem with inclination, you should consider, how you can distinguish between a horizontal acceleration and a small inclination, that produces a g*sin(phi) apparent acceleration? In my opinion, you can't at all.
 

soooorrrrryyyyy i do not know
 

How about this for a consideration.
If you consider temporary inclinations, could you not assume that any and resulting error due to change in attitude would be canceled by a return to the original attitude. For example, when a car accelerates, it tends to tilt back, which would incorrectly imply a greater motion acceleration. As it levels off, this would incorrectly imply less acceleration, so the results would tend to cancel.
Second:
I see a solution by taking a baseline reading of the vectors before a test run. In the basic case, set the Z in a position to read Z=1, and X=Y=0. Tilt can be compensated by adding or subtracting gravity component vectors from X based on a change in Z which you'd know is due to tilt.
I think this can also be done with any sensor position as long as a baseline data set is taken for all values. There will always be a gravity value of 1 with known baseline component vectors, which can be subtracted to get G. To eliminate tilt, you'd have to create a baseline plane, and any resulting Z' component of the calculated vector would be due to tilt. This would require more calculations. I was just looking at this by doing some graphical vector analysis, so I'm not 100% sure at this point.
Of course as was said before, the drift factors due to errors would be amplified greater with added calculations and transformations due to fixed data precision and error %.
I'm thinking of creating a device to measure 0-60 times in a car as well as HP values based on accelerometers alone, but first need to model this in software, and get the math right.
 

Tilt can be compensated by adding or subtracting gravity component vectors from X based on a change in Z which you'd know is due to tilt.
It's not feasible, I fear. Consider a 1° inclination towards x. It results in Δz = -150 µg
and Δx = +17.5 mg. The Δx produces an integrated error of about 10 m/s after a minute, but the Δz value is more or less undetectable and thus can't be used to compensate the x measurement.
 

Yes, I can see that is correct. If the sensor is tilted during a run, the accuracy would be off. This brings me back to the first point I made and some limiting factors and assumptions to be made to make this method useful.

1. Assume and ensure the device is fixed at the beginning of the run and remains fixed.
2. Assume a dynamic inclination will reset itself. I'm thinking those errors will cancel like I mentioned earlier.
3. If you don't want to have to positionally zero X and Y, provide a reset feature, which will take a baseline reading of X and/or Y, and this can be factored into every calculation as a fixed inclination error.
4. Intended for cars and runs under a minute. This implies any changes in attitude will return to the normal starting attitude. Also assuming we're starting and ending in the same attitude, and not starting level and ending on a hill.

I also don't see how the errors would accumulate. A fixed 1% error for example would accumulate by addition only, since each sampling calculates velocity change and would end up giving a resulting velocity error also of 1%

Any thoughts?
 

My considerations have been related to the discussed runners experiment.

Obviously, the acceleration measurement would be zeroed at the beginning. But you can't assume the sensor keeping it's upright position respectively initial inclination exactly, you have to consider at least several degrees variation. Also, there's no reason to assume, that the inclination will reset or have any predictable development during the experiment.

In this case, you clearly get an velocity error increasing in time.
 

Hello folk,
I calculated the speed from acclerometer but when i shift the starting point of run by even .1sec, the speed changes like anyting.
do i have to deal with offset? tilting angles?

I am doing 50m run on flat surface (400m).
Please let me that how can i fix the starting point and what are the steps i have to follow for the calculation.
please help
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top