Strain your brain. How do you calculate acceleration?

Join Date
Apr 2002
Location
No income tax, no capital gains tax. Freedom!
Posts
8,389
If you have an encoder and you want to calculate acceleration, how do you do it? What resolution do you need? What kind of sample interval do you need? If my sample interval is 1 millisecond and the resolution is .001 inch, what is the best resolution you can get?

Yes, this is another question that should make you think.
 
1. Scale the encoder counts to standard inches. Real men use standard. Surrender monkies use metric.
2. dp/dt, dv/dt = a, so I would calculate the change in position over a millisecond. Age this data, and then calculate the change in velocity over the next millisecond.
3. No clue on sample rate and resolution. I'm betting braking the millisecond barrier helps immensely, and I'd say the resolution is driven by accuracy desired in the system.
4. .001 is the smallest change in position you can see, so the most accurate you can get in accel is .001 per m/sec^2 or 1 inch/sec^2.

edited to put the sec^2 on.
 
Last edited:
Well the worst case is if the encoder only changes 1 counts per millisecond.

Therefore the distance resolution is 0.001"
The distance resolution will be 0.001"/0.001 sec = 1"/sec
And the acceleration resolution will be 0.001"/(0.001^2)sec = 1000"/sec^2

As the velocity increases there will be more counts/sample and the resolution will increase.
 
What is the encoder slip in 1 ms, how hasty it must be ?

You can get fe. 10 last sample-fifo. You are delayed 10 ms but average-slip is 1/10 ?

👨🏻‍🏫 Ps. metric is SI-unit, we also used inches on pervious millenium.
 
1. Scale the encoder counts to standard inches. Real men use standard. Surrender monkies use metric.
Ain't it typical. One country is different from the rest of the world. Peter is right on - much easier to work in increments of 10!!!!!
 
PhilipW is correct. Now, for a follow up question. Is this resolution useful? How many inches per second per second is 1 G?

What about the general equation for calculating accleration.

I was just in Australia were I had to shift gears and use metric and think metric. I was teaching a class on motion control. It was difficult to keep switching to metric. BTW, I normally deal in inches or thousandths of inchs. In a way we have metrified the old english system. If I were president I would make using the metric system a presidential order.

BobB, there are some companies in the US that are metric.

Crocop, the people in the metric plants seem to adapt easily.
3. No clue on sample rate and resolution. I'm betting braking the millisecond barrier helps immensely, and I'd say the resolution is driven by accuracy desired in the system.
Breaking the millisecond barrier makes the problem worse. Why?

4. .001 is the smallest change in position you can see, so the most accurate you can get in accel is .001 per m/sec^2 or 1 inch/sec^2.

edited to put the sec^2 on.
no.

Seppo, you don't need a 10 sample fifo.
 
Heck, even the US automotive companies switched to metric 20+ years ago. If you work with both systems everyday, it doesn't take long to do a approx. conversion in your head and a calculator for the final. 25.4mm to the inch. I'll talk in terms of the metric system till I have to switch to inches for the listener.

I have to admit I'm not as quick with torque though, N-M to Ft-Lbs, as I don't use it every day.
 
Our plant is stricly Feet and Inches but I even to my motion calculations in metric and only convert the numbers that are displayed to inches.

Metric is much easier to work with. US is way out of date of this one. Weren't they suppose to convert back in the 1960s?
 
Total Hijack:

We recently did a machine that programmed in millimeters. The CMM they used to check the part gave results in millimeters.

The quality guy kept giving me data in thousandths of an inch and I had to convert to millimeters to make changes to the program. About halfway through, we each finally realized what the other guy was doing.
 
There should be only one. back to acceleration

Rick Densing said:
Total Hijack:
So what else is new?

Rick Densing said:
We recently did a machine that programmed in millimeters. The CMM they used to check the part gave results in millimeters.
What is a CMM?

Rick Densing said:
The quality guy kept giving me data in thousandths of an inch and I had to convert to millimeters to make changes to the program. About halfway through, we each finally realized what the other guy was doing.
That is a small problem compared to crashing mars probes.
This is why there should be only one measuring system.

No one seems to care so I will end this here.
Code:
Acceleration[n] = (position[n]-2*position[n-1]+position[n-2])/(T^2)
 
where T is the sample interval.
 
If position[n] = 1 micron
   position[n-1] = 0
   position[n-2] = 0 
   T = .001 second then
acceleration = 1 meter/second^2
Even with 1 micron resolution one can only achieve 1 m/s^2 which is about .1 G which isn't very good for motion control. One can get finer resolution by increasing the time between samples T but this introduces delays. In motion control the motion can be done is less time than 1 second. The point is that high resolution feedback is required to calculate acceleration or velocity accurately.

Now for the parting questions to make you think. Why bother? Why would one need to calculate acceleration? Why not use an accelerometer?
 
Peter Nachtwey said:
What is a CMM?

Coordinate Measuring Machine

one.jpg
 
Peter,

I would want to be able to calculate Acceleration, and clamp the value, so that as F = M*A, limit the accel, and limit the force on the system.

Using an accelerametor will be too late, the system will have already experienced the accleration & associated force when you're reading it.
 
Peter,

Now for the parting questions to make you think. Why bother? Why would one need to calculate acceleration? Why not use an accelerometer?

Well what you are also trying to control is "jerk" or the rate of change of the aceleration in order to minimise the peak force applied to the system.

Torque = Inertia * Acceleration

Rate of Change of Torque = Inertia * (Rate of Change of Acceleration)

Actually I struggle with this a bit, because "Rate of Change of Torque" seems a bit meaningless to me. Given that Torque is produced by Current in a servo motor, or servo valve position in a hydraulic system, if both of these can be manipulated at an infinite rate, then "Jerk" would have no practical consequence.

However in all real systems the servo motor torque or hydraulic valve bandwidth (ability to respond to a change in command) is limited. Therefore if the system commands the actuator to generate torque faster than it can produce it, then a transient error is created.

To correct this error the loop then tries to compensate by commanding MORE torque...so you can see that very quickly the torque producing loop can saturate at 100% output for a very brief period until the position loop catches up. It is the limited bandwidth of the torque producing loop that causes this effect.

Therefore if you are trying to control the Rate of Change of Acceleration, ie Jerk, you need to calculate it. As the original example suggests if:

Therefore the distance resolution is 0.001"
The velocity resolution will be 0.001"/0.001 sec = 1"/sec
And the acceleration resolution will be 0.001"/(0.001^2)sec = 1000"/sec^2

Then:

Jerk resolution will be 0.001"/(0.001^3) = 1,000,000"/sec^3

Which is very poor indeed. Will an accelerometer help? My instinct is to say yes. After all we could control the entire system with just an accelerometer, by integrating it to get velocity and again to get position, but then we introduce another kind of error...absolute position is impossible to measure directly, ie we cannot find the integration constants.

Without the benefit of much math, I am guessing that combining both an position and aceleration measuring sensors into the system, it should be possible to get a result that gives the best from both, while nullifying the weaknesses of each. I suppose what I am saying is that:

Differentiating creates noise errors. (or resolution errors).
Integrating creates drift errors (or absolute errors).

If I can measure BOTH position and aceleration then:

Differentiating position gives me velocity, and integrating aceleration also gives me velocity, so I can correlate the two sensors for validity if nothing else.

Differentiating acceleration gives me jerk, and given that I have only had to differentiate once (not three times as I would have if I derived jerk from position) then in principle I may be much better off.

Where all this MAY come unstuck is that I am not very familiar with accelerometers and I am not sure of their inherent behaviour in terms of bandwidth and resolutiuon.
 
Last edited:
Wow

jstolaruk, that is some machine if it can measure accurately. I wonder how they compensate for the thermal expansion and all the slop in the joints?

I would want to be able to calculate Acceleration, and clamp the value, so that as F = M*A, limit the accel, and limit the force on the system.

What kind of application requires that? Why not set the acceleration rate to a lower value?

Using an accelerametor will be too late, the system will have already experienced the accleration & associated force when you're reading it.
I don't understand this statement. Accelerometers output a analog signal that responds very quickly to the actual acceleration. This signal can be differentiated to provide the rate of change in acceleration or jerk. Nowing the jerk allows one to anticipate the change in acceleration or force. We do this to provide active damping on pneumatic and hydraulic applicatons although we normally just use pressure sensors on either side of the piston and measure the force directly.

Philipw, you have brought up the points that I was going to get to. I too think that there needs to be some way to measure the acceleration other than using the encoder and the accelerometer provide the means to do it. If I have a 16 AtoD converter meausing the output of a +/- 3G acclerometer then I can measure to better than .0001G! (65000 counts divide by 6 G range).
You can see that is quite an improvement. The problem is where do you mount the accelerometer and are people willing to buy an accelerometer for higher perfomance? Motor systems have fancy models that allow them to 'observe' the acceleration and jerk but the model has to be right.
 
Last edited:

Similar Topics

In the thead about the volume of a cone I showed a formula Pos(t) = a + b*t + c*pow(t,2) + d*pow(t,3)+e*pow(t,4) + f*pow(t,5) that I said was...
Replies
3
Views
2,544
Customer does not want any silo penetrations. Hates level sensors on top of silos. No capacitance sensors either. Would be great if it had...
Replies
6
Views
1,508
Hello, I'm currently working on a project where I need to read values off my 0-3kg Strain Gauge and display them on my HMI display. I've...
Replies
9
Views
1,833
Hey all, Another weird one. Long story short, I need to find a way to strain relief a phoenix/euroblock connector that will be getting a lot of...
Replies
2
Views
1,092
This is 99% a structural design flaw, but most people here have the capacity to manage this. First, some R&D background. I have a strain gauge...
Replies
5
Views
1,480
Back
Top Bottom