MTBuilder AcademyLearn it. Test it. Build it.
Feedback & motionLesson 38 of 48
Advanced60 minutes2 project connections

Trajectories and motion profiles

Generate reachable position commands with bounded velocity and acceleration instead of demanding an instantaneous jump.

After this lesson, you can
  • Calculate triangular and trapezoidal motion-profile times from distance, speed, and acceleration limits.
  • Select motion limits from actuator, mechanism, payload, and task constraints.
Print / Save PDF
ReadPracticedBench demonstrated
Related study — optional context
01

Understand

The working idea

A position setpoint that jumps instantly implies unbounded velocity and acceleration. Real printer carriages, camera axes, and toy cars cannot follow it. A trajectory supplies desired position, velocity, and sometimes acceleration over time so the controller receives a physically plausible request. Smooth motion reduces tracking error, current peaks, belt slip, spilled payloads, and blurred images.

For one-dimensional travel D with acceleration magnitude a_max and speed limit v_max, a trapezoidal profile accelerates for t_a = v_max/a_max, cruises, then decelerates symmetrically. Acceleration distance is v_max²/(2a_max) per ramp. If D is less than v_max²/a_max, there is no cruise segment; the profile is triangular with peak speed v_peak = √(Da_max) and total time 2√(D/a_max). Position is the integral of velocity, and velocity is the integral of acceleration, so units provide a powerful check.

Limits should reflect more than motor capability. A long camera arm magnifies base torque; a flexible printer belt rings after sharp acceleration; a rolling robot loses traction if requested force exceeds available friction. Coordinate multiple joints by giving faster axes longer, gentler profiles or scaling them to finish together. The build decision is to cap acceleration for image stability even when the motor could move faster.

A common misconception is that a high-rate controller automatically makes a step command smooth. Sampling a discontinuity more often leaves it discontinuous. Another failure is applying independent joint profiles that collide midway despite safe start and end poses. Check the whole path, joint limits, singularities, and cable routing. Motion planning models commanded behavior; actual velocity and acceleration must be measured or estimated, and saturation means the plant may lag the planned trajectory.

02

Follow the reasoning

Worked example

Move a camera slide D = 0.50 m with v_max = 0.40 m/s and a_max = 0.80 m/s². Determine profile shape and total time.

  1. 1

    Time to speed limit is t_a = 0.40/0.80 = 0.50 s.

  2. 2

    Distance during each acceleration ramp is v²/(2a) = 0.16/1.6 = 0.10 m; both ramps use 0.20 m.

  3. 3

    Remaining cruise distance is 0.50 - 0.20 = 0.30 m, so cruise time is 0.30/0.40 = 0.75 s.

  4. 4

    Total time is 0.50 + 0.75 + 0.50 = 1.75 s, so the profile is trapezoidal.

Result

Command 0.50 s acceleration, 0.75 s cruise, and 0.50 s deceleration for a 1.75 s move.

Sanity checkAverage speed is 0.50/1.75 = 0.286 m/s, below the 0.40 m/s peak as required.

03

Try it yourself

Independent check

A move is too short to reach v_max before it must decelerate. Which profile results under symmetric acceleration limits?
04

Move to the bench

Compare step and ramped commands on a low-energy position axis.

Gather
  • Low-voltage servo or motorized slide
  • Microcontroller
  • Current-limited supply
  • Position logging
  • Small camera-sized dummy mass

Experiment

  1. Set conservative travel, speed, and output limits and predict peak velocity for a triangular move.
  2. Run a small position step and a bounded trapezoidal or triangular command over the same distance; log reference and actual position.
  3. Compare peak following error, settling, and any visible payload vibration.
  4. Deliberate fault: request a profile above the configured speed limit; diagnose command clipping and growing tracking lag from logs rather than raising gains immediately.

Observe

  • Expected: the bounded trajectory lowers abrupt error and mechanical excitation at the cost of planned move time.
  • Measure: actual move time, peak error, saturation, and oscillation; expected smoothness is not evidence of measured acceleration.
Transfer it

Design a pan trajectory that moves a camera 60° while limiting blur and finishing synchronously with a 20° tilt move.

Limits and cautions
  • Use soft stops, a dummy payload, low voltage, and clear space through the entire swept path.
05

Keep evidence

Bench note

Record what you expected, what you actually measured or observed, and one difference worth investigating. This is self-reported evidence, not a certification.

0 / 5,000A bench demonstration needs a concrete note of at least 20 characters.
Terms in this lessonBrowse the advanced glossary

Sources and further reading

  1. Modern Robotics
  2. Control Tutorials for MATLAB and Simulink