Optimal speed control of synchronous motors based on feedback linearization