Optimal motion control of mechatronic systems by