PDA

View Full Version : Strain your brain. How do you calculate acceleration?


Peter Nachtwey
February 26th, 2006, 01:16 AM
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.

CroCop
February 26th, 2006, 01:39 AM
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.

Peter Nachtwey
February 26th, 2006, 02:44 AM
Surrender monkies use metric.

You can't be serious. I wish we would use metric.

I don't see an equation yet.

PhilipW
February 26th, 2006, 02:50 AM
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.

seppoalanen
February 26th, 2006, 04:53 AM
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 ?

:teacher: Ps. metric is SI-unit, we also used inches on pervious millenium.

BobB
February 26th, 2006, 05:06 AM
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!!!!!

Peter Nachtwey
February 26th, 2006, 07:32 AM
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.

jstolaruk
February 26th, 2006, 08:57 AM
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.

TWControls
February 26th, 2006, 09:08 AM
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?

Rick Densing
February 26th, 2006, 01:32 PM
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.

Peter Nachtwey
February 26th, 2006, 02:33 PM
Total Hijack:

So what else is new?


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?


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.

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?

jstolaruk
February 26th, 2006, 02:51 PM
What is a CMM?


Coordinate Measuring Machine

http://www.brownandsharpe.com/images/cmms/one.jpg

CroCop
February 26th, 2006, 03:42 PM
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.

PhilipW
February 26th, 2006, 04:30 PM
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.

Peter Nachtwey
February 26th, 2006, 04:53 PM
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.

jstolaruk
February 26th, 2006, 05:12 PM
CMM's are typically maintained in controlled environments, temp. and humidity. Smaller units are attached to granite bases that have a very low temperature coefficient and high themal enertia. CMMs should be calibrated at least once a year and their "maps" of actual position in all axises are updated using laser inteferometers or similar instruments to achieve the desired volumetric accuracy. Most are servo controlled with linear scale feedbacks.

Mfgs are Browne & Sharpe, Zeiss, Mitutoyo, etc.. Renishaw is the most popular touch probe brand.

Terry Woods
February 26th, 2006, 05:26 PM
This is for the "kids"... so I'll let it go.

Good to hear someone mentioned the Jerk issue.

"da/dt" can be a son of... some guy from... Oregon, Illinois, Iowa, or maybe Wisconsin, or some such.

So... what do you call... "dj/dt"?

It must have something to do with how quickly a radically changing factor can change more radically yet again.

PhilipW
February 26th, 2006, 05:53 PM
Peter,

Is there some angle here...if you have both a position and aceleration sensors, that the resolution of the position sensor could be considerably relaxed. The dollars not spent on a super high resolution position sensor might go someway towards paying for the acelerometer?

CroCop
February 26th, 2006, 06:40 PM
This is for the "kids"... so I'll let it go.

Good to hear someone mentioned the Jerk issue.

"da/dt" can be a son of... some guy from... Oregon, Illinois, Iowa, or maybe Wisconsin, or some such.

So... what do you call... "dj/dt"?

It must have something to do with how quickly a radically changing factor can change more radically yet again.

There is no universally accepted name for the fourth derivative, i.e. the rate of change of jerk, The term jounce has been used but it has the drawback of using the same initial letter as jerk so it is not clear which symbol to use. Another less serious suggestion is snap (symbol s), crackle (symbol c) and pop (symbol p) for the 4th, 5th and 6th derivatives respectively. Higher derivatives do not yet have names because they do not come up very often.

http://math.ucr.edu/home/baez/physics/General/jerk.html

Peter Nachtwey
February 26th, 2006, 06:57 PM
Is there some angle here...if you have both a position and aceleration sensors, that the resolution of the position sensor could be considerably relaxed. The dollars not spent on a super high resolution position sensor might go someway towards paying for the acelerometer?

You are right about not needing the super high resolution feedback unless it is needed for final static position control when an accelerometer is available. However, in many cases the higher resolution doesn't cost that much more if any more. I see the main issue is that a simple PID can't be used.

One should expect to pay more for the feedback devices for high performance systems where calculating the acceleration and jerk are necessary.

Snap, crackle and pop. Sounds ok but the s in snap would be confused with the s in laplace transforms.

Rick Densing
February 27th, 2006, 10:32 AM
No one seems to care so I will end this here.


Peter,
Your window for answering was from 12:16am till 1pm CST on a Sunday.

I was actually thinking about your question as I lay in bed last night. Don't give up so soon.

Rick Densing
February 27th, 2006, 10:38 AM
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?

To expand, some CMM's measure to the millionths of an inch. We sometimes have to hold tolerances in the ten-thounsandths of an inch, so at min they need to be an order of magnitude better.

The probe that actually touches the part us usually an industrial gem or other stable crystal.