Control of Permanent Magnet Synchronous Motors