Trapezoidal motion-profile generator

Distance in mm, speed limit in mm/s, acceleration and deceleration in mm/s².

Enter decimals or scientific notation, such as 100 or 1e2. Use one position unit for every field; nothing is converted.

The speed–time graph appears here.

Show the steps

Interactive calculation is unavailable until JavaScript loads. The formulas, worked examples and references below remain available.

Generate a trapezoidal motion profile: relate travel distance to speed and acceleration limits, with move time, peak speed and phase times, including triangular moves.

How to use

Choose the position unit your axis uses: mm, m, degrees or revolutions. All fields use it.

Enter the move distance, the speed limit and the acceleration.

Choose Separate value if deceleration differs from acceleration, and enter it.

Read the move time, the profile shape, the peak speed and the phase table.

To see where the axis is during the move, enter a time or drag the time slider. Copy result copies the profile; Reset restores the starting example.

Science

A trapezoidal profile accelerates at a constant rate up to the speed limit, cruises, then decelerates at a constant rate to stop exactly at the target. On a speed–time graph the three phases form a trapezoid, and the area under it is the distance moved.

Reaching the speed limit and stopping again needs v²/(2a) + v²/(2d) of travel. If the move is shorter, the axis never reaches the limit: it accelerates to a lower peak speed and immediately decelerates, giving a triangular profile.

In a triangular move, raising the speed limit changes nothing; only higher acceleration shortens the move. In a long trapezoidal move, the speed limit dominates the time.

Limitations: acceleration jumps instantly between phases (infinite jerk), which excites vibration in real machines; an S-curve profile limits jerk. The profile starts and ends at rest, ignores motor torque, load and following error, and does not check whether the motor can deliver the acceleration.

Formulas

Distance to reach v and stop: D_a + D_d = v²/(2a) + v²/(2d).

Trapezoidal times: t_a = v/a, t_d = v/d, t_c = (D − D_a − D_d)/v, T = t_a + t_c + t_d.

Triangular peak speed: v_p = √(2 D a d/(a + d)); with a = d, v_p = √(D a) and T = 2√(D/a).

Position during the move: Acceleration phase: s = ½ a t². Cruise: s = D_a + v_p (t − t_a). Deceleration: s = D_a + D_c + v_p τ − ½ d τ², with τ = t − t_a − t_c.

Average speed: Average speed = D/T. D is the distance, v the speed limit, a and d the acceleration and deceleration, all in one position unit u.

Examples

D = 100 mm, v = 50 mm/s, a = d = 100 mm/s²: Trapezoidal; T = 2.5 s; phases 0.5 s / 1.5 s / 0.5 s; 12.5 / 75 / 12.5 mm. Reaching 50 mm/s takes 50/100 = 0.5 s and 12.5 mm; stopping takes the same; the remaining 75 mm at 50 mm/s takes 1.5 s.

D = 10 mm, same limits: Triangular; peak 31.6228 mm/s; T = 0.632456 s. Reaching 50 mm/s and stopping needs 25 mm, more than 10 mm, so v_p = √(10 × 100).

D = 100 mm, v = 50 mm/s, a = 100, d = 50 mm/s²: T = 2.75 s; phases 0.5 / 1.25 / 1 s. Slower deceleration needs 25 mm to stop, leaving 62.5 mm of cruise.

Rotary axis: 90 degrees, acceleration 180 degree/s², speed limit 1 rev/s typed as 1: T = 90.0056 s instead of 1.41421 s. With the unit set to degrees, 1 means 1 degree/s. 1 rev/s is 360 degree/s, and at that limit the move is triangular: T = 2√(90/180) = 1.41421 s. Every field must use the same unit; this is a common mistake.

References

OpenStax: motion with constant acceleration

OpenStax: instantaneous velocity and speed

Lynch and Park: Modern Robotics, chapter 9 (trajectory generation)