# Help finding Delta T for a known position displacement with known accel/decel, etc

I'm looking for an equation to find the time it will take for a position displacement to happen, given known $V_{max}$, a (known) constant acceleration, deceleration, jerk, and displacement... and an initial velocity of 0.

I am trying to estimate/calculate the time it will take for a servo motor axis to travel a certain distance. Once I know the estimated time of that move, I can solve for jerk for the other axis. That way, I choose an optimally "slow" speed for whichever axis has a shorter move distance to make the maximum use of my time.

FYI, this is a pick and place XY robot gantry.

• Assuming $\Delta x = (a/2)*t^2 + (j/6)*t^3$, finding t is the same thing that resolving a cubic equation – Trimok Jun 12 '13 at 17:34
• Thanks, I'll start with that and see what I come up with. – Evan Jensen Jun 12 '13 at 19:06
• If you agree with the equation I give above, and if you have problems, I will try to give you a complete answer. – Trimok Jun 12 '13 at 19:20
• Cool. Thanks. So... I am doing a move with parameters: – Evan Jensen Jun 12 '13 at 21:24
• Oops. Repost: I am doing a move with parameters: Vmax = 1000 mm/s, accel = 1000mm/s^2, decel = 1000mm/s^2, Jerk = 1000 mm/s^3, and the Displacement is 2000mm. I have timed this move at around 4.0 seconds, so that should be the answer, but I need to get the equation that results in this for different input variables. (note accel and decel are not necessarily the same). Thanks for looking at it, I am a bit out of my league on the mathematics. – Evan Jensen Jun 12 '13 at 21:30

I give you the result of my calculus without the details:

The result is :

$$\Delta t = \frac{\Delta x}{V_{Max}} + \frac{1}{2}(\frac{V_{Max}}{a} + \frac{a}{j}) + + \frac{1}{2}(\frac{V_{Max}}{d} + \frac{d}{j})$$

where :

$\Delta t$ is the total time.

$\Delta x$ is the total displacement.

$a$ is the maximum acceleration.

$d$ is the maximum decceleration.

$j$ is the jerk.

$V_{max}$ is the maximum speed.

As a test, with your values :

$\Delta x = 2 m, a = 1m/s^2, d = 1m/s^2, j = 1 m/s^3, V_{max} = 1m/s$, I find :

$$\Delta t = \frac{2}{1} + \frac{1}{2}(\frac{1}{1} + \frac{1}{1}) + + \frac{1}{2}(\frac{1}{1} + \frac{1}{1}) = 2 + 1 + 1 = 4$$

which is the correct result.

So I am quite confident in the formula.

[EDIT] The formula to obtain jerk is :

$$j = \frac{a + d}{2 (\Delta t - \large \frac{\Delta x}{\large V_{max}}) - V_{max}(\large \frac{1}{a} + \large\frac{1}{d})}$$

[EDIT 2]

The used model is :

Phase 1 : constant (positive) jerk $j$

Phase 2 : constant acceleration $a$

Phase 3 : constant (negative) jerk ($- j$)

Phase 4 : constant speed $V_{Max}$

Phase 5 : constant (negative) jerk ($- j$)

Phase 6 : constant decceleration ($d$)

Phase 7 : constant (positive) jerk ($j$)

In the formulas above, there are constraints, more precisely the duration of the phases 2, 4, 6 must be positive:

$$\Delta t_2 = \frac{V_{Max}}{a} - \frac{a}{j}\ge 0$$
$$\Delta t_4 = \frac{\Delta x}{V_{Max}} -\frac{1}{2}(\frac{V_{Max}}{a} + \frac{a}{j}) - \frac{1}{2}(\frac{V_{Max}}{d} + \frac{d}{j}) \ge 0$$
$$\Delta t_6 = \frac{V_{Max}}{d} - \frac{d}{j}\ge 0$$

If one of these constraints is not satisfyed, this means that the hypothesis taken for the model are incoherent, so we need another model.

• THANKS! I appreciate the time you spent to help me. I'll move that to the PLC and see how it goes. I still need to figure out solving for j when delta T is known, but I can probably manage that. Keep up the good work. – Evan Jensen Jun 14 '13 at 14:21
• Here is the PLC calc for time as you mentioned above: fMoveTime_s := (fDeltaPos_M / fVMax_M) + (0.5)*( (fVMax_M / fAccel_M) + (fAccel_M / fJerk_M) )+ (0.5)*( (fVMax_M / fDecel_M) + (fDecel_M / fJerk_M) ); – Evan Jensen Jun 14 '13 at 16:25
• NO, your first formula for jerk is not correct. I made an edit in the answer for the correct formula. Your last formula (for time) seems correct. By the way, what is PLC? – Trimok Jun 14 '13 at 16:53
• Yes, you are right. I removed that comment. The correct PLC code for finding Jerk should be: fJerkCalc := (fAccel_M + fDecel_M) / ( ( 2 * (fMoveTime_S - (fDeltaPos_M / fVMax_M))) - (fVMax_M * ((1/fAccel_M)+(1/fDecel_M)) ) ); – Evan Jensen Jun 14 '13 at 17:24
• PLC is a 'programmable logic controller', basically a microcontroller or real time computer for industrial use. I'm using it to coordinate and control a 4 axis pick and place robot. I'm very close to having it right, but something is still off just a bit somewhere.. The formulas seem good though. – Evan Jensen Jun 14 '13 at 17:26