Optimal motion control of mechatronic systems door