Model-based trajectory planning for flexible-link mechanisms with bounded jerk