File Exchange

image thumbnail

Advanced Setpoints for Motion Systems

version (2.35 MB) by Paul Lambrechts
Create and simulate up to fourth order trajectories for motion systems doing point-to-point moves.


Updated 01 Sep 2016

View License

Motion systems are widely used in industry; for instance for robotics and pick-and place units. In most cases they are characterized by a repetitive motion or sequence of motions between fixed positions. The actuator, or motor, is limited in speed and acceleration such that any decent motion control system should also generate an acceptable trajectory from one point to the other. This is done by generating ‘profiles’ for speed and acceleration. In practice, motion systems are not rigidly connected to the load they are manipulating, resulting in dynamical behaviour. Motion control systems deal with this by applying appropriate feedback control, and also by generating a ‘smooth’ trajectory. Feedforward control, based on the known trajectory also contributes greatly to achieving high performance positioning.
The zip file contains MATLAB functions for calculating smooth trajectories. It also contains the Simulink library ‘motion’ with several examples, including an implementation suitable for real-time application (rapid prototyping). Extensive documentation, based on a course in motion control lectured at Eindhoven University of Technology in The Netherlands, explains the use of second order up to fourth order trajectories for point-to-point motion, how to calculate them, and how to use them for effective feedforward control. Some exercises are also included.
The functions and library are developed in Release 12; they also work in all later releases.

Comments and Ratings (9)

Thank you very much.

Rui Yang

thank you very much.

edris farah

good job, thank you very much



Hi Paul,

What is the best way to extend the model to cover non stationary initial/final positions?


Rob Janssen


Good tool and explanation to go with it. On Paul's advice I used Simulink's Embedded Matlab functions to experiment with setpoint generation (see also:

kuppam murali



Updated license

Small textual changes

Small textual updates

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Motion Control Demo