Trajectories and motion profiles
Generate reachable position commands with bounded velocity and acceleration instead of demanding an instantaneous jump.
- Calculate triangular and trapezoidal motion-profile times from distance, speed, and acceleration limits.
- Select motion limits from actuator, mechanism, payload, and task constraints.
Related study — optional context
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.
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
Time to speed limit is t_a = 0.40/0.80 = 0.50 s.
- 2
Distance during each acceleration ramp is v²/(2a) = 0.16/1.6 = 0.10 m; both ramps use 0.20 m.
- 3
Remaining cruise distance is 0.50 - 0.20 = 0.30 m, so cruise time is 0.30/0.40 = 0.75 s.
- 4
Total time is 0.50 + 0.75 + 0.50 = 1.75 s, so the profile is trapezoidal.
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.
Try it yourself
Independent check
Move to the bench
Compare step and ramped commands on a low-energy position axis.
- Low-voltage servo or motorized slide
- Microcontroller
- Current-limited supply
- Position logging
- Small camera-sized dummy mass
Experiment
- Set conservative travel, speed, and output limits and predict peak velocity for a triangular move.
- Run a small position step and a bounded trapezoidal or triangular command over the same distance; log reference and actual position.
- Compare peak following error, settling, and any visible payload vibration.
- 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.
Design a pan trajectory that moves a camera 60° while limiting blur and finishing synchronously with a 20° tilt move.
- Use soft stops, a dummy payload, low voltage, and clear space through the entire swept path.
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.