07 / Motion Profiling
Testing Profiles and Failure Modes
Tune profiled control safely and diagnose overshoot, lag, and saturation.
07 / Motion Profiling
Tune profiled control safely and diagnose overshoot, lag, and saturation.
You will
This lesson is about planning motion before controlling it. A profile turns a sudden target jump into a time-based path of positions, velocities, and accelerations that a controller can follow more gently.
If the requested profile is too aggressive, PID will saturate and the mechanism will lag. Sometimes the right fix is lower max velocity or acceleration, not more proportional gain.
A profiled arm or lift can still hit hard stops if constants or units are wrong. Test small moves first, clamp outputs, and keep a driver-controlled disable path.
Draw the motion first, then code it. Students should label acceleration, cruise, deceleration, total time, and target position before implementing a profiled mechanism. The code should regenerate the profile only when the target changes, then follow the current profile state each loop.
For this specific lesson, students should first restate the goal in robot terms, then identify the value or behavior they expect to observe, then run the smallest test that proves the idea. The lesson should feel like a guided lab: predict, run, observe, explain, and only then extend.
ProfileTelemetry.java · Java
telemetry.addData("profile x", state.x);
telemetry.addData("profile v", state.v);
telemetry.addData("actual", lift.getCurrentPosition());
telemetry.addData("error", state.x - lift.getCurrentPosition());
telemetry.addData("output", output);
telemetry.addData("saturated", Math.abs(output) >= 1.0);Profiled systems fail when the requested motion is physically unrealistic or when the profile is restarted every loop. Saturated output, growing error, overshoot, and late arrival all point to different fixes. The lesson should make students name the failure mode before touching constants.
Check your understanding
If output is saturated for most of the move, what should you consider first?
0 of 1 answered
References
Finished reading?
You'll move on to “VisionPortal Camera Setup” next.